Backmerge tag 'v4.16-rc7' into drm-next
Linux 4.16-rc7 This was requested by Daniel, and things were getting a bit hard to reconcile, most of the conflicts were trivial though.
This commit is contained in:
@@ -121,6 +121,10 @@ int drm_mode_addfb(struct drm_device *dev,
|
||||
r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth);
|
||||
r.handles[0] = or->handle;
|
||||
|
||||
if (r.pixel_format == DRM_FORMAT_XRGB2101010 &&
|
||||
dev->driver->driver_features & DRIVER_PREFER_XBGR_30BPP)
|
||||
r.pixel_format = DRM_FORMAT_XBGR2101010;
|
||||
|
||||
ret = drm_mode_addfb2(dev, &r, file_priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
@@ -458,6 +462,12 @@ int drm_mode_getfb(struct drm_device *dev,
|
||||
if (!fb)
|
||||
return -ENOENT;
|
||||
|
||||
/* Multi-planar framebuffers need getfb2. */
|
||||
if (fb->format->num_planes > 1) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
r->height = fb->height;
|
||||
r->width = fb->width;
|
||||
r->depth = fb->format->depth;
|
||||
@@ -481,6 +491,7 @@ int drm_mode_getfb(struct drm_device *dev,
|
||||
ret = -ENODEV;
|
||||
}
|
||||
|
||||
out:
|
||||
drm_framebuffer_put(fb);
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user