Skip to contentSkip to conversation

drm/msm/dpu: Remove chatty vbif debug print

PATCH In review Stephen Boyd 3 participants 6 messages Nov 17, 2020 – Nov 19, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/msm/dpu: Remove chatty vbif debug print

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
index 5e8c3f3e6625..5eb2b2ee09f5 100644
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
 	forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, true);
 
 	for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-		DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-				params->vbif_idx, params->xin_id, i,
-				qos_tbl->priority_lvl[i]);
 		vbif->ops.set_qos_remap(vbif, params->xin_id, i,
 				qos_tbl->priority_lvl[i]);
 	}
Signature · 1 line
Sent by a computer, using git, on the internet
#1 lore raw
Quoted 19 lines · Stephen Boyd

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -0
index 5e8c3f3e6625..5eb2b2ee09f5 100644

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c void dpu_vbif_set_qos_remap(struct dpu_kms · line 252

Quoted 8 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms 
 *dpu_kms,
 	forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, 
 true);
 
 	for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-		DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-				params->vbif_idx, params->xin_id, i,
-				qos_tbl->priority_lvl[i]);

Instead of getting rid of this print, we should optimize the caller of this. This is what we are doing in downstream. So we need to update the property only if we are switching from a RT client to non-RT client for the plane and vice-versa. So we should try to do the same thing here.

is_rt = sde_crtc_is_rt_client(crtc, crtc->state); if (is_rt != psde->is_rt_pipe) {
psde->is_rt_pipe = is_rt; pstate->dirty |= SDE_PLANE_DIRTY_QOS;
}

if (pstate->dirty & DPU_PLANE_DIRTY_QOS)
_dpu_plane_set_qos_remap(plane);

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Quoting [email protected] (2020-11-17 12:34:56)

Quoted 24 lines · Stephen Boyd
Quoted 23 lines

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -0
index 5e8c3f3e6625..5eb2b2ee09f5 100644
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms 
 *dpu_kms,
      forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl, 
 true);
 
Quoted 7 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, · line 250

Quoted 4 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
      for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-             DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-                             params->vbif_idx, params->xin_id, i,
-                             qos_tbl->priority_lvl[i]);

Instead of getting rid of this print, we should optimize the caller of this.

Does the print tell us anything? Right now it prints 8 lines where it feels like it could be trimmed down:

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:0/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:1/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:2/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:3/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:4/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:5/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:6/6
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:7/6

maybe one line that combines the index into values?

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 [3 3 4 4 5 5 6 6]

But again I have no idea if this print is really useful. Maybe we can print it only if the value changes from what was already there? Basically move the print into dpu_hw_set_qos_remap() and then skip out early if nothing changed or print and modify the register.

Quoted 6 lines

This is what
we are doing in downstream. So we need to update the property only if we are switching from a RT client
to non-RT client for the plane and vice-versa. So we should try to do the same thing here.

Quoted 10 lines
        is_rt = sde_crtc_is_rt_client(crtc, crtc->state);
        if (is_rt != psde->is_rt_pipe) {
                psde->is_rt_pipe = is_rt;
                pstate->dirty |= SDE_PLANE_DIRTY_QOS;
        }


        if (pstate->dirty & DPU_PLANE_DIRTY_QOS)
                _dpu_plane_set_qos_remap(plane);

Sounds great! Can you send the patch?

#3 lore raw
Quoted 46 lines · Stephen Boyd

Quoting [email protected] (2020-11-17 12:34:56)

Quoted 24 lines · Stephen Boyd
Quoted 23 lines

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -0
index 5e8c3f3e6625..5eb2b2ee09f5 100644
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms
 *dpu_kms,
      forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl,
 true);
 
Quoted 7 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, · line 250

Quoted 4 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
      for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-             DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-                             params->vbif_idx, params->xin_id, i,
-                             qos_tbl->priority_lvl[i]);

Instead of getting rid of this print, we should optimize the caller of this.

Does the print tell us anything? Right now it prints 8 lines where it feels like it could be trimmed down:

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:0/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:1/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:2/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:3/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:4/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:5/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:6/6
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:7/6
Quoted 4 lines

maybe one line that combines the index into values?

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 [3 3 4 4 5 5 6 6]

or possibly convert to a tracepoint (so it doesn't spam the drm_trace buffer)

BR,
-R

Quoted 18 lines

But again I have no idea if this print is really useful. Maybe we can print it only if the value changes from what was already there? Basically move the print into dpu_hw_set_qos_remap() and then skip out early if nothing changed or print and modify the register.

Quoted 13 lines

This is what
we are doing in downstream. So we need to update the property only if we are switching from a RT client
to non-RT client for the plane and vice-versa. So we should try to do the same thing here.

        is_rt = sde_crtc_is_rt_client(crtc, crtc->state);
        if (is_rt != psde->is_rt_pipe) {
                psde->is_rt_pipe = is_rt;
                pstate->dirty |= SDE_PLANE_DIRTY_QOS;
        }
Quoted 5 lines
Quoted 3 lines
        if (pstate->dirty & DPU_PLANE_DIRTY_QOS)
                _dpu_plane_set_qos_remap(plane);

Sounds great! Can you send the patch?

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Hi Stephen

Quoted 49 lines · Rob Clark
Quoted 48 lines · Stephen Boyd

Quoting [email protected] (2020-11-17 12:34:56)

Quoted 24 lines · Stephen Boyd
Quoted 23 lines

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -0
index 5e8c3f3e6625..5eb2b2ee09f5 100644
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms
 *dpu_kms,
      forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl,
 true);
 
