Skip to content

Commit 4c978ca

Browse files
Kalyan Thotarobclark
authored andcommitted
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 <[email protected]> Tested-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent ccc862b commit 4c978ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -866,9 +866,9 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
866866
crtc_state = drm_atomic_get_new_crtc_state(state->state,
867867
state->crtc);
868868

869-
min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxdwnscale);
869+
min_scale = FRAC_16_16(1, pdpu->pipe_sblk->maxupscale);
870870
ret = drm_atomic_helper_check_plane_state(state, crtc_state, min_scale,
871-
pdpu->pipe_sblk->maxupscale << 16,
871+
pdpu->pipe_sblk->maxdwnscale << 16,
872872
true, true);
873873
if (ret) {
874874
DPU_DEBUG_PLANE(pdpu, "Check plane state failed (%d)\n", ret);

0 commit comments

Comments
 (0)