diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-07 15:23:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-02-07 15:24:03 +0000 |
commit | 8d7e3de1e019238211fa06e109437a13cae62004 (patch) | |
tree | 313b27496749bd54f2e4f0cfc80a0d2782c2619a /drivers/gpu/drm/i915/i915_gem.c | |
parent | db53a302611c06bde01851f61fa0675a84ca018c (diff) |
drm/i915: Skip the no-op domain changes when already in CPU|GTT domains
Removes some superfluous fluff from tracing...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f0f8c6ff684..9297143447c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2931,6 +2931,9 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write) if (obj->gtt_space == NULL) return -EINVAL; + if (obj->base.write_domain == I915_GEM_DOMAIN_GTT) + return 0; + ret = i915_gem_object_flush_gpu_write_domain(obj); if (ret) return ret; @@ -3033,6 +3036,9 @@ i915_gem_object_set_to_cpu_domain(struct drm_i915_gem_object *obj, bool write) uint32_t old_write_domain, old_read_domains; int ret; + if (obj->base.write_domain == I915_GEM_DOMAIN_CPU) + return 0; + ret = i915_gem_object_flush_gpu_write_domain(obj); if (ret) return ret; |