mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
Merge tag 'drm-misc-next-2021-01-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v5.12: Core Changes: - Lots of drm documentation updates by Simor Ser. - Require that each crtc has a unique primary plane. - Add fixme that fbdev_generic_setup is confusing. Driver Changes: - Update addresses for TI display drivers maintainers. - Make DRM_VIRTIO_GPU select VIRTIO. - Small fixes to qxl, virtio, hisilicon, tve200, panel/s6e63m0. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/fdfbfd7a-b91d-3f59-11c8-984704ce0ee1@linux.intel.com
This commit is contained in:
@@ -626,6 +626,9 @@ void drm_mode_config_validate(struct drm_device *dev)
|
||||
{
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_plane *plane;
|
||||
u32 primary_with_crtc = 0, cursor_with_crtc = 0;
|
||||
unsigned int num_primary = 0;
|
||||
|
||||
if (!drm_core_check_feature(dev, DRIVER_MODESET))
|
||||
return;
|
||||
@@ -642,17 +645,44 @@ void drm_mode_config_validate(struct drm_device *dev)
|
||||
WARN(!crtc->primary, "Missing primary plane on [CRTC:%d:%s]\n",
|
||||
crtc->base.id, crtc->name);
|
||||
|
||||
WARN(crtc->cursor && crtc->funcs->cursor_set,
|
||||
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_set func",
|
||||
crtc->base.id, crtc->name);
|
||||
WARN(crtc->cursor && crtc->funcs->cursor_set2,
|
||||
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_set2 func",
|
||||
crtc->base.id, crtc->name);
|
||||
WARN(crtc->cursor && crtc->funcs->cursor_move,
|
||||
"[CRTC:%d:%s] must not have both a cursor plane and a cursor_move func",
|
||||
crtc->base.id, crtc->name);
|
||||
|
||||
if (crtc->primary) {
|
||||
WARN(!(crtc->primary->possible_crtcs & drm_crtc_mask(crtc)),
|
||||
"Bogus primary plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n",
|
||||
crtc->primary->base.id, crtc->primary->name,
|
||||
crtc->base.id, crtc->name);
|
||||
WARN(primary_with_crtc & drm_plane_mask(crtc->primary),
|
||||
"Primary plane [PLANE:%d:%s] used for multiple CRTCs",
|
||||
crtc->primary->base.id, crtc->primary->name);
|
||||
primary_with_crtc |= drm_plane_mask(crtc->primary);
|
||||
}
|
||||
if (crtc->cursor) {
|
||||
WARN(!(crtc->cursor->possible_crtcs & drm_crtc_mask(crtc)),
|
||||
"Bogus cursor plane possible_crtcs: [PLANE:%d:%s] must be compatible with [CRTC:%d:%s]\n",
|
||||
crtc->cursor->base.id, crtc->cursor->name,
|
||||
crtc->base.id, crtc->name);
|
||||
WARN(cursor_with_crtc & drm_plane_mask(crtc->cursor),
|
||||
"Cursor plane [PLANE:%d:%s] used for multiple CRTCs",
|
||||
crtc->cursor->base.id, crtc->cursor->name);
|
||||
cursor_with_crtc |= drm_plane_mask(crtc->cursor);
|
||||
}
|
||||
}
|
||||
|
||||
drm_for_each_plane(plane, dev) {
|
||||
if (plane->type == DRM_PLANE_TYPE_PRIMARY)
|
||||
num_primary++;
|
||||
}
|
||||
|
||||
WARN(num_primary != dev->mode_config.num_crtc,
|
||||
"Must have as many primary planes as there are CRTCs, but have %u primary planes and %u CRTCs",
|
||||
num_primary, dev->mode_config.num_crtc);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user