Commit 9dd3cb24 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm: move quirk_addfb_prefer_xbgr_30bpp handling to drm_driver_legacy_fb_format too

Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20180921134704.12826-7-kraxel@redhat.com
parent 42fd9e6c
...@@ -121,6 +121,11 @@ uint32_t drm_driver_legacy_fb_format(struct drm_device *dev, ...@@ -121,6 +121,11 @@ uint32_t drm_driver_legacy_fb_format(struct drm_device *dev,
if (fmt == DRM_FORMAT_XRGB1555) if (fmt == DRM_FORMAT_XRGB1555)
fmt = DRM_FORMAT_HOST_XRGB1555; fmt = DRM_FORMAT_HOST_XRGB1555;
} }
if (dev->mode_config.quirk_addfb_prefer_xbgr_30bpp &&
fmt == DRM_FORMAT_XRGB2101010)
fmt = DRM_FORMAT_XBGR2101010;
return fmt; return fmt;
} }
EXPORT_SYMBOL(drm_driver_legacy_fb_format); EXPORT_SYMBOL(drm_driver_legacy_fb_format);
......
...@@ -129,10 +129,6 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or, ...@@ -129,10 +129,6 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
r.pitches[0] = or->pitch; r.pitches[0] = or->pitch;
r.handles[0] = or->handle; 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;
ret = drm_mode_addfb2(dev, &r, file_priv); ret = drm_mode_addfb2(dev, &r, file_priv);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment