From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Abhinav Kumar <abhinavk@codeaurora.org>
Cc: Stephen Boyd <sboyd@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
David Airlie <airlied@linux.ie>,
freedreno@lists.freedesktop.org
Subject: Re: [PATCH v1 5/8] drm/msm/dpu: stop manually removing debugfs files for the DPU plane
Date: Thu, 9 Dec 2021 13:11:30 -0800 [thread overview]
Message-ID: <dcb95f64-8572-6c63-c7e2-0a2ea3917f98@quicinc.com> (raw)
In-Reply-To: <20211201222633.2476780-6-dmitry.baryshkov@linaro.org>
On 12/1/2021 2:26 PM, Dmitry Baryshkov wrote:
> DRM code handles removing all debugfs recursively. Drop plane-specific
> code to perform that.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 28 ++++++++---------------
> 1 file changed, 10 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> index f80ee3ba9a8a..d3176f58708e 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
> @@ -110,7 +110,6 @@ struct dpu_plane {
> struct dpu_mdss_cfg *catalog;
>
> /* debugfs related stuff */
> - struct dentry *debugfs_root;
> struct dpu_debugfs_regset32 debugfs_src;
> struct dpu_debugfs_regset32 debugfs_scaler;
> struct dpu_debugfs_regset32 debugfs_csc;
> @@ -1368,15 +1367,16 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane)
> struct dpu_kms *kms = _dpu_plane_get_kms(plane);
> const struct dpu_sspp_cfg *cfg = pdpu->pipe_hw->cap;
> const struct dpu_sspp_sub_blks *sblk = cfg->sblk;
> + struct dentry *debugfs_root;
>
> /* create overall sub-directory for the pipe */
> - pdpu->debugfs_root =
> + debugfs_root =
> debugfs_create_dir(plane->name,
> plane->dev->primary->debugfs_root);
>
> /* don't error check these */
> debugfs_create_xul("features", 0600,
> - pdpu->debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features);
> + debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features);
>
> /* add register dump support */
> dpu_debugfs_setup_regset32(&pdpu->debugfs_src,
> @@ -1384,7 +1384,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane)
> sblk->src_blk.len,
> kms);
> dpu_debugfs_create_regset32("src_blk", 0400,
> - pdpu->debugfs_root, &pdpu->debugfs_src);
> + debugfs_root, &pdpu->debugfs_src);
>
> if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) ||
> cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) ||
> @@ -1395,7 +1395,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane)
> sblk->scaler_blk.len,
> kms);
> dpu_debugfs_create_regset32("scaler_blk", 0400,
> - pdpu->debugfs_root,
> + debugfs_root,
> &pdpu->debugfs_scaler);
> }
>
> @@ -1406,24 +1406,24 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane)
> sblk->csc_blk.len,
> kms);
> dpu_debugfs_create_regset32("csc_blk", 0400,
> - pdpu->debugfs_root, &pdpu->debugfs_csc);
> + debugfs_root, &pdpu->debugfs_csc);
> }
>
> debugfs_create_u32("xin_id",
> 0400,
> - pdpu->debugfs_root,
> + debugfs_root,
> (u32 *) &cfg->xin_id);
> debugfs_create_u32("clk_ctrl",
> 0400,
> - pdpu->debugfs_root,
> + debugfs_root,
> (u32 *) &cfg->clk_ctrl);
> debugfs_create_x32("creq_vblank",
> 0600,
> - pdpu->debugfs_root,
> + debugfs_root,
> (u32 *) &sblk->creq_vblank);
> debugfs_create_x32("danger_vblank",
> 0600,
> - pdpu->debugfs_root,
> + debugfs_root,
> (u32 *) &sblk->danger_vblank);
>
> return 0;
> @@ -1440,13 +1440,6 @@ static int dpu_plane_late_register(struct drm_plane *plane)
> return _dpu_plane_init_debugfs(plane);
> }
>
> -static void dpu_plane_early_unregister(struct drm_plane *plane)
> -{
> - struct dpu_plane *pdpu = to_dpu_plane(plane);
> -
> - debugfs_remove_recursive(pdpu->debugfs_root);
> -}
> -
> static bool dpu_plane_format_mod_supported(struct drm_plane *plane,
> uint32_t format, uint64_t modifier)
> {
> @@ -1472,7 +1465,6 @@ static const struct drm_plane_funcs dpu_plane_funcs = {
> .atomic_duplicate_state = dpu_plane_duplicate_state,
> .atomic_destroy_state = dpu_plane_destroy_state,
> .late_register = dpu_plane_late_register,
> - .early_unregister = dpu_plane_early_unregister,
> .format_mod_supported = dpu_plane_format_mod_supported,
> };
>
>
next prev parent reply other threads:[~2021-12-09 21:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-01 22:26 [PATCH v1 0/8] drm/msm/dpu: cleanup debugfs code Dmitry Baryshkov
2021-12-01 22:26 ` [PATCH v1 1/8] drm/msm/dpu: move disable_danger out of plane subdir Dmitry Baryshkov
2021-12-09 21:09 ` [Freedreno] " Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 2/8] drm/msm/dpu: fix safe status debugfs file Dmitry Baryshkov
2021-12-09 21:10 ` [Freedreno] " Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 3/8] drm/msm/dpu: make danger_status/safe_status readable Dmitry Baryshkov
2021-12-09 21:10 ` Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 4/8] drm/msm/dpu: drop plane's default_scaling debugfs file Dmitry Baryshkov
2021-12-09 21:11 ` [Freedreno] " Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 5/8] drm/msm/dpu: stop manually removing debugfs files for the DPU plane Dmitry Baryshkov
2021-12-09 21:11 ` Abhinav Kumar [this message]
2021-12-01 22:26 ` [PATCH v1 6/8] drm/msm/dpu: stop manually removing debugfs files for the DPU CRTC Dmitry Baryshkov
2021-12-09 21:11 ` [Freedreno] " Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 7/8] drm/msm/dpu: simplify DPU's regset32 code Dmitry Baryshkov
2021-12-09 22:02 ` [Freedreno] " Abhinav Kumar
2021-12-01 22:26 ` [PATCH v1 8/8] drm/msm/dpu: move SSPP debugfs support from plane to SSPP code Dmitry Baryshkov
2021-12-09 22:18 ` Abhinav Kumar
2021-12-09 22:27 ` [Freedreno] " Abhinav Kumar
2021-12-10 0:19 ` Dmitry Baryshkov
2021-12-16 1:15 ` Abhinav Kumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dcb95f64-8572-6c63-c7e2-0a2ea3917f98@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=abhinavk@codeaurora.org \
--cc=airlied@linux.ie \
--cc=bjorn.andersson@linaro.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robdclark@gmail.com \
--cc=sboyd@kernel.org \
--cc=sean@poorly.run \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).