From b45fe49bcd989be4e1327c13dd734410b395761c Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Sat, 26 Apr 2008 17:11:18 -0700 Subject: Enum-ectomy of vblank modesetting ioctl Enum can be of pretty much any size since C leaves the choice of size up to the implementation. So avoid using it in new interfaces like the vblank pre- & post-modeset ioctl. Thanks to hch for spotting this. --- shared-core/drm.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index 5981dcb8..da149dca 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -555,10 +555,9 @@ union drm_wait_vblank { struct drm_wait_vblank_reply reply; }; -enum drm_modeset_ctl_cmd { - _DRM_PRE_MODESET = 1, - _DRM_POST_MODESET = 2, -}; + +#define _DRM_PRE_MODESET 1 +#define _DRM_POST_MODESET 2 /** * DRM_IOCTL_MODESET_CTL ioctl argument type @@ -567,7 +566,7 @@ enum drm_modeset_ctl_cmd { */ struct drm_modeset_ctl { unsigned long arg; - enum drm_modeset_ctl_cmd cmd; + int cmd; }; /** -- cgit v1.2.3 From 7f8e4060859651993921281445ec00940c577222 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Sun, 27 Apr 2008 09:42:17 -0700 Subject: Use fixed sized types in new ioctls Make both crtc and the command argument 32 bits to avoid any 32-on-64 compat issues. --- shared-core/drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'shared-core/drm.h') diff --git a/shared-core/drm.h b/shared-core/drm.h index da149dca..52b01cd1 100644 --- a/shared-core/drm.h +++ b/shared-core/drm.h @@ -565,8 +565,8 @@ union drm_wait_vblank { * \sa drmModesetCtl(). */ struct drm_modeset_ctl { - unsigned long arg; - int cmd; + uint32_t crtc; + uint32_t cmd; }; /** -- cgit v1.2.3