aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_internal.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-09-07 09:32:13 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-09-10 07:10:36 +0200
commiteae06120f1974e1a4cab0f80f4b07d27eb80ab32 (patch)
treef2bf19a6891b5b6426e7743ed73f8ae0ac1a32ec /drivers/gpu/drm/drm_crtc_internal.h
parentdrm/virtio: Remove set but not used variable 'bo' (diff)
downloadlinux-dev-eae06120f1974e1a4cab0f80f4b07d27eb80ab32.tar.xz
linux-dev-eae06120f1974e1a4cab0f80f4b07d27eb80ab32.zip
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
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_internal.h')
-rw-r--r--drivers/gpu/drm/drm_crtc_internal.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_crtc_internal.h b/drivers/gpu/drm/drm_crtc_internal.h
index ede20b55d50c..86893448f486 100644
--- a/drivers/gpu/drm/drm_crtc_internal.h
+++ b/drivers/gpu/drm/drm_crtc_internal.h
@@ -182,6 +182,8 @@ void drm_fb_release(struct drm_file *file_priv);
int drm_mode_addfb(struct drm_device *dev, struct drm_mode_fb_cmd *or,
struct drm_file *file_priv);
+int drm_mode_addfb2(struct drm_device *dev,
+ void *data, struct drm_file *file_priv);
int drm_mode_rmfb(struct drm_device *dev, u32 fb_id,
struct drm_file *file_priv);
@@ -189,8 +191,8 @@ int drm_mode_rmfb(struct drm_device *dev, u32 fb_id,
/* IOCTL */
int drm_mode_addfb_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
-int drm_mode_addfb2(struct drm_device *dev,
- void *data, struct drm_file *file_priv);
+int drm_mode_addfb2_ioctl(struct drm_device *dev,
+ void *data, struct drm_file *file_priv);
int drm_mode_rmfb_ioctl(struct drm_device *dev,
void *data, struct drm_file *file_priv);
int drm_mode_getfb(struct drm_device *dev,