mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-05 22:25:16 +00:00
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>
This commit is contained in:
parent
0388df0508
commit
522cf91f30
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
struct drm_mode_config *config = &dev->mode_config;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
WARN_ON(primary && primary->type != DRM_PLANE_TYPE_PRIMARY);
|
||||||
|
WARN_ON(cursor && cursor->type != DRM_PLANE_TYPE_CURSOR);
|
||||||
|
|
||||||
crtc->dev = dev;
|
crtc->dev = dev;
|
||||||
crtc->funcs = funcs;
|
crtc->funcs = funcs;
|
||||||
crtc->invert_dimensions = false;
|
crtc->invert_dimensions = false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue