mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
db53a30261
commit
8d7e3de1e0
1 changed files with 6 additions and 0 deletions
|
@ -2931,6 +2931,9 @@ i915_gem_object_set_to_gtt_domain(struct drm_i915_gem_object *obj, bool write)
|
||||||
if (obj->gtt_space == NULL)
|
if (obj->gtt_space == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (obj->base.write_domain == I915_GEM_DOMAIN_GTT)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = i915_gem_object_flush_gpu_write_domain(obj);
|
ret = i915_gem_object_flush_gpu_write_domain(obj);
|
||||||
if (ret)
|
if (ret)
|
||||||
return 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;
|
uint32_t old_write_domain, old_read_domains;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
if (obj->base.write_domain == I915_GEM_DOMAIN_CPU)
|
||||||
|
return 0;
|
||||||
|
|
||||||
ret = i915_gem_object_flush_gpu_write_domain(obj);
|
ret = i915_gem_object_flush_gpu_write_domain(obj);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Add table
Reference in a new issue