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:
1dc16aa
)
drm/i915: Catch premature unpinning of pages
author
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 19 Oct 2016 10:11:39 +0000
(11:11 +0100)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Wed, 19 Oct 2016 11:09:36 +0000
(12:09 +0100)
Try to catch the violation of unpinning the backing storage whilst still
bound to the GPU.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link:
http://patchwork.freedesktop.org/patch/msgid/20161019101147.17342-5-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/i915_drv.h
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_drv.h
b/drivers/gpu/drm/i915/i915_drv.h
index
33c44c6
..
6c8a104
100644
(file)
--- a/
drivers/gpu/drm/i915/i915_drv.h
+++ b/
drivers/gpu/drm/i915/i915_drv.h
@@
-3181,14
+3181,15
@@
i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n)
static inline void i915_gem_object_pin_pages(struct drm_i915_gem_object *obj)
{
- BUG_ON(obj->pages == NULL);
+
GEM_
BUG_ON(obj->pages == NULL);
obj->pages_pin_count++;
}
static inline void i915_gem_object_unpin_pages(struct drm_i915_gem_object *obj)
{
- BUG_ON(obj->pages_pin_count == 0);
+
GEM_
BUG_ON(obj->pages_pin_count == 0);
obj->pages_pin_count--;
+ GEM_BUG_ON(obj->pages_pin_count < obj->bind_count);
}
enum i915_map_type {