summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_plane_helper.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-03-09 10:41:07 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-10 09:59:36 +0100
commit7eb5f302bbe78b88da8b2008c502c1975e75db05 (patch)
tree1b07b37cf0d9aa68712ad93d7da50a1b754bca44 /drivers/gpu/drm/drm_plane_helper.c
parentc484f02d0f02fbbfc6decc945a69aae011041a27 (diff)
downloadblackbird-obmc-linux-7eb5f302bbe78b88da8b2008c502c1975e75db05.tar.gz
blackbird-obmc-linux-7eb5f302bbe78b88da8b2008c502c1975e75db05.zip
drm: Check in setcrtc if the primary plane supports the fb pixel format
Drivers implementing the universal planes API report the list of supported pixel formats for the primary plane. Make sure the fb passed to the setcrtc ioctl is compatible. Drivers not implementing the universal planes API will have no format reported for the primary plane, skip the check in that case. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_plane_helper.c')
-rw-r--r--drivers/gpu/drm/drm_plane_helper.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 8e56783265e1..b62b03635050 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -353,6 +353,11 @@ static struct drm_plane *create_primary_plane(struct drm_device *dev)
if (primary == NULL) {
DRM_DEBUG_KMS("Failed to allocate primary plane\n");
return NULL;
+ /*
+ * Remove the format_default field from drm_plane when dropping
+ * this helper.
+ */
+ primary->format_default = true;
}
/* possible_crtc's will be filled in later by crtc_init */
OpenPOWER on IntegriCloud