From: Icenowy Zheng Date: Tue, 31 Mar 2026 06:01:25 +0000 (+0800) Subject: drm: verisilicon: call atomic helper's plane state check even if no CRTC X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=eae3903e33797a28d0d37e693d4314d58338918e;p=thirdparty%2Flinux.git drm: verisilicon: call atomic helper's plane state check even if no CRTC The `drm_atomic_helper_check_plane_state()` helper function needs to be called even if the plane is bound to no CRTCs. Remove the early return in the primary plane's atomic_check, and use NULL for crtc_state in this situation. Fixes: dbf21777caa8 ("drm: verisilicon: add a driver for Verisilicon display controllers") Signed-off-by: Icenowy Zheng Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patch.msgid.link/20260331060126.1291966-4-zhengxingda@iscas.ac.cn --- diff --git a/drivers/gpu/drm/verisilicon/vs_primary_plane.c b/drivers/gpu/drm/verisilicon/vs_primary_plane.c index bad0bc5e3242..421d6f9dc547 100644 --- a/drivers/gpu/drm/verisilicon/vs_primary_plane.c +++ b/drivers/gpu/drm/verisilicon/vs_primary_plane.c @@ -26,14 +26,10 @@ static int vs_primary_plane_atomic_check(struct drm_plane *plane, struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); struct drm_crtc *crtc = new_plane_state->crtc; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *crtc_state = NULL; - if (!crtc) - return 0; - - crtc_state = drm_atomic_get_new_crtc_state(state, crtc); - if (WARN_ON(!crtc_state)) - return -EINVAL; + if (crtc) + crtc_state = drm_atomic_get_new_crtc_state(state, crtc); return drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,