From: Benjamin Gaignard Date: Tue, 17 Mar 2015 11:05:29 +0000 (+0100) Subject: drm: check that planes types are correct while initializing CRTC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=522cf91f30cb0102fd5cb6e8979d45b6151cdcfc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Daniel Vetter --- 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;