From patchwork Fri Nov 26 02:18:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519677 Delivered-To: patch@linaro.org Received: by 2002:ac0:c605:0:0:0:0:0 with SMTP id p5csp1723464imj; Thu, 25 Nov 2021 18:18:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJz6g2iDN554Hj0orA3/iYelFeGYCc3Mel8ASp1DXkaxKfQ0WI/e2FY9o1I6IpwGc3yTffZs X-Received: by 2002:a17:90b:4b4d:: with SMTP id mi13mr11934230pjb.192.1637893097201; Thu, 25 Nov 2021 18:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637893097; cv=none; d=google.com; s=arc-20160816; b=RZ51kbOMzPpVPBBv5hIR8hg4HPHQuaP2r7xxo3mdwGMU4hiyajTd5XUC1FrsnWWs5L MtGsYyMvkqvYDQOXCvh0Ee4r6JVJ04/T1cJJoAUCuFiLMo/WYLzfwmCv2BOkIP580HNt 694m6E6VKdTFnyHUWsvgSvnloz6WjIFc7x4soWqUK4sqn0uzZg1YRacBcW18XJ8EzX0d Y/MGrt/u9WDx6zd8tR1PpiP4TykAdYJqv4DRkKqyAAVn5iMabvD2OBUz0BnWuMidD726 NC5spNAn1Z9RlD/FQAbAeLs2lcqigWyP4Eo9v6WHlb/94L+BkCXZ4Wf5uff/G+aJef2d xKZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=tHEwG0qG7vB9UywDg04WwYzX7P8+cxitGw10PyMAi7k=; b=XiQctMnO8i2IrJbZcJMWIG6t3YfJshUzHHFPO5Di8m4RBrw4dhA90gXJSaDDx7/ItK fC2x571Xlj8Rh+RI4HUht8KwA2mEBHiC+TiavDCZ8ibroAnts6/6cTjlQYIGv7GNLXcZ i6znDwsH++11f4POUcm9D+AaZdKoY1Drt/YFD+xggKDYBTzEErWWaSU4MUPXOl5bJpMy HtyHbaPJB7vLqH1Hm8s18rMM+ukDjNGPcrAfnJu3d9fCzmPDN1TNSZ8nhd8ZVK42IksR RAfCFWUy6JEp42XHBZdSuqe2oyvwVZzKvmqQi8Vz1zjJ83ss5uQWFUPI0u2bJYXoXh5W FBlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZUrY8t93; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id ik4si6601671plb.115.2021.11.25.18.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 18:18:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZUrY8t93; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BDE36E42C; Fri, 26 Nov 2021 02:18:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BD9C6E42C for ; Fri, 26 Nov 2021 02:18:12 +0000 (UTC) Received: by mail-lj1-x233.google.com with SMTP id i63so15798967lji.3 for ; Thu, 25 Nov 2021 18:18:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tHEwG0qG7vB9UywDg04WwYzX7P8+cxitGw10PyMAi7k=; b=ZUrY8t93oTCikn0xyY4SWKf6EjCcZwpndHggSv5miijtdDnE8SfbFPisKwTmhrR0q/ 0qEEYcB2Xwt6py7qHSJTmeVCjxJQ55zaWhDFIY4qLT8ZK6GXvZQPxVuyqk1hKiZ7pez3 kcl9GkL10k4RmWLlZ0MilyIiYvh8DPNcvUlhpSUfdyj4fgLUc+RyeyoufSuIYD6EEU4s f3DHNmoRzy01Rjwd55vj9SrGfXiIDD/fyak+/r1/DUwFFO0or23ad3xxpMmQUbF1mm/2 gDuSiCSPwBVJAoWaf+VbqyDfNO1p9GiL5TPwqelF33olwPqv6vjtjr036Txb+t7lFu4b dWpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=tHEwG0qG7vB9UywDg04WwYzX7P8+cxitGw10PyMAi7k=; b=HKaCB/xasyHa4fmFUW9+PEm0qFnPi4AiWC2kaHxMmZ/qujQjYa8UzEVPNZESVjOWoy fJLY5JCQ0kOlBwcDMPcpu+f0AqN1g4syaekid0mt8P+Pku3sCBzGWxt5fvvLrUEVpfNK tgrUKMxdUXqf35ukyM8zESmDhvIfH70ZTAIC43DArHZGYxhe7NqFsJojr4ovN375oZ1I VnGU3fHCiJ6grlNhtsaJsBYkx/2KRPg3YWdMvLFihsROlxbElW7j59uOxxwaA9lmO0Zs Xvjng2yLfPTDe282Yec3titeWFqjnBDz6cGGw/oR/LYbARjw5I8KJz4+tA8z9l5+CQ4j dkpw== X-Gm-Message-State: AOAM532rgPvljAxmo/i5Sn4BQbbqBT+JxqIgmqqf/jYA1oDRzCHRjW1s 4qd4ZA61Snq+Cuj/gDf7IgjleA== X-Received: by 2002:a2e:b01a:: with SMTP id y26mr27560359ljk.317.1637893090667; Thu, 25 Nov 2021 18:18:10 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id g6sm387328lfu.275.2021.11.25.18.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Nov 2021 18:18:10 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH] drm/msm/dpu: remove extra wrappers around dpu_core_irq Date: Fri, 26 Nov 2021 05:18:09 +0300 Message-Id: <20211126021809.1105535-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Remove extra dpu_irq_* wrappers from dpu_kms.c, merge them directly into dpu_core_irq_* functions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 12 ++++----- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 9 ++++--- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 27 +++---------------- 3 files changed, 15 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h index 90ae6c9ccc95..7023ccb79814 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h @@ -10,24 +10,24 @@ /** * dpu_core_irq_preinstall - perform pre-installation of core IRQ handler - * @dpu_kms: DPU handle + * @kms: MSM KMS handle * @return: none */ -void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms); +void dpu_core_irq_preinstall(struct msm_kms *kms); /** * dpu_core_irq_uninstall - uninstall core IRQ handler - * @dpu_kms: DPU handle + * @kms: MSM KMS handle * @return: none */ -void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms); +void dpu_core_irq_uninstall(struct msm_kms *kms); /** * dpu_core_irq - core IRQ handler - * @dpu_kms: DPU handle + * @kms: MSM KMS handle * @return: interrupt handling status */ -irqreturn_t dpu_core_irq(struct dpu_kms *dpu_kms); +irqreturn_t dpu_core_irq(struct msm_kms *kms); /** * dpu_core_irq_read - IRQ helper function for reading IRQ status diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c index fc1b6c47c93d..d76edf55693a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c @@ -144,8 +144,9 @@ static void dpu_core_irq_callback_handler(struct dpu_kms *dpu_kms, int irq_idx) cb->func(cb->arg, irq_idx); } -irqreturn_t dpu_core_irq(struct dpu_kms *dpu_kms) +irqreturn_t dpu_core_irq(struct msm_kms *kms) { + struct dpu_kms *dpu_kms = to_dpu_kms(kms); struct dpu_hw_intr *intr = dpu_kms->hw_intr; int reg_idx; int irq_idx; @@ -551,8 +552,9 @@ void dpu_debugfs_core_irq_init(struct dpu_kms *dpu_kms, } #endif -void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms) +void dpu_core_irq_preinstall(struct msm_kms *kms) { + struct dpu_kms *dpu_kms = to_dpu_kms(kms); int i; pm_runtime_get_sync(&dpu_kms->pdev->dev); @@ -571,8 +573,9 @@ void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms) } } -void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms) +void dpu_core_irq_uninstall(struct msm_kms *kms) { + struct dpu_kms *dpu_kms = to_dpu_kms(kms); int i; if (!dpu_kms->hw_intr) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index a15b26428280..704474c4d655 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -784,20 +784,6 @@ static void dpu_kms_destroy(struct msm_kms *kms) msm_kms_destroy(&dpu_kms->base); } -static irqreturn_t dpu_irq(struct msm_kms *kms) -{ - struct dpu_kms *dpu_kms = to_dpu_kms(kms); - - return dpu_core_irq(dpu_kms); -} - -static void dpu_irq_preinstall(struct msm_kms *kms) -{ - struct dpu_kms *dpu_kms = to_dpu_kms(kms); - - dpu_core_irq_preinstall(dpu_kms); -} - static int dpu_irq_postinstall(struct msm_kms *kms) { struct msm_drm_private *priv; @@ -817,13 +803,6 @@ static int dpu_irq_postinstall(struct msm_kms *kms) return 0; } -static void dpu_irq_uninstall(struct msm_kms *kms) -{ - struct dpu_kms *dpu_kms = to_dpu_kms(kms); - - dpu_core_irq_uninstall(dpu_kms); -} - static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_kms *kms) { int i; @@ -871,10 +850,10 @@ static void dpu_kms_mdp_snapshot(struct msm_disp_state *disp_state, struct msm_k static const struct msm_kms_funcs kms_funcs = { .hw_init = dpu_kms_hw_init, - .irq_preinstall = dpu_irq_preinstall, + .irq_preinstall = dpu_core_irq_preinstall, .irq_postinstall = dpu_irq_postinstall, - .irq_uninstall = dpu_irq_uninstall, - .irq = dpu_irq, + .irq_uninstall = dpu_core_irq_uninstall, + .irq = dpu_core_irq, .enable_commit = dpu_kms_enable_commit, .disable_commit = dpu_kms_disable_commit, .vsync_time = dpu_kms_vsync_time,