Quoted 7 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, · line 250

Quoted 4 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
      for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-             DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-                             params->vbif_idx, params->xin_id, i,
-                             qos_tbl->priority_lvl[i]);

Instead of getting rid of this print, we should optimize the caller of this.

Does the print tell us anything? Right now it prints 8 lines where it feels like it could be trimmed down:

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:0/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:1/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:2/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:3/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:4/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:5/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:6/6
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:7/6

maybe one line that combines the index into values?

Quoted 31 lines
Quoted 2 lines
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 [3 3 4 4 5 5 6 6]

or possibly convert to a tracepoint (so it doesn't spam the drm_trace buffer)

BR,
-R

Quoted 23 lines

But again I have no idea if this print is really useful. Maybe we can print it only if the value changes from what was already there? Basically move the print into dpu_hw_set_qos_remap() and then skip out early if nothing changed or print and modify the register.

Quoted 6 lines

This is what
we are doing in downstream. So we need to update the property only if we are switching from a RT client
to non-RT client for the plane and vice-versa. So we should try to do the same thing here.

Quoted 10 lines
        is_rt = sde_crtc_is_rt_client(crtc, crtc->state);
        if (is_rt != psde->is_rt_pipe) {
                psde->is_rt_pipe = is_rt;
                pstate->dirty |= SDE_PLANE_DIRTY_QOS;
        }


        if (pstate->dirty & DPU_PLANE_DIRTY_QOS)
                _dpu_plane_set_qos_remap(plane);

Sounds great! Can you send the patch?

Will finalize approach and send the patch in a day or two.

Thanks

Abhinav
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
Quoted 83 lines · On 2020-11-18 12:03, [email protected] wrote:

Hi Stephen

Quoted 80 lines · Rob Clark
Quoted 46 lines · Stephen Boyd

Quoting [email protected] (2020-11-17 12:34:56)

Quoted 24 lines · Stephen Boyd
Quoted 23 lines

I don't know what this debug print is for but it is super chatty, throwing 8 lines of debug prints in the logs every time we update a plane. It looks like it has no value. Let's nuke it so we can get better logs.

Cc Sean Paul <[email protected]>
Cc Abhinav Kumar <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c | 3 ---
 1 file changed, 3 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -0
index 5e8c3f3e6625..5eb2b2ee09f5 100644
@@ -245,9 +245,6 @@ void dpu_vbif_set_qos_remap(struct dpu_kms
 *dpu_kms,
      forced_on = mdp->ops.setup_clk_force_ctrl(mdp, params->clk_ctrl,
 true);
 
Quoted 7 lines

drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms, · line 250

Quoted 4 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c +0 -3
      for (i = 0; i < qos_tbl->npriority_lvl; i++) {
-             DPU_DEBUG("vbif:%d xin:%d lvl:%d/%d\n",
-                             params->vbif_idx, params->xin_id, i,
-                             qos_tbl->priority_lvl[i]);

Instead of getting rid of this print, we should optimize the caller of this.

Does the print tell us anything? Right now it prints 8 lines where it feels like it could be trimmed down:

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:0/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:1/3
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:2/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:3/4
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:4/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:5/5
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:6/6
           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 lvl:7/6
Quoted 5 lines

maybe one line that combines the index into values?

           [drm:dpu_vbif_set_qos_remap] vbif:0 xin:0 [3 3 4 4 5 5 6 

6]

or possibly convert to a tracepoint (so it doesn't spam the drm_trace buffer)

BR,
-R

Quoted 22 lines

But again I have no idea if this print is really useful. Maybe we can print it only if the value changes from what was already there? Basically move the print into dpu_hw_set_qos_remap() and then skip out early if nothing changed or print and modify the register.

Quoted 16 lines

This is what
we are doing in downstream. So we need to update the property only if we are switching from a RT client
to non-RT client for the plane and vice-versa. So we should try to do the same thing here.

        is_rt = sde_crtc_is_rt_client(crtc, crtc->state);
        if (is_rt != psde->is_rt_pipe) {
                psde->is_rt_pipe = is_rt;
                pstate->dirty |= SDE_PLANE_DIRTY_QOS;
        }


        if (pstate->dirty & DPU_PLANE_DIRTY_QOS)
                _dpu_plane_set_qos_remap(plane);
Quoted 7 lines
Quoted 1 line
Quoted 1 line

Sounds great! Can you send the patch?

Will finalize approach and send the patch in a day or two.

Thanks

Abhinav

patch has been posted here for review : https://patchwork.freedesktop.org/patch/401929/