diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-05 02:04:40 -0400 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-06 02:40:17 -0400 |
commit | 0e94043ee1d98d5112aa4e1d68733b0197dfdafa (patch) | |
tree | e5949e9af5a6b8db8ffff4e850283dcddebfca43 /drivers/gpu | |
parent | 3ee22b769fd761c98eeaceab49153c3eb7612821 (diff) |
drm: replace DRIVER_PREFER_XBGR_30BPP driver flag with mode_config quirk
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20180905060445.15008-2-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/drm_framebuffer.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_framebuffer.c b/drivers/gpu/drm/drm_framebuffer.c index 781af1d42d76..17b7b8944de5 100644 --- a/drivers/gpu/drm/drm_framebuffer.c +++ b/drivers/gpu/drm/drm_framebuffer.c | |||
@@ -120,8 +120,8 @@ int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or, | |||
120 | r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth); | 120 | r.pixel_format = drm_mode_legacy_fb_format(or->bpp, or->depth); |
121 | r.handles[0] = or->handle; | 121 | r.handles[0] = or->handle; |
122 | 122 | ||
123 | if (r.pixel_format == DRM_FORMAT_XRGB2101010 && | 123 | if (dev->mode_config.quirk_addfb_prefer_xbgr_30bpp && |
124 | dev->driver->driver_features & DRIVER_PREFER_XBGR_30BPP) | 124 | r.pixel_format == DRM_FORMAT_XRGB2101010) |
125 | r.pixel_format = DRM_FORMAT_XBGR2101010; | 125 | r.pixel_format = DRM_FORMAT_XBGR2101010; |
126 | 126 | ||
127 | ret = drm_mode_addfb2(dev, &r, file_priv); | 127 | ret = drm_mode_addfb2(dev, &r, file_priv); |
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 8412119bd940..a9bb656058e5 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c | |||
@@ -2174,7 +2174,7 @@ nv50_display_create(struct drm_device *dev) | |||
2174 | nouveau_display(dev)->fini = nv50_display_fini; | 2174 | nouveau_display(dev)->fini = nv50_display_fini; |
2175 | disp->disp = &nouveau_display(dev)->disp; | 2175 | disp->disp = &nouveau_display(dev)->disp; |
2176 | dev->mode_config.funcs = &nv50_disp_func; | 2176 | dev->mode_config.funcs = &nv50_disp_func; |
2177 | dev->driver->driver_features |= DRIVER_PREFER_XBGR_30BPP; | 2177 | dev->mode_config.quirk_addfb_prefer_xbgr_30bpp = true; |
2178 | 2178 | ||
2179 | /* small shared memory area we use for notifiers and semaphores */ | 2179 | /* small shared memory area we use for notifiers and semaphores */ |
2180 | ret = nouveau_bo_new(&drm->client, 4096, 0x1000, TTM_PL_FLAG_VRAM, | 2180 | ret = nouveau_bo_new(&drm->client, 4096, 0x1000, TTM_PL_FLAG_VRAM, |