]> git.baikalelectronics.ru Git - kernel.git/commit
drm: refuse ADDFB2 ioctl for broken bigendian drivers
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 7 Sep 2018 07:32:13 +0000 (09:32 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 10 Sep 2018 05:10:36 +0000 (07:10 +0200)
commit68c508ce00a4097364fce715defd1f3d11370695
treef2bf19a6891b5b6426e7743ed73f8ae0ac1a32ec
parentc081188a2f4e5b227b5705393a289764d18164a3
drm: refuse ADDFB2 ioctl for broken bigendian drivers

Drivers must set the quirk_addfb_prefer_host_byte_order quirk to make
the drm_mode_addfb() compat code work correctly on bigendian machines.

If they don't they interpret pixel_format values incorrectly for bug
compatibility, which in turn implies the ADDFB2 ioctl does not work
correctly then.  So block it to make userspace fallback to ADDFB.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20180907073213.20410-1-kraxel@redhat.com
drivers/gpu/drm/drm_crtc_internal.h
drivers/gpu/drm/drm_framebuffer.c
drivers/gpu/drm/drm_ioctl.c