]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
drm/nouveau: prefer XBGR2101010 for addfb ioctl
authorIlia Mirkin <imirkin@alum.mit.edu>
Sat, 3 Feb 2018 19:11:23 +0000 (14:11 -0500)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 15 Mar 2018 21:28:55 +0000 (18:28 -0300)
commit29bc2ca6515bf66791e8819117e0e00186b05545
tree77e6fd55b4ebd65a0bf72237a72d66c5a25edd01
parent47dc483262ced8a834116c8ee07731faf32c5fca
drm/nouveau: prefer XBGR2101010 for addfb ioctl

BugLink: http://bugs.launchpad.net/bugs/1756100
commit c20bb155c2c5acb775f68be5d84fe679687c3c1e upstream.

Nouveau only exposes support for XBGR2101010. Prior to the atomic
conversion, drm would pass in the wrong format in the framebuffer, but
it was always ignored -- both userspace (xf86-video-nouveau) and the
kernel driver agreed on the layout, so the fact that the format was
wrong didn't matter.

With the atomic conversion, nouveau all of a sudden started caring about
the exact format, and so the previously-working code in
xf86-video-nouveau no longer functioned since the (internally-assigned)
format from the addfb ioctl was wrong.

This change adds infrastructure to allow a drm driver to specify that it
prefers the XBGR format variant for the addfb ioctl, and makes nouveau's
nv50 display driver set it. (Prior gens had no support for 30bpp at all.)

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: stable@vger.kernel.org # v4.10+
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180203191123.31507-1-imirkin@alum.mit.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/gpu/drm/drm_framebuffer.c
drivers/gpu/drm/nouveau/nv50_display.c
include/drm/drm_drv.h