Commit fd907ade authored by Daniel Vetter's avatar Daniel Vetter

drm/rockchip: plane_state->fb iff plane_state->crtc

Checking both is one too much, so wrap a WARN_ON around it to stope
the copypasta.
Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Sandy Huang <hjc@rock-chips.com>
Cc: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-rockchip@lists.infradead.org
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-6-daniel.vetter@ffwll.ch
parent 4efb3131
...@@ -724,7 +724,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane, ...@@ -724,7 +724,7 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
int max_scale = win->phy->scl ? FRAC_16_16(8, 1) : int max_scale = win->phy->scl ? FRAC_16_16(8, 1) :
DRM_PLANE_HELPER_NO_SCALING; DRM_PLANE_HELPER_NO_SCALING;
if (!crtc || !fb) if (!crtc || WARN_ON(!fb))
return 0; return 0;
crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc); crtc_state = drm_atomic_get_existing_crtc_state(state->state, crtc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment