projects
/
platform
/
upstream
/
libdrm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9af4c49
)
GEM: Fix oops on NULL dereference when we try clflushing when we don't need to.
author
Eric Anholt
<eric@anholt.net>
Thu, 8 May 2008 19:46:02 +0000
(12:46 -0700)
committer
Eric Anholt
<eric@anholt.net>
Thu, 8 May 2008 19:46:02 +0000
(12:46 -0700)
linux-core/i915_gem.c
patch
|
blob
|
history
diff --git
a/linux-core/i915_gem.c
b/linux-core/i915_gem.c
index
861e7bb
..
5c58032
100644
(file)
--- a/
linux-core/i915_gem.c
+++ b/
linux-core/i915_gem.c
@@
-415,6
+415,13
@@
i915_gem_clflush_object (struct drm_gem_object *obj)
{
struct drm_i915_gem_object *obj_priv = obj->driver_private;
+ /* If we don't have a page list set up, then we're not pinned
+ * to GPU, and we can ignore the cache flush because it'll happen
+ * again at bind time.
+ */
+ if (obj_priv->page_list == NULL)
+ return;
+
drm_ttm_cache_flush (obj_priv->page_list, obj->size / PAGE_SIZE);
}