mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 05:04:20 +00:00
drm/zte: 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: Rodrigo Siqueira <rodrigosiqueira@gmail.com> Tested-by: Rodrigo Siqueira <rodrigosiqueira@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Cc: Shawn Guo <shawnguo@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20191213172612.1514842-10-daniel.vetter@ffwll.ch
This commit is contained in:
parent
5d39b1574f
commit
ec0582ca89
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ static int zx_vl_plane_atomic_check(struct drm_plane *plane,
|
||||||
int min_scale = FRAC_16_16(1, 8);
|
int min_scale = FRAC_16_16(1, 8);
|
||||||
int max_scale = FRAC_16_16(8, 1);
|
int max_scale = FRAC_16_16(8, 1);
|
||||||
|
|
||||||
if (!crtc || !fb)
|
if (!crtc || WARN_ON(!fb))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
|
crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
|
||||||
|
@ -281,7 +281,7 @@ static int zx_gl_plane_atomic_check(struct drm_plane *plane,
|
||||||
struct drm_crtc *crtc = plane_state->crtc;
|
struct drm_crtc *crtc = plane_state->crtc;
|
||||||
struct drm_crtc_state *crtc_state;
|
struct drm_crtc_state *crtc_state;
|
||||||
|
|
||||||
if (!crtc || !fb)
|
if (!crtc || WARN_ON(!fb))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
|
crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue