Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 522cf91f authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Daniel Vetter
Browse files

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: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 0388df05
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;