OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd345ef
)
drm/i915/selftests: Take an explicit ref for rq->batch
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 8 Apr 2020 09:17:23 +0000
(10:17 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 8 Apr 2020 12:40:07 +0000
(13:40 +0100)
Since we are peeking into the batch object of the request, it is
beholden on us to hold a reference to it.
Closes: https://gitlab.freedesktop.org/drm/intel/issues/1634
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20200408091723.28937-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_lrc.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/gt/selftest_lrc.c
b/drivers/gpu/drm/i915/gt/selftest_lrc.c
index
57db3d0
..
616d035
100644
(file)
--- a/
drivers/gpu/drm/i915/gt/selftest_lrc.c
+++ b/
drivers/gpu/drm/i915/gt/selftest_lrc.c
@@
-2655,7
+2655,7
@@
static int create_gang(struct intel_engine_cs *engine,
if (IS_ERR(rq))
goto err_obj;
- rq->batch =
vma
;
+ rq->batch =
i915_vma_get(vma)
;
i915_request_get(rq);
i915_vma_lock(vma);
@@
-2679,6
+2679,7
@@
static int create_gang(struct intel_engine_cs *engine,
return 0;
err_rq:
+ i915_vma_put(rq->batch);
i915_request_put(rq);
err_obj:
i915_gem_object_put(obj);
@@
-2775,6
+2776,7
@@
static int live_preempt_gang(void *arg)
err = -ETIME;
}
+ i915_vma_put(rq->batch);
i915_request_put(rq);
rq = n;
}