drm/msm/dpu: request for display color blocks based on hw catalog entry
PATCH 1/1 drm/msm/dpu: request for display color blocks based on hw catalog entry
From: Kalyan Thota <[email protected]>
Request for color processing blocks only if they are available in the display hw catalog and they are sufficient in number for the selection.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +8 -4
@@ -521,7 +521,7 @@ static struct msm_display_topology dpu_encoder_get_topology(struct dpu_kms *dpu_kms, struct drm_display_mode *mode) { - struct msm_display_topology topology; + struct msm_display_topology topology = {0};int i, intf_count =0 ;for (i =0 ; i <MAX_PHYS_ENCODERS_PER_VIRTUAL ; i++)
@@ -537,7 +537,8 @@ static struct msm_display_topology dpu_encoder_get_topology(* 1 LM, 1 INTF * 2 LM, 1 INTF (stream merge to support high resolution interfaces) * -* Adding color blocks only to primary interface +* Adding color blocks only to primary interface if available in +* sufficient number */ if (intf_count ==2 ) topology.num_lm =2 ;
@@ -546,8 +547,11 @@ static struct msm_display_topology dpu_encoder_get_topology(else topology.num_lm = (mode->hdisplay >MAX_HDISPLAY_SPLIT ) ?2 :1 ; -if (dpu_enc->disp_info.intf_type ==DRM_MODE_ENCODER_DSI ) - topology.num_dspp = topology.num_lm; +if (dpu_enc->disp_info.intf_type ==DRM_MODE_ENCODER_DSI ) { +if (dpu_kms->catalog->dspp && + (dpu_kms->catalog->dspp_count >= topology.num_lm)) + topology.num_dspp = topology.num_lm; + } topology.num_enc =0 ; topology.num_intf = intf_count;
Signature · 1 line
1.9.1
Quoted 7 lines · Krishna Manikandan
From: Kalyan Thota <[email protected]>
Request for color processing blocks only if they are available in the display hw catalog and they are sufficient in number for the selection.
I believe this should have:
blocks in dpu driver")
Quoted 43 lines
Signed-off-by Kalyan Thota <[email protected]>--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +8
-5@@ -521,7 +521,7 @@ static struct msm_display_topology dpu_encoder_get_topology(struct dpu_kms *dpu_kms, struct drm_display_mode *mode) { - struct msm_display_topology topology; + struct msm_display_topology topology = {0};int i, intf_count =0 ;for (i =0 ; i <MAX_PHYS_ENCODERS_PER_VIRTUAL ; i++)@@ -537,7 +537,8 @@ static struct msm_display_topology dpu_encoder_get_topology(* 1 LM, 1 INTF * 2 LM, 1 INTF (stream merge to support high resolution interfaces) * -* Adding color blocks only to primary interface +* Adding color blocks only to primary interface if available in +* sufficient number */ if (intf_count ==2 ) topology.num_lm =2 ;@@ -546,8 +547,11 @@ static struct msm_display_topology dpu_encoder_get_topology(else topology.num_lm = (mode->hdisplay >MAX_HDISPLAY_SPLIT ) ?2 :1 ; -if (dpu_enc->disp_info.intf_type ==DRM_MODE_ENCODER_DSI ) - topology.num_dspp = topology.num_lm; +if (dpu_enc->disp_info.intf_type ==DRM_MODE_ENCODER_DSI ) { +if (dpu_kms->catalog->dspp && + (dpu_kms->catalog->dspp_count >= topology.num_lm)) + topology.num_dspp = topology.num_lm; + } topology.num_enc =0 ; topology.num_intf = intf_count; --
Quoted 2 lines
1.9.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Krishna Manikandan
From: Kalyan Thota <[email protected]>
Request for color processing blocks only if they are available in the display hw catalog and they are sufficient in number for the selection.
Signed-off-by Kalyan Thota <[email protected]>
Thanks so much for the quick fix!
-john