Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/msm/dpu: Fix scale params in plane validation

Plane validation uses an API drm_calc_scale which will
return src/dst value as a scale ratio.

when viewing the range on a scale the values should fall in as

Upscale ratio < Unity scale < Downscale ratio for src/dst formula

Fix the min and max scale ratios to suit the API accordingly.

Signed-off-by: Kalyan Thota <kalyan_t@codeaurora.org>
Tested-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Kalyan Thota and committed by
Rob Clark
4c978caf ccc862b9

+2 -2
+2 -2
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
··· 866 866 crtc_state = drm_atomic_get_new_crtc_state(state->state, 867 867 state->crtc); 868 868 869 - min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxdwnscale); 869 + min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxupscale); 870 870 ret = drm_atomic_helper_check_plane_state(state, crtc_state, min_scale, 871 - pdpu->pipe_sblk->maxupscale << 16, 871 + pdpu->pipe_sblk->maxdwnscale << 16, 872 872 true, true); 873 873 if (ret) { 874 874 DPU_DEBUG_PLANE(pdpu, "Check plane state failed (%d)\n", ret);