From patchwork Tue Mar 14 15:35:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 663043 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 842FEC6FD1C for ; Tue, 14 Mar 2023 15:37:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231760AbjCNPha (ORCPT ); Tue, 14 Mar 2023 11:37:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231769AbjCNPhJ (ORCPT ); Tue, 14 Mar 2023 11:37:09 -0400 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6234A5C9D4 for ; Tue, 14 Mar 2023 08:35:59 -0700 (PDT) Received: by mail-lj1-x22b.google.com with SMTP id h3so16423077lja.12 for ; Tue, 14 Mar 2023 08:35:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678808148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BU7SujQTaU90GwhqWBCXuwboKMKnBmogSD90LjZY5/Y=; b=ut6lD63El1fmQP8JF4V1uEHf/KoNIMMChfMDQzHyktO8ma1fGtbQCTnMwsKwigvSI8 YhwWyYDnC9tk2TnOkyBQ2gzLPaZWRYjOM1yI2qn55E21BJbeH9igAj/UZH6rUE4gY17a NjiQCqS+WwzwQ/H4rELGdtQ8AFB8uPBAcPV1btPD7pSS6lb52rY4DUcfmVSYcQFfK/I2 /ehZ+1qAUR0K+A9NEi5CGtFjWDWsSSWmUimzi/vFpZ19vgXN1Zc0yORQwBe206drSHm/ wBvxCW9OMhGl2uGZwUv0fYCbrNYfhg0tD45rLKpgL1k9iBhLJOkKT+a3G7nKTLivAA++ mBNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678808148; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BU7SujQTaU90GwhqWBCXuwboKMKnBmogSD90LjZY5/Y=; b=BBHyUuvAntoe4GygBiLcL7AnlIQl1LfNA58wj5FXbYii1bW9tavJPNFbkTb+oBgewN ap0Hq+e1t7Hs95qdl+IKd49kd9taiwPUUVK4XwTVKosdY5Ilmj0gnR3CDKwL0KU3mued 8mXk4AHMJhbDDEs5NbAHyYGuUEj5SYUnWB2Qgo+Nu42xev7LV0eiUYcos5DmcUZ7DOkq a76jsWnhPIGCXDhUPCqhF45vDL2I4rjyvB8DJpkY5bueCx20M/ipuDlGABY5i20vFVsx 6JXtu2MUggtDCtD+DsZJYCMSp+Nn4qt8YPFgITHAbBi/hXy+nq+jt4OvBfuVRhkQNivg tY1A== X-Gm-Message-State: AO0yUKV39nGtPaaUHlB5LIaDvtcjgGfUZWIop0rhrEyZkueSRSN2Vgqk dID2p8KhgC9Y36+b8UFedIf5ag== X-Google-Smtp-Source: AK7set+1Zgj5gNQc9n7PpGwR2ZmaVnO2W3pwevVm83Me+ElvExLhltt/TlikQf7lj2B48BsGaHl2bQ== X-Received: by 2002:a2e:730b:0:b0:295:b0a5:f67a with SMTP id o11-20020a2e730b000000b00295b0a5f67amr12016215ljc.22.1678808148506; Tue, 14 Mar 2023 08:35:48 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id z8-20020a2eb528000000b0029573844d03sm470854ljm.109.2023.03.14.08.35.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 08:35:48 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v6 03/32] drm/msm/dpu: move SSPP debugfs creation to dpu_kms.c Date: Tue, 14 Mar 2023 18:35:16 +0300 Message-Id: <20230314153545.3442879-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230314153545.3442879-1-dmitry.baryshkov@linaro.org> References: <20230314153545.3442879-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As SSPP blocks are now visible through dpu_kms->rm.sspp_blocks, move SSPP debugfs creation from dpu_plane to dpu_kms. We are going to break the 1:1 correspondence between planes and SSPPs, so it makes no sense anymore to create SSPP debugfs entries in dpu_plane.c Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 18 ++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 16 ---------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h index bbff908e6dbe..c30f168b6c0a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -388,7 +388,6 @@ struct dpu_hw_sspp *dpu_hw_sspp_init(enum dpu_sspp idx, */ void dpu_hw_sspp_destroy(struct dpu_hw_sspp *ctx); -void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root); int _dpu_hw_sspp_init_debugfs(struct dpu_hw_sspp *hw_pipe, struct dpu_kms *kms, struct dentry *entry); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 681dd2e0c7e8..35194262e628 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -250,6 +250,24 @@ void dpu_debugfs_create_regset32(const char *name, umode_t mode, debugfs_create_file(name, mode, parent, regset, &dpu_regset32_fops); } +static void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root) +{ + struct dentry *entry = debugfs_create_dir("sspp", debugfs_root); + int i; + + if (IS_ERR(entry)) + return; + + for (i = SSPP_NONE; i < SSPP_MAX; i++) { + struct dpu_hw_sspp *hw = dpu_rm_get_sspp(&dpu_kms->rm, i); + + if (!hw) + continue; + + _dpu_hw_sspp_init_debugfs(hw, dpu_kms, entry); + } +} + static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) { struct dpu_kms *dpu_kms = to_dpu_kms(kms); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index b054055f120b..2b0ebdd4c207 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1399,22 +1399,6 @@ void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) _dpu_plane_set_qos_ctrl(plane, enable, DPU_PLANE_QOS_PANIC_CTRL); pm_runtime_put_sync(&dpu_kms->pdev->dev); } - -/* SSPP live inside dpu_plane private data only. Enumerate them here. */ -void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root) -{ - struct drm_plane *plane; - struct dentry *entry = debugfs_create_dir("sspp", debugfs_root); - - if (IS_ERR(entry)) - return; - - drm_for_each_plane(plane, dpu_kms->dev) { - struct dpu_plane *pdpu = to_dpu_plane(plane); - - _dpu_hw_sspp_init_debugfs(pdpu->pipe_hw, dpu_kms, entry); - } -} #endif static bool dpu_plane_format_mod_supported(struct drm_plane *plane,