summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_framebuffer.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2018-09-28 09:31:03 +1000
committerDave Airlie <airlied@redhat.com>2018-09-28 09:36:48 +1000
commit156e60bc71aa31a3b42b1d66a822c2999bd0994c (patch)
treedbc2fa3c30c78b1465aa29ca37fefbb8a16bde8e /drivers/gpu/drm/drm_framebuffer.c
parentbf78296ab1cb215d0609ac6cff4e43e941e51265 (diff)
parentc2b70ffcd34eca60013d90bd6cd56e60b07adef8 (diff)
Merge tag 'drm-misc-next-2018-09-27' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 4.20: UAPI Changes: - None Cross-subsystem Changes: - MAINTAINERS: Move udl, mxsfb, and fsl-dcu into drm-misc (Stefan, Sean) Core Changes: - syncobj: Check condition before returning timeout in schedule() (Chris) Driver Changes: - various: First wave of drm_fbdev_generic_setup() conversions (Noralf) - bochs/virtio: More format byte-order improvements (Gerd) - mxsfb: A couple fixes + add runtime pm support (Leonard) - virtio: Add vmap support for prime objects (Ezequiel) Cc: Stefan Agner <stefan@agner.ch> Cc: Sean Paul <sean@poorly.run> Cc: Noralf Trønnes <noralf@tronnes.org> Cc: Gerd Hoffman <kraxel@redhat.com> Cc: Leonard Crestez <leonard.crestez@nxp.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20180927093950.GA180365@art_vandelay
Diffstat (limited to 'drivers/gpu/drm/drm_framebuffer.c')
-rw-r--r--drivers/gpu/drm/drm_framebuffer.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c
index 1ee3d6b44280..3bf729d0aae5 100644
--- a/drivers/gpu/drm/drm_framebuffer.c
+++ b/drivers/gpu/drm/drm_framebuffer.c
@@ -116,7 +116,7 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
if (!drm_core_check_feature(dev, DRIVER_MODESET))
return -EOPNOTSUPP;
- r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth);
+ r.pixel_format = drm_driver_legacy_fb_format(dev, or->bpp, or->depth);
if (r.pixel_format == DRM_FORMAT_INVALID) {
DRM_DEBUG("bad {bpp:%d, depth:%d}\n", or->bpp, or->depth);
return -EINVAL;
@@ -129,21 +129,6 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
r.pitches[0] = or->pitch;
r.handles[0] = or->handle;
- if (dev->mode_config.quirk_addfb_prefer_xbgr_30bpp &&
- r.pixel_format == DRM_FORMAT_XRGB2101010)
- r.pixel_format = DRM_FORMAT_XBGR2101010;
-
- if (dev->mode_config.quirk_addfb_prefer_host_byte_order) {
- if (r.pixel_format == DRM_FORMAT_XRGB8888)
- r.pixel_format = DRM_FORMAT_HOST_XRGB8888;
- if (r.pixel_format == DRM_FORMAT_ARGB8888)
- r.pixel_format = DRM_FORMAT_HOST_ARGB8888;
- if (r.pixel_format == DRM_FORMAT_RGB565)
- r.pixel_format = DRM_FORMAT_HOST_RGB565;
- if (r.pixel_format == DRM_FORMAT_XRGB1555)
- r.pixel_format = DRM_FORMAT_HOST_XRGB1555;
- }
-
ret = drm_mode_addfb2(dev, &r, file_priv);
if (ret)
return ret;