diff options
author | David P <megver83@parabola.nu> | 2020-03-05 22:40:15 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2020-03-05 22:40:15 -0300 |
commit | 286477559a5d2fb9ca8225745079cd9777927493 (patch) | |
tree | fe8f898a44f8ace8e9d6af3519b47c61cf1328fe /libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch | |
parent | 8b34f5ca49bb3cd1ec06408c7cfbc92d4a928e7e (diff) | |
download | abslibre-286477559a5d2fb9ca8225745079cd9777927493.tar.gz abslibre-286477559a5d2fb9ca8225745079cd9777927493.tar.bz2 abslibre-286477559a5d2fb9ca8225745079cd9777927493.zip |
updpkg: libre/linux-libre-pae 5.5.7-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch')
-rw-r--r-- | libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch b/libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch new file mode 100644 index 000000000..96e3d8810 --- /dev/null +++ b/libre/linux-libre-pae/0010-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch @@ -0,0 +1,41 @@ +From 291a8a531808a32b25a7649495e835f7b0257fd3 Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Sun, 22 Dec 2019 21:02:54 +0000 +Subject: [PATCH 10/11] drm/i915: Add a simple is-bound check before unbinding + +Only acquire the various atomic references required to unbind the vma if +we do need to unbind the vma. + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +Acked-by: Imre Deak <imre.deak@intel.com> +Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-1-chris@chris-wilson.co.uk +--- + drivers/gpu/drm/i915/i915_gem.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index c2c025c4f4ad..83eed642cbcd 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -145,6 +145,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + struct i915_address_space *vm = vma->vm; + bool awake = false; + ++ list_move_tail(&vma->obj_link, &still_in_list); ++ if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) ++ continue; ++ + ret = -EAGAIN; + if (!i915_vm_tryopen(vm)) + break; +@@ -160,7 +164,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, + } + } + +- list_move_tail(&vma->obj_link, &still_in_list); + spin_unlock(&obj->vma.lock); + + ret = -EBUSY; +-- +2.25.1 + |