From patchwork Wed Feb 9 17:24:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 541126 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp1530232imo; Wed, 9 Feb 2022 09:25:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnMK8Ga0o9W6LvrH/WSjKjWD/jeVWVAb/Qa25pKaYwOEH6SklB35SnKh4zuuJ1oIuwZ+CH X-Received: by 2002:a62:7555:: with SMTP id q82mr3300020pfc.11.1644427537055; Wed, 09 Feb 2022 09:25:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644427537; cv=none; d=google.com; s=arc-20160816; b=vKAWQDhQRxfkABh6Yw0/VTZ2UFLLYTLifwAnEbGJGtkw96atrOTAaMuHEW0ywg4wq2 UNGW3e8efIFC9tN40xUO6KEwmy38SOPbpXSF9oeKqeafzYq82Hm5iQRQ06kitgzjpvOW zuIyvZ8fXIKkk9+lRJsHxHs7sI6sE9HPiCUyd0GVt0F/SOb+xXjSLTyzg7F21cPASrVW UvEp+tNUx5n8Wn118Hivx11xUfReYycD+5zWK7XgHLtaOnGlfv7TfroD14pDTvSE926p 5Ha8kp6Viv440nbVC1yaxmtWTBcWY74qkOjqt+VavMiYXOrzxrDm9Hj+7FwtVsTabTj9 waZw== 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=tkfC5TUEm5vYZaztIKawUNBYYGPAof7pzxftrloc+wI=; b=OrryQL+ne48i6dapm2yL4DOkCWF+hOgQYUtua62CG7c1p93IC2bBhdi2hiTmVmOSPE W9yRlEYzRdH51aM8EwVRn8shtOzZdptrE+J0IB6+pFYJr36ejApYRfdBYa2iniUv4iy2 1C1lVFY9mdtl4ta1aJD80J/dwT3hjpqFYR0Q+dqVHzcpdSXXjoyjK/tjZea08BsattLv FatTSw59To55bXgbG/TWnqfaU7PP5buhKy+1Cro9w+JWUMXx4EuBGi5yrOgU+BozA+A0 UvNphBLvxyOLYT+n0EeE0ScYak3KBcF1zfDHfjxY1sjTDMlZhH/xKOz3qlV+5rnUJJeb GAhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="LvUk4/uH"; 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 mh13si6891669pjb.155.2022.02.09.09.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 09:25:37 -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="LvUk4/uH"; 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 51DBC10E3CE; Wed, 9 Feb 2022 17:25:28 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF68810E3E6 for ; Wed, 9 Feb 2022 17:25:27 +0000 (UTC) Received: by mail-lf1-x135.google.com with SMTP id m18so5557640lfq.4 for ; Wed, 09 Feb 2022 09:25:27 -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=tkfC5TUEm5vYZaztIKawUNBYYGPAof7pzxftrloc+wI=; b=LvUk4/uHqG/gKvS0PZOGMhkFtgMM9yc5eEz3ZqImdyu9B8PIxteNjz0eTBVxWBEDHx En/z4XAejrLOQyEIZHEE/IGyiGl2AgGh60Q+2iJCwwHjqNzrykbJQ/ZWQKHdBN9r5AiT dd+Tz3wMeMZ/HU/RzH52+nv7tqKG2V39N8pb5vtJQmlSMvrmpiKTmyg8XC6WO9ETy1K8 t50lC1hQTcP4sRaxd1eQnHIi6DnfY+11NqzM4SfY4f9CTRZ3pUr6rtQZLpM0ntbRN61c 17E8pBR00zaQZ75OURn4pBTn7Dvnckty4Aw7L+qmGMNVUU5lFoT3GJoBEAM5WkF68Rgo 4QMA== 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=tkfC5TUEm5vYZaztIKawUNBYYGPAof7pzxftrloc+wI=; b=JkYydKdzYPY2VKqd0s3s6Bxe3MPj9ZOnjp+Pr2FdSsDSmHna8vcLliK81P1OHZEleb TrhMtFNjO9GmL7NRxb8toK+Ik5fiSrpLur34bRIV+9CHPqyAU/eDhBudoHWigvLcFZoO vR1aaxMyZBrYupXbrOQzWmrc3eNMe5PmYAEq1c4v3sZANqdB6RIS+YHro/RPbbka3zfS 1KziEY3dKqocuYqYqK5MiI2jEX+/ezjIe/a2gASwbB37+hKvTWDbUq9+p4hKECtYIzfC re4VpSj9FnjF+cz+SeDBXBTvYN6ivYR01KhOD/bZmlBTEGg3OcJIsThzUGYyiFotrfli 70Kw== X-Gm-Message-State: AOAM531gM38gQCQgBHy4f+V+U0xo6UoVGtvYJL2WdJACFuRyz28Txlz5 uyoHomGRUKorThF4Wsx0yYfngw== X-Received: by 2002:ac2:5dcb:: with SMTP id x11mr2235969lfq.254.1644427526198; Wed, 09 Feb 2022 09:25:26 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u14sm2560055lji.40.2022.02.09.09.25.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 09:25:25 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH 04/25] drm/msm/dpu: move SSPP debugfs creation to dpu_kms.c Date: Wed, 9 Feb 2022 20:24:59 +0300 Message-Id: <20220209172520.3719906-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220209172520.3719906-1-dmitry.baryshkov@linaro.org> References: <20220209172520.3719906-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" As SSPP blocks are now visible through dpu_kms->rm.sspp_blocks, move SSPP debugfs creation from dpu_plane to dpu_kms. 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 | 19 +++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 16 ---------------- 3 files changed, 19 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 f805c30643b1..674f311f99b4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -415,7 +415,6 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx, */ void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx); -void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root); int _dpu_hw_sspp_init_debugfs(struct dpu_hw_pipe *hw_pipe, struct dpu_kms *kms, struct dentry *entry); #endif /*_DPU_HW_SSPP_H */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 4d2b75f3bc89..8196b11fe2f3 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -259,6 +259,25 @@ void dpu_debugfs_create_regset32(const char *name, umode_t mode, debugfs_create_file(name, mode, parent, regset, &dpu_fops_regset32); } +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_pipe *pipe_hw; + + if (!dpu_kms->rm.sspp_blks[i - SSPP_NONE]) + continue; + + pipe_hw = to_dpu_hw_pipe(dpu_kms->rm.sspp_blks[i - SSPP_NONE]); + _dpu_hw_sspp_init_debugfs(pipe_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 146dbccd79cd..37742f74a7bf 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1359,22 +1359,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,