drm/i915: Drop WARN_ON(flags) from ppgtt_bind_vma()
Subsystems (2)
PATCH 1/2 drm/i915: Drop WARN_ON(flags) from ppgtt_bind_vma()
From: Ville Syrjälä <[email protected]>
We will call ppgtt_bind_vma() with flags != 0, so the WARN_ON(flags) is bogus. Kill it.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/i915_gem_gtt.c +0 -2
@@ -1243,8 +1243,6 @@ ppgtt_bind_vma(struct i915_vma *vma, enum i915_cache_level cache_level, u32 flags) { -WARN_ON (flags ); - vma->vm->insert_entries (vma->vm, vma->obj->pages, vma->node.start, cache_level); }
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 drm/i915: Unbind all vmas whose new cache_level doesn't agree with the neighbours
From: Ville Syrjälä <[email protected]>
When we change the cache_level for an object we need to make sure we don't put differing types of snoopable memory too close to each other on non-LLC machines.
Currently i915_gem_object_set_cache_level() will stop looking when it finds just one vma that has such a conflict. Drop the bogus break statement to make sure it will unbind all vmas which need to be moved around to avoid the conflict.
I suppose this is a theoretical issue as currently we don't enable ppgtt on non-LLC machines, so each object can only have one vma.
--- drivers/gpu/drm/i915/i915_gem.c | 2 -- 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/i915_gem.c +0 -2
@@ -3482,8 +3482,6 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj, ret =i915_vma_unbind (vma);if (ret)return ret; - -break ; } }
Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] drm/i915: Unbind all vmas whose new cache_level doesn't agree with the neighbours
Quoted 11 lines · On Wed, Mar 12, 2014 at 07:32:27PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
When we change the
cache_levelfor an object we need to make sure we don't put differing types of snoopable memory too close to each other on non-LLC machines.Currently
i915_gem_object_set_cache_level()will stop looking when it finds just one vma that has such a conflict. Drop the bogus break statement to make sure it will unbind all vmas which need to be moved around to avoid the conflict.
Quoted 4 lines
I suppose this is a theoretical issue as currently we don't enable ppgtt on non-LLC machines, so each object can only have one vma.
Signed-off-by Ville Syrjälä <[email protected]>
Both patches merged, thanks.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 5 lines · On Wed, Mar 12, 2014 at 07:32:26PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
We will call
ppgtt_bind_vma()with flags != 0, so theWARN_ON(flags)is bogus. Kill it.
This is not an appropriate commit message to change an invariant. The case was true, and it apparently no longer holds. At the very least the commit should have the SHA which changed the invariant, and preferably an explanation as to why the invariant no longer holds ("is bogus"). I
The reason you have given to remove this WARN_ON can be used for any assertion we ever hit and simply reiterates what the patch does.
Quoted 25 lines
Signed-off-by Ville Syrjälä <[email protected]>--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 -- 1 file changed, 2 deletions(-)drivers/gpu/drm/i915/i915_gem_gtt.c +0
-2@@ -1243,8 +1243,6 @@ ppgtt_bind_vma(struct i915_vma *vma, enum i915_cache_level cache_level, u32 flags) { -WARN_ON (flags ); - vma->vm->insert_entries (vma->vm, vma->obj->pages, vma->node.start, cache_level); }Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Ben Widawsky, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Ben Widawsky
Quoted 5 lines · On Wed, Mar 12, 2014 at 07:32:26PM +0200, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
We will call
ppgtt_bind_vma()with flags != 0, so theWARN_ON(flags)is bogus. Kill it.
Quoted 7 lines
This is not an appropriate commit message to change an invariant. The case was true, and it apparently no longer holds. At the very least the commit should have the SHA which changed the invariant, and preferably an explanation as to why the invariant no longer holds ("is bogus"). I
The reason you have given to remove this
WARN_ONcan be used for any assertion we ever hit and simply reiterates what the patch does.
I agree that the commit message is a bit too thin. Unfortunately I've already baked in dinq so I can't go back and rectify history :(
Since this patch removes something we also can't fix that by adding a comment around the new code and supplying the missing commit messages bits there.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch