aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-27 08:18:14 -0400
committerEric Anholt <eric@anholt.net>2010-05-28 13:42:04 -0400
commitb118c1e363befe3d74469f4a014ce6353097f08a (patch)
treeab63bf84d3f8cbdc15ab0bd271143c5f5d4e9bf4 /drivers/gpu/drm/i915
parent468f0b44ce4b002ca7d9260f802a341854752c02 (diff)
drm/i915: Avoid nesting of domain changes when setting display plane
Nesting domain changes will cause confusion when trying to interpret the tracepoints describing the sequence of changes for the object, as well as obscuring the order of operations for the reader of the code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index bf703551343a..1c65f0b591fc 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2914,18 +2914,16 @@ i915_gem_object_set_to_display_plane(struct drm_gem_object *obj)
2914 return ret; 2914 return ret;
2915 } 2915 }
2916 2916
2917 i915_gem_object_flush_cpu_write_domain(obj);
2918
2917 old_write_domain = obj->write_domain; 2919 old_write_domain = obj->write_domain;
2918 old_read_domains = obj->read_domains; 2920 old_read_domains = obj->read_domains;
2919 2921
2920 obj->read_domains &= I915_GEM_DOMAIN_GTT;
2921
2922 i915_gem_object_flush_cpu_write_domain(obj);
2923
2924 /* It should now be out of any other write domains, and we can update 2922 /* It should now be out of any other write domains, and we can update
2925 * the domain values for our changes. 2923 * the domain values for our changes.
2926 */ 2924 */
2927 BUG_ON((obj->write_domain & ~I915_GEM_DOMAIN_GTT) != 0); 2925 BUG_ON((obj->write_domain & ~I915_GEM_DOMAIN_GTT) != 0);
2928 obj->read_domains |= I915_GEM_DOMAIN_GTT; 2926 obj->read_domains = I915_GEM_DOMAIN_GTT;
2929 obj->write_domain = I915_GEM_DOMAIN_GTT; 2927 obj->write_domain = I915_GEM_DOMAIN_GTT;
2930 obj_priv->dirty = 1; 2928 obj_priv->dirty = 1;
2931 2929