@@ -1027,6 +1027,8 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
max_linewidth = pdpu->catalog->caps->max_linewidth;
+ fmt = to_dpu_format(msm_framebuffer_format(new_plane_state->fb));
+
if (drm_rect_width(&pipe_cfg->src_rect) > max_linewidth) {
/* struct dpu_crtc_state *cstate = to_dpu_crtc_state(crtc_state); */
@@ -1067,8 +1069,6 @@ static int dpu_plane_atomic_check(struct drm_plane *plane,
r_pipe_cfg->dst_rect.x1 = pipe_cfg->dst_rect.x2;
}
- fmt = to_dpu_format(msm_framebuffer_format(new_plane_state->fb));
-
ret = dpu_plane_atomic_check_pipe(pdpu, pipe, pipe_cfg, fmt);
if (ret)
return ret;
dpu_plane_atomic_check() checks for the format to make sure its not YUV before using multirect. However the format is not initialized before this. This causes a compilation issue and also would not work if YUV content is tried. Fix it by setting the format before the check. Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com> --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)