artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fd8d2b
)
reduce diff to linux shmem_create_from_object()
author
jsg
<jsg@openbsd.org>
Tue, 25 Jan 2022 21:31:26 +0000
(21:31 +0000)
committer
jsg
<jsg@openbsd.org>
Tue, 25 Jan 2022 21:31:26 +0000
(21:31 +0000)
includes linux
988d4ff6e3c2220d13d8dde22a98945b64fd7977
drm/i915: Fix ww locking in shmem_create_from_object
sys/dev/pci/drm/i915/gt/shmem_utils.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/i915/gt/shmem_utils.c
b/sys/dev/pci/drm/i915/gt/shmem_utils.c
index
1f95563
..
68e2f92
100644
(file)
--- a/
sys/dev/pci/drm/i915/gt/shmem_utils.c
+++ b/
sys/dev/pci/drm/i915/gt/shmem_utils.c
@@
-163,12
+163,13
@@
uao_create_from_object(struct drm_i915_gem_object *obj)
struct uvm_object *uao;
void *ptr;
- if (
obj->ops == &i915_gem_shmem_ops
) {
+ if (
i915_gem_object_is_shmem(obj)
) {
uao_reference(obj->base.uao);
return obj->base.uao;
}
- ptr = i915_gem_object_pin_map(obj, I915_MAP_WB);
+ ptr = i915_gem_object_pin_map_unlocked(obj, i915_gem_object_is_lmem(obj) ?
+ I915_MAP_WC : I915_MAP_WB);
if (IS_ERR(ptr))
return ERR_CAST(ptr);