From patchwork Tue Feb 1 15:10:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 538944 Delivered-To: patch@linaro.org Received: by 2002:a5d:59ac:0:0:0:0:0 with SMTP id p12csp860804wrr; Tue, 1 Feb 2022 07:11:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5BZp1blusPGuyx/F1d+iA8kiQnsQneou5fyCEsd2cRWITmhocMoe+71+VVvLHA6i4UIvh X-Received: by 2002:a05:6a00:9a9:: with SMTP id u41mr25042795pfg.75.1643728265050; Tue, 01 Feb 2022 07:11:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643728265; cv=none; d=google.com; s=arc-20160816; b=pH0xm3+UA7SRs8UGn1dGZ73wiyyXmiohqMvsxXlzaVEq4ocZk4f0VvCV2pnt7ML/dZ yguX99FP9LsMYRXVgl6SEc97aJXjrHEGkCXKGy6fCwrOtQF2fOUvaVBQK1XPgnu6HD1Q UAoNt6jDu6PfnFg1/GSEYQUDhvtafqW04FvNhR5Pjko3A+JAn3K2bCUJwy2XaPyB4rmF P6nu5i0Fq75QywXPwz6kjG8Qg37xQQc8ZFIrnrUTzJMcr8aTJcxmKJC7vf+GegE9xjZ2 6vxCvY1Wq5Z0daKOdRrtSTKBvosX4xdFdXcgJzppmT+RRX9TPdgwbGCsQdxLkTs9Imwg 3lqw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=h1Th6E+X/hhce235SEjkCurtTtwUkOS9qNS0Y+WY5UM=; b=lku9sJEmAgSPCl/A8FYydDs/srumWkYwPZTJ0jbq+MSbuA84ZNcJ9wq3nITq6z35u6 9UavhykIkzvISCdU2c0SWS0VH3D+bgo22EmNcdECwpD5UbDf4DHgeWi82mJDNRRZyvcl yd5i0NvtSFGxW3KYDFfagvU/u+oJITaf2L2H0fyklL7xbj2XGYRADXHOkqjjRftsU8QP 2UEJ3wvJVfbl8seqRDDbEtjv7cg1CHmDO/suVZJyIjduUnK3OxPTyMFUoUjodWHwHgWb FubDOoVE2DmUSzALGdrQglfro363v9c47d1WTZ08Y4V7nacEpWz3fV+wVk+OwWSO2WmV TjFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ycjbzoTH; 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 e2si10064199plj.305.2022.02.01.07.11.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 07:11:05 -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=ycjbzoTH; 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 6D8A810E5A4; Tue, 1 Feb 2022 15:11:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B72310E546 for ; Tue, 1 Feb 2022 15:11:00 +0000 (UTC) Received: by mail-lf1-x131.google.com with SMTP id i34so14200869lfv.2 for ; Tue, 01 Feb 2022 07:11:00 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=h1Th6E+X/hhce235SEjkCurtTtwUkOS9qNS0Y+WY5UM=; b=ycjbzoTHWqBoyu9z3ZT6UI0p4mi6pANZaQO3LHTAeirifJOW4vWxsKmtGqOzqHAHDa mcUWYaqi3371bEjaVl6NzS/g8bcubDTC5YkYOc2KslnvKw2PNA6OIfqPdyOs58p4SnGp cxoMp8NolYqToeCvwKK5aGK3RAaJix7v9tYXgLwETVFokn04TGHnEs+lCUMiIak/DyGq edvjFjqBfC8C04uPuJmgipVArrdwBAp4ZjJHqHrRV/Q+KuKjHpktXWSnKI8Suwiz3PQG T+IqY17kDeLfL6CCzAL7qWHA0y/EIj6EiFinARNzoD5hFwsBlwPjRTlMjrsHDJwWrmNi qY7Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=h1Th6E+X/hhce235SEjkCurtTtwUkOS9qNS0Y+WY5UM=; b=OZbxyo/iXw04AIdYORGtBpJpSNicQsXcCkf9TBh3/9O6/mjp+nh80FNeGpqjfAKM2r 9BFH8Tdw94IQgR/1Vh9hV9/zb1j1ImoSp2woOXrVnS971yZwgWLv97ehT8HVHGkwccDv t1BM9lvbyezOVEN11nKZH49RaHilM9OVq0cQdW1S2Jny5Ju4skTDpWOa+0KZ7WZiqHAw JaitypSWXaeY9urflVQxPoGGkK71huOPPWhs93A/3hzdHm92JPo17mV0hL8RiL8PJqop rMuwyO9ZHbW59nZS3BEvESvu43OV7AAI+8wWuDsSn98z3qPbbmx8hnWsmyOSPH01/u5L 1NeA== X-Gm-Message-State: AOAM530bchYDWUkG+Q1gMqDMx2+51xlgrcMHD8bKUQf4s/w/trdWoV0T qx+Uffcpsc1w1T3NcQ16MHBPJw== X-Received: by 2002:ac2:46ca:: with SMTP id p10mr19312477lfo.562.1643728258838; Tue, 01 Feb 2022 07:10:58 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id y6sm1337723lfk.157.2022.02.01.07.10.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Feb 2022 07:10:57 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH 1/6] drm/msm/dpu: remove extra wrappers around dpu_core_irq Date: Tue, 1 Feb 2022 18:10:51 +0300 Message-Id: <20220201151056.2480055-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220201151056.2480055-1-dmitry.baryshkov@linaro.org> References: <20220201151056.2480055-1-dmitry.baryshkov@linaro.org> 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: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , 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 Reviewed-by: Stephen Boyd --- 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 a77a5eaa78ad..71882d3fe705 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c @@ -162,8 +162,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; @@ -569,8 +570,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); @@ -589,8 +591,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; pm_runtime_get_sync(&dpu_kms->pdev->dev); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 47fe11a84a77..364bd4e60fba 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -841,20 +841,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; @@ -874,13 +860,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; @@ -933,10 +912,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,