From eae06120f1974e1a4cab0f80f4b07d27eb80ab32 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 7 Sep 2018 09:32:13 +0200 Subject: 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 Reviewed-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20180907073213.20410-1-kraxel@redhat.com --- drivers/gpu/drm/drm_crtc_internal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/drm/drm_crtc_internal.h') 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, -- cgit v1.2.3-59-g8ed1b