Skip to content

Commit fe0f5c6

Browse files
thomashvmwairlied
authored andcommitted
vmwgfx: Remove the update layout IOCTL.
It doesn't seem like its needed. If this turns out to be an incorrect assumption, we can reinstate it. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 781b8bd commit fe0f5c6

4 files changed

Lines changed: 0 additions & 57 deletions

File tree

‎drivers/gpu/drm/vmwgfx/vmwgfx_drv.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,6 @@
8585
#define DRM_IOCTL_VMW_FENCE_WAIT \
8686
DRM_IOWR(DRM_COMMAND_BASE + DRM_VMW_FENCE_WAIT, \
8787
struct drm_vmw_fence_wait_arg)
88-
#define DRM_IOCTL_VMW_UPDATE_LAYOUT \
89-
DRM_IOWR(DRM_COMMAND_BASE + DRM_VMW_UPDATE_LAYOUT, \
90-
struct drm_vmw_update_layout_arg)
91-
9288

9389
/**
9490
* The core DRM version of this macro doesn't account for
@@ -134,8 +130,6 @@ static struct drm_ioctl_desc vmw_ioctls[] = {
134130
DRM_AUTH | DRM_UNLOCKED),
135131
VMW_IOCTL_DEF(VMW_FENCE_WAIT, vmw_fence_wait_ioctl,
136132
DRM_AUTH | DRM_UNLOCKED),
137-
VMW_IOCTL_DEF(VMW_UPDATE_LAYOUT, vmw_kms_update_layout_ioctl,
138-
DRM_MASTER | DRM_CONTROL_ALLOW | DRM_UNLOCKED)
139133
};
140134

141135
static struct pci_device_id vmw_pci_id_list[] = {

‎drivers/gpu/drm/vmwgfx/vmwgfx_drv.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,6 @@ void vmw_kms_cursor_snoop(struct vmw_surface *srf,
508508
int vmw_kms_write_svga(struct vmw_private *vmw_priv,
509509
unsigned width, unsigned height, unsigned pitch,
510510
unsigned bpp, unsigned depth);
511-
int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
512-
struct drm_file *file_priv);
513511
void vmw_kms_idle_workqueues(struct vmw_master *vmaster);
514512
bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
515513
uint32_t pitch,

‎drivers/gpu/drm/vmwgfx/vmwgfx_kms.c‎

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,52 +1092,6 @@ int vmw_kms_restore_vga(struct vmw_private *vmw_priv)
10921092
return 0;
10931093
}
10941094

1095-
int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
1096-
struct drm_file *file_priv)
1097-
{
1098-
struct vmw_private *dev_priv = vmw_priv(dev);
1099-
struct drm_vmw_update_layout_arg *arg =
1100-
(struct drm_vmw_update_layout_arg *)data;
1101-
struct vmw_master *vmaster = vmw_master(file_priv->master);
1102-
void __user *user_rects;
1103-
struct drm_vmw_rect *rects;
1104-
unsigned rects_size;
1105-
int ret;
1106-
1107-
ret = ttm_read_lock(&vmaster->lock, true);
1108-
if (unlikely(ret != 0))
1109-
return ret;
1110-
1111-
if (!arg->num_outputs) {
1112-
struct drm_vmw_rect def_rect = {0, 0, 800, 600};
1113-
vmw_kms_ldu_update_layout(dev_priv, 1, &def_rect);
1114-
goto out_unlock;
1115-
}
1116-
1117-
rects_size = arg->num_outputs * sizeof(struct drm_vmw_rect);
1118-
rects = kzalloc(rects_size, GFP_KERNEL);
1119-
if (unlikely(!rects)) {
1120-
ret = -ENOMEM;
1121-
goto out_unlock;
1122-
}
1123-
1124-
user_rects = (void __user *)(unsigned long)arg->rects;
1125-
ret = copy_from_user(rects, user_rects, rects_size);
1126-
if (unlikely(ret != 0)) {
1127-
DRM_ERROR("Failed to get rects.\n");
1128-
ret = -EFAULT;
1129-
goto out_free;
1130-
}
1131-
1132-
vmw_kms_ldu_update_layout(dev_priv, arg->num_outputs, rects);
1133-
1134-
out_free:
1135-
kfree(rects);
1136-
out_unlock:
1137-
ttm_read_unlock(&vmaster->lock);
1138-
return ret;
1139-
}
1140-
11411095
bool vmw_kms_validate_mode_vram(struct vmw_private *dev_priv,
11421096
uint32_t pitch,
11431097
uint32_t height)

‎include/drm/vmwgfx_drm.h‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@
4949
#define DRM_VMW_REF_SURFACE 11
5050
#define DRM_VMW_EXECBUF 12
5151
#define DRM_VMW_FENCE_WAIT 13
52-
/* guarded by minor version >= 2 */
53-
#define DRM_VMW_UPDATE_LAYOUT 14
54-
5552

5653
/*************************************************************************/
5754
/**

0 commit comments

Comments
 (0)