diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-12-13 20:26:09 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2020-01-28 17:42:43 +0300 |
commit | 021b7c7b3268292d1366cf4ec83309b478a06630 (patch) | |
tree | 4519cdc651e504c72cc03c33e3c93f3ca5be3038 /drivers/gpu/drm/vc4 | |
parent | fd907adeb793dc68a0353a8915abc37011bceae2 (diff) | |
download | linux-021b7c7b3268292d1366cf4ec83309b478a06630.tar.xz |
drm/vc4: 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: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-7-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r-- | drivers/gpu/drm/vc4/vc4_plane.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 4934127f0d76..91e408f7a56e 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b/drivers/gpu/drm/vc4/vc4_plane.c @@ -139,7 +139,7 @@ static enum vc4_scaling_mode vc4_get_scaling_mode(u32 src, u32 dst) static bool plane_enabled(struct drm_plane_state *state) { - return state->fb && state->crtc; + return state->fb && !WARN_ON(!state->crtc); } static struct drm_plane_state *vc4_plane_duplicate_state(struct drm_plane *plane) |