diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2017-01-02 16:09:59 +0100 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2017-01-03 10:23:02 +0100 |
commit | dcafc45dcb6d8bb6d159ed0a903bd0f3de597fac (patch) | |
tree | 05b4d0a7ac9ac8017bddbfbe50bbc25af9efca19 /drivers/gpu | |
parent | 0c744ea4f77d72b3dcebb7a8f2684633ec79be88 (diff) |
drm/meson: Fix plane atomic check when no crtc for the plane
When no CRTC is associated with the plane, the meson_plane_atomic_check()
call breaks the kernel with an Oops.
Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller")
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/meson/meson_plane.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c index 4942ca090b46..7890e30eb584 100644 --- a/drivers/gpu/drm/meson/meson_plane.c +++ b/drivers/gpu/drm/meson/meson_plane.c @@ -51,6 +51,9 @@ static int meson_plane_atomic_check(struct drm_plane *plane, struct drm_crtc_state *crtc_state; struct drm_rect clip = { 0, }; + if (!state->crtc) + return 0; + crtc_state = drm_atomic_get_crtc_state(state->state, state->crtc); if (IS_ERR(crtc_state)) return PTR_ERR(crtc_state); |