* [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs
@ 2023-01-12 5:36 Dmitry Baryshkov
2023-01-18 0:51 ` Abhinav Kumar
2023-01-18 2:06 ` Dmitry Baryshkov
0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-01-12 5:36 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Abhinav Kumar
Cc: Stephen Boyd, David Airlie, Daniel Vetter, Bjorn Andersson,
linux-arm-msm, dri-devel, freedreno
For each CRTC we are creating two different debugfs directories one
using crtc index (created automatically for the CRC files) and another
one using CRTC name/object ID (for state and status files).
This can be confusing, so move our custom files to crtc->debugfs_entry,
effetively merging two debugfs dirs.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 7f0f467dbabd..659fdfec5346 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1380,16 +1380,12 @@ DEFINE_SHOW_ATTRIBUTE(dpu_crtc_debugfs_state);
static int _dpu_crtc_init_debugfs(struct drm_crtc *crtc)
{
struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
- struct dentry *debugfs_root;
-
- debugfs_root = debugfs_create_dir(dpu_crtc->name,
- crtc->dev->primary->debugfs_root);
debugfs_create_file("status", 0400,
- debugfs_root,
+ crtc->debugfs_entry,
dpu_crtc, &_dpu_debugfs_status_fops);
debugfs_create_file("state", 0600,
- debugfs_root,
+ crtc->debugfs_entry,
&dpu_crtc->base,
&dpu_crtc_debugfs_state_fops);
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs
2023-01-12 5:36 [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs Dmitry Baryshkov
@ 2023-01-18 0:51 ` Abhinav Kumar
2023-01-18 2:06 ` Dmitry Baryshkov
1 sibling, 0 replies; 3+ messages in thread
From: Abhinav Kumar @ 2023-01-18 0:51 UTC (permalink / raw)
To: Dmitry Baryshkov, Rob Clark, Sean Paul
Cc: Stephen Boyd, David Airlie, Daniel Vetter, Bjorn Andersson,
linux-arm-msm, dri-devel, freedreno
On 1/11/2023 9:36 PM, Dmitry Baryshkov wrote:
> For each CRTC we are creating two different debugfs directories one
> using crtc index (created automatically for the CRC files) and another
> one using CRTC name/object ID (for state and status files).
>
> This can be confusing, so move our custom files to crtc->debugfs_entry,
> effetively merging two debugfs dirs.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Makes sense to me and also verified it on my chromebook.
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Tested-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> index 7f0f467dbabd..659fdfec5346 100644
> --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
> @@ -1380,16 +1380,12 @@ DEFINE_SHOW_ATTRIBUTE(dpu_crtc_debugfs_state);
> static int _dpu_crtc_init_debugfs(struct drm_crtc *crtc)
> {
> struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc);
> - struct dentry *debugfs_root;
> -
> - debugfs_root = debugfs_create_dir(dpu_crtc->name,
> - crtc->dev->primary->debugfs_root);
>
> debugfs_create_file("status", 0400,
> - debugfs_root,
> + crtc->debugfs_entry,
> dpu_crtc, &_dpu_debugfs_status_fops);
> debugfs_create_file("state", 0600,
> - debugfs_root,
> + crtc->debugfs_entry,
> &dpu_crtc->base,
> &dpu_crtc_debugfs_state_fops);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs
2023-01-12 5:36 [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs Dmitry Baryshkov
2023-01-18 0:51 ` Abhinav Kumar
@ 2023-01-18 2:06 ` Dmitry Baryshkov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-01-18 2:06 UTC (permalink / raw)
To: Rob Clark, Sean Paul, Abhinav Kumar, Dmitry Baryshkov
Cc: Stephen Boyd, David Airlie, Daniel Vetter, Bjorn Andersson,
linux-arm-msm, dri-devel, freedreno
On Thu, 12 Jan 2023 07:36:59 +0200, Dmitry Baryshkov wrote:
> For each CRTC we are creating two different debugfs directories one
> using crtc index (created automatically for the CRC files) and another
> one using CRTC name/object ID (for state and status files).
>
> This can be confusing, so move our custom files to crtc->debugfs_entry,
> effetively merging two debugfs dirs.
>
> [...]
Applied, thanks!
[1/1] drm/msm/dpu: merge two CRTC debugfs dirs
https://gitlab.freedesktop.org/lumag/msm/-/commit/f377ea2c3c3a
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-18 2:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-12 5:36 [PATCH] drm/msm/dpu: merge two CRTC debugfs dirs Dmitry Baryshkov
2023-01-18 0:51 ` Abhinav Kumar
2023-01-18 2:06 ` Dmitry Baryshkov
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).