diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 2d1039aa2dcf0..86207f2394d85 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -1129,7 +1129,8 @@ static int vc4_plane_mode_set(struct drm_plane *plane, width = vc4_state->src_w[0] >> 16; height = vc4_state->src_h[0] >> 16; - if (!width || !height || !vc4_state->crtc_w || !vc4_state->crtc_h) { + if (!vc4_state->src_w[0] || !vc4_state->src_h[0] || + !vc4_state->crtc_w || !vc4_state->crtc_h) { /* 0 source size probably means the plane is offscreen */ vc4_state->dlist_initialized = 1; return 0; @@ -1656,7 +1657,8 @@ static int vc6_plane_mode_set(struct drm_plane *plane, width = vc4_state->src_w[0] >> 16; height = vc4_state->src_h[0] >> 16; - if (!width || !height || !vc4_state->crtc_w || !vc4_state->crtc_h) { + if (!vc4_state->src_w[0] || !vc4_state->src_h[0] || + !vc4_state->crtc_w || !vc4_state->crtc_h) { /* 0 source size probably means the plane is offscreen. * 0 destination size is a redundant plane. */