summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-10-01 10:02:58 +0200
committerChristian König <christian.koenig@amd.com>2019-10-25 11:40:28 +0200
commit7fb03cc3e0794f00b8f154f335ad5b4eb4d78c58 (patch)
tree9b556061a491d7eb6faf37e779cb9c81b696415c /drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
parentc6a5f8daff1179a443f3bf797c0400d84a8818a0 (diff)
downloadlwn-7fb03cc3e0794f00b8f154f335ad5b4eb4d78c58.tar.gz
lwn-7fb03cc3e0794f00b8f154f335ad5b4eb4d78c58.zip
drm/ttm, drm/vmwgfx: move cpu_writers handling into vmwgfx
This feature is only used by vmwgfx and superfluous for everybody else. Signed-off-by: Christian König <christian.koenig@amd.com> Co-developed-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Tested-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Christian König <christian.koenig@amd.com> Link: https://patchwork.freedesktop.org/patch/333650/
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_validation.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_validation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
index f611b2290a1b..7bff3628fc54 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_validation.c
@@ -521,6 +521,9 @@ int vmw_validation_bo_validate_single(struct ttm_buffer_object *bo,
};
int ret;
+ if (atomic_read(&vbo->cpu_writers))
+ return -EBUSY;
+
if (vbo->pin_count > 0)
return 0;