summaryrefslogtreecommitdiff
path: root/drm_ioc32.c
diff options
context:
space:
mode:
authorSinclair Yeh <syeh@vmware.com>2017-05-19 22:57:06 -0700
committerSinclair Yeh <syeh@vmware.com>2017-06-14 19:39:41 +0200
commit3c5a89bce93a6b19eb4580411196c04abff094bf (patch)
tree2b671166ad6ee92d523809b33211313b802c3eb4 /drm_ioc32.c
parent90732761ce998497c52a0997721e244a942b88ec (diff)
vmwgfx: Update stand alone to v4.11
* Skipped update to drm_mm and drm_vma_manager because the switch to using interval tree makes porting difficult. * Added memdup_user_nul(), but replaced kmalloc_track_caller() with kmalloc() due to a compilation error. * Removed building and usage of debugfs_crc * VMWGFX_COMPAT_NO_VAF no longer seems to be required * Tested on CentOS 6.5, RHEL 6.8: 2.6.32-696 RHEL 7.3: 3.10.0-514 Ubuntu 14.04: 4.2.0-35 Ubuntu 16.04: 4.4.0-78 Ubuntu 16.04: 4.12-rc1 Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Diffstat (limited to 'drm_ioc32.c')
-rw-r--r--drm_ioc32.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drm_ioc32.c b/drm_ioc32.c
index a788e93..2ca4d62 100644
--- a/drm_ioc32.c
+++ b/drm_ioc32.c
@@ -32,7 +32,6 @@
#include <linux/export.h>
#include "drmP.h"
-#include "drm_core.h"
#define DRM_IOCTL_VERSION32 DRM_IOWR(0x00, drm_version32_t)
#define DRM_IOCTL_GET_UNIQUE32 DRM_IOWR(0x01, drm_unique32_t)
@@ -346,6 +345,7 @@ static int compat_drm_getstats(struct file *file, unsigned int cmd,
struct drm_stats __user *stats;
int i, err;
+ memset(&s32, 0, sizeof(drm_stats32_t));
stats = compat_alloc_user_space(sizeof(*stats));
if (!stats)
return -EFAULT;
@@ -1017,6 +1017,7 @@ static int compat_drm_wait_vblank(struct file *file, unsigned int cmd,
return 0;
}
+#if defined(CONFIG_X86) || defined(CONFIG_IA64)
typedef struct drm_mode_fb_cmd232 {
u32 fb_id;
u32 width;
@@ -1073,6 +1074,7 @@ static int compat_drm_mode_addfb2(struct file *file, unsigned int cmd,
return 0;
}
+#endif
static drm_ioctl_compat_t *drm_compat_ioctls[] = {
[DRM_IOCTL_NR(DRM_IOCTL_VERSION32)] = compat_drm_version,
@@ -1108,7 +1110,9 @@ static drm_ioctl_compat_t *drm_compat_ioctls[] = {
[DRM_IOCTL_NR(DRM_IOCTL_UPDATE_DRAW32)] = compat_drm_update_draw,
#endif
[DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK32)] = compat_drm_wait_vblank,
+#if defined(CONFIG_X86) || defined(CONFIG_IA64)
[DRM_IOCTL_NR(DRM_IOCTL_MODE_ADDFB232)] = compat_drm_mode_addfb2,
+#endif
};
/**