From patchwork Thu Feb 17 04:31:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 543368 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp103835imn; Wed, 16 Feb 2022 20:32:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyWCcqfy7qV4SgoqTcUM1S10R9LYTsfJcMwqLHwBd6BqVC7HmBbjp63OKEaHR7PLiY4cdX X-Received: by 2002:a65:560c:0:b0:34e:2e6:542c with SMTP id l12-20020a65560c000000b0034e02e6542cmr1056478pgs.90.1645072329008; Wed, 16 Feb 2022 20:32:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645072329; cv=none; d=google.com; s=arc-20160816; b=F429Q0F8EJCB6yd+dga6jvVpD8sKTyOf8RTyweTzMXen/gsHSRyvd7o7K9T54E6Znf 1EMmEAwt8f3DvS0OppsAlWfLhkTQrKRx0ZNhcJZ5hKWL6A+thPKuh7DYjFlFh9TusO3q 4QOZ36Klw6rCNnQ0TIdBwS9ytuAPPgHFyhKRafiKZemVBZWULCsYcXgUfJuSl+905J2F 68C+pfjAwMgSRQATvVaUFZZ5/PxKOuXCmehLo0YzTMOMkcGA+g4u0XRogk5DX60aCuI5 p5CmSVSW8TOgRf1g9+negTgB++J7wLSJ6dobruu/EwsD5ulloR1Z4ydmRr1EoPqy0FML 0moQ== 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=dtg5/Z2GMYyUrAPpDCBg7YlfrWShGhSc7RVgL/BXArY=; b=toyalvLDXbGKRC0M2PszF8NUoBdr1ZOECCL4WbSl7Yd+MoBBJYFgU0yhz4Rm1iOG4Y SR5WpYk0d8lmfLyPHacCMiQeDvP/Wbw+2xAQ1jc6j78/8e5fwtVTf+/0/tY7eqFN2/jb Zc++TQJRpl5GpVXxkrxs2Xj1jrcYaMZ57sbZs0igijQjRw/J+o503hq6oCOW6vlmVjlr So8qP1KBRv9mvREYyQlWmsd6l7qzdDiMCsvdSpAvZ3D+/kdqnuGyTiX9kq4PQ80YRUzC J75ySTdQCDoJXeu1CDz9xHW4q4BtmwDaOnJ2pTE4ENCyCV+2DHTnQymjOszq5FbJujg3 0Hqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ALoAxA3r; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id oc13si803523pjb.102.2022.02.16.20.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 20:32:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ALoAxA3r; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 E4C0910E825; Thu, 17 Feb 2022 04:31:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id E968010E826 for ; Thu, 17 Feb 2022 04:31:51 +0000 (UTC) Received: by mail-lj1-x231.google.com with SMTP id n24so6438070ljj.10 for ; Wed, 16 Feb 2022 20:31:51 -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=dtg5/Z2GMYyUrAPpDCBg7YlfrWShGhSc7RVgL/BXArY=; b=ALoAxA3ro4/AEDEypDq6tfL3jLyq1x2uRHjP5fqQzDBSFLEYFKdWumY32maV8O6/Wv dIIFMg54Sgy+aVmJBBy3DAnD8D4qLK04te0ka2U7FYHLYvpV9C4bNfhzdrI16GXzzoEP GKkGQ7xCl4DQsRrhEuaq2vXXzFD+uQ1Ks7RoErllwL9vrGyb92+9WTn9c0MY4x3li3gM b00BpWQgdVbVQ0ltLiaZSuZ7Sn4tK5XK68N/GQnnalvbAddzYtan+uUOoGYXijqG+STD OdVKeHNESr+AExm2SE/PN8K6zlRnD94jaiKYPmd8RLQ7tL5/LdH8sTQM30v7/pHyoIOH uUeA== 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=dtg5/Z2GMYyUrAPpDCBg7YlfrWShGhSc7RVgL/BXArY=; b=drfzsai3Vy7v84cHA79YqXaQMCioiQCGVQVndqkkLvczt5mbEv5ds+W36EPzcvftUk UrgTKEVwz4TmuL8Md05v2pXGtWIUyjOXVVQFG56c9gmVtxQq0KTrQofGrRpMA9HJUUpR JKKN5lwrLTfjTlPbO9ADAudn/ThSR0ltO3WwrigNTG1CZt7T5r164fXfw496obRz/OAS n2g7Y8fq4GZjQ4SfEIedFWHG7Wj195T6FYDuGbkCyz7tL3KzY1L/5gyiJSzpXCFnDVd4 K4tSf9UqL/B/2zCWHYv3GOhEl6+XKXckPxej4sS+O+YsekroGBEzwn2ddJ29vKL1Rei8 oY/w== X-Gm-Message-State: AOAM532t1yJRbrK4tuA6RH2Y9MGwlLq0yb8F7yKJKM8ozcR2A7K+4OxN 1b0OYHvQtMHxDwHvCwPxkEKw4A== X-Received: by 2002:a05:651c:a09:b0:239:8f43:ad53 with SMTP id k9-20020a05651c0a0900b002398f43ad53mr947837ljq.458.1645072310202; Wed, 16 Feb 2022 20:31:50 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id l8sm1463391ljb.140.2022.02.16.20.31.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 20:31:49 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v3 1/6] drm/msm/dpu: remove extra wrappers around dpu_core_irq Date: Thu, 17 Feb 2022 07:31:43 +0300 Message-Id: <20220217043148.480898-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220217043148.480898-1-dmitry.baryshkov@linaro.org> References: <20220217043148.480898-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. Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov --- 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,