summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2015-06-26 02:22:40 -0700
committerThomas Hellstrom <thellstrom@vmware.com>2015-08-05 14:01:09 +0200
commit6bf6bf03b37b5ba0f3399fa9bb3d62edfa117c87 (patch)
treef09e4ecc302cd792b98baacec3704c4f8b1dfe87 /drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
parent10b1e0ca9c32deb3a9b0ecc93fc4920fc24b4a57 (diff)
downloadlinux-stable-6bf6bf03b37b5ba0f3399fa9bb3d62edfa117c87.tar.gz
linux-stable-6bf6bf03b37b5ba0f3399fa9bb3d62edfa117c87.tar.bz2
linux-stable-6bf6bf03b37b5ba0f3399fa9bb3d62edfa117c87.zip
drm/vmwgfx: Convert screen targets to new helpers v3
Also implements the missing readback function and fixes page flip in case of no event. v2: - Adapt to the work done for screen targets for 2d, in particular Handle proxy surface updates. - Remove execbuf quirks since we now use fifo reserve / commit. - Revert the initial placement of vmw dma buffers. v3: Address review comments. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 698a0e2add53..64dba53ca54c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -675,16 +675,11 @@ static int vmw_cmd_surface_copy_check(struct vmw_private *dev_priv,
cmd = container_of(header, struct vmw_sid_cmd, header);
- if (!(sw_context->quirks & VMW_QUIRK_SRC_SID_OK)) {
- ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
- user_surface_converter,
- &cmd->body.src.sid, NULL);
- if (ret != 0)
- return ret;
- }
-
- if (sw_context->quirks & VMW_QUIRK_DST_SID_OK)
- return 0;
+ ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
+ user_surface_converter,
+ &cmd->body.src.sid, NULL);
+ if (ret)
+ return ret;
return vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
user_surface_converter,
@@ -1266,9 +1261,6 @@ static int vmw_cmd_dma(struct vmw_private *dev_priv,
if (unlikely(suffix->maximumOffset > bo_size))
suffix->maximumOffset = bo_size;
- if (sw_context->quirks & VMW_QUIRK_DST_SID_OK)
- goto out_no_surface;
-
ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
user_surface_converter, &cmd->dma.host.sid,
NULL);
@@ -1507,9 +1499,6 @@ static int vmw_cmd_update_gb_image(struct vmw_private *dev_priv,
cmd = container_of(header, struct vmw_gb_surface_cmd, header);
- if (sw_context->quirks & VMW_QUIRK_SRC_SID_OK)
- return 0;
-
return vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
user_surface_converter,
&cmd->body.image.sid, NULL);
@@ -2554,7 +2543,6 @@ int vmw_execbuf_process(struct drm_file *file_priv,
void *kernel_commands,
uint32_t command_size,
uint64_t throttle_us,
- uint32_t quirks,
struct drm_vmw_fence_rep __user *user_fence_rep,
struct vmw_fence_obj **out_fence)
{
@@ -2609,7 +2597,6 @@ int vmw_execbuf_process(struct drm_file *file_priv,
sw_context->fp = vmw_fpriv(file_priv);
sw_context->cur_reloc = 0;
sw_context->cur_val_buf = 0;
- sw_context->quirks = quirks;
INIT_LIST_HEAD(&sw_context->resource_list);
sw_context->cur_query_bo = dev_priv->pinned_bo;
sw_context->last_query_ctx = NULL;
@@ -2921,7 +2908,6 @@ int vmw_execbuf_ioctl(struct drm_device *dev, void *data,
ret = vmw_execbuf_process(file_priv, dev_priv,
(void __user *)(unsigned long)arg->commands,
NULL, arg->command_size, arg->throttle_us,
- 0,
(void __user *)(unsigned long)arg->fence_rep,
NULL);
ttm_read_unlock(&dev_priv->reservation_sem);