Skip to content

Commit 5002444

Browse files
committed
drm/msm/dpu: use drm_rect_fp_to_int()
Use the drm_rect_fp_to_int() helper instead of using the hand-written code. Reviewed-by: Abhinav Kumar <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/621476/ Link: https://lore.kernel.org/r/[email protected]
1 parent 26d841f commit 5002444

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,8 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
829829
return -EINVAL;
830830
}
831831

832-
pipe_cfg->src_rect = new_plane_state->src;
833-
834832
/* state->src is 16.16, src_rect is not */
835-
pipe_cfg->src_rect.x1 >>= 16;
836-
pipe_cfg->src_rect.x2 >>= 16;
837-
pipe_cfg->src_rect.y1 >>= 16;
838-
pipe_cfg->src_rect.y2 >>= 16;
833+
drm_rect_fp_to_int(&pipe_cfg->src_rect, &new_plane_state->src);
839834

840835
pipe_cfg->dst_rect = new_plane_state->dst;
841836

0 commit comments

Comments
 (0)