]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Only use compat ioctl for addfb2 on X86/IA64
authorKristian H. Kristensen <hoegsberg@gmail.com>
Tue, 13 Sep 2016 21:20:45 +0000 (14:20 -0700)
committerSean Paul <seanpaul@chromium.org>
Thu, 15 Sep 2016 14:42:11 +0000 (10:42 -0400)
commit579eadf1c148d488ed0a8da9a3aed64a5efe3cac
tree468e8a20c642a6f40bea2f1e5668e10d47942985
parent8eba3b090d5b1d4a2bd8653d3fc7c1f4005a1d23
drm: Only use compat ioctl for addfb2 on X86/IA64

Similar to struct drm_update_draw, struct drm_mode_fb_cmd2 has an
unaligned 64 bit field (modifier). This get packed differently between
32 bit and 64 bit modes on architectures that can handle unaligned 64
bit access (X86 and IA64).  Other architectures pack the structs the
same and don't need the compat wrapper. Use the same condition for
drm_mode_fb_cmd2 as we use for drm_update_draw.

Note that only the modifier will be packed differently between compat
and non-compat versions.

Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
[seanpaul added not at bottom of commit msg re: modifier]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1473801645-116011-1-git-send-email-hoegsberg@chromium.org
drivers/gpu/drm/drm_ioc32.c