summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_crtc.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2015-03-17 12:05:29 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-17 14:03:04 +0100
commit522cf91f30cb0102fd5cb6e8979d45b6151cdcfc (patch)
tree733281edb07603f4a89ed30deb3ec037b30faf47 /drivers/gpu/drm/drm_crtc.c
parent0388df05088def7ce5f3dd1b2293f05739be2a23 (diff)
drm: check that planes types are correct while initializing CRTC
Be warned if primary or cursor planes haven't the correct type Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r--drivers/gpu/drm/drm_crtc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 5785336695ca..111849c4c8c2 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -659,6 +659,9 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_mode_config *config = &dev->mode_config;
int ret;
+ WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
+ WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
+
crtc->dev = dev;
crtc->funcs = funcs;
crtc->invert_dimensions = false;