Skip to content

Commit 2f8bed9

Browse files
vldlylumag
authored andcommitted
drm/msm/dpu: Fix pixel extension sub-sampling
In _dpu_plane_setup_pixel_ext function instead of dividing just chroma source resolution once (component 1 and 2), second component is divided once more because src_w and src_h variable is reused between iterations. Third component receives wrong source resolution too (from component 2). To fix this introduce temporary variables for each iteration. Fixes: dabfdd8 ("drm/msm/disp/dpu1: add inline rotation support for sc7280") Signed-off-by: Vladimir Lypak <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/681921/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 425da33 commit 2f8bed9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,13 +500,15 @@ static void _dpu_plane_setup_pixel_ext(struct dpu_hw_scaler3_cfg *scale_cfg,
500500
int i;
501501

502502
for (i = 0; i < DPU_MAX_PLANES; i++) {
503+
uint32_t w = src_w, h = src_h;
504+
503505
if (i == DPU_SSPP_COMP_1_2 || i == DPU_SSPP_COMP_2) {
504-
src_w /= chroma_subsmpl_h;
505-
src_h /= chroma_subsmpl_v;
506+
w /= chroma_subsmpl_h;
507+
h /= chroma_subsmpl_v;
506508
}
507509

508-
pixel_ext->num_ext_pxls_top[i] = src_h;
509-
pixel_ext->num_ext_pxls_left[i] = src_w;
510+
pixel_ext->num_ext_pxls_top[i] = h;
511+
pixel_ext->num_ext_pxls_left[i] = w;
510512
}
511513
}
512514

0 commit comments

Comments
 (0)