Skip to content

Commit

Permalink
drm/i915: Use the i915_vma_flush_writes helper
Browse files Browse the repository at this point in the history
We can use the existing helper in flush_write_domain() and save some lines
of code.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230721130741.1306563-1-tvrtko.ursulin@linux.intel.com
  • Loading branch information
Tvrtko Ursulin committed Jul 26, 2023
1 parent 306f7a5 commit 766819e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/gpu/drm/i915/gem/i915_gem_domain.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,8 @@ flush_write_domain(struct drm_i915_gem_object *obj, unsigned int flush_domains)
switch (obj->write_domain) {
case I915_GEM_DOMAIN_GTT:
spin_lock(&obj->vma.lock);
for_each_ggtt_vma(vma, obj) {
if (i915_vma_unset_ggtt_write(vma))
intel_gt_flush_ggtt_writes(vma->vm->gt);
}
for_each_ggtt_vma(vma, obj)
i915_vma_flush_writes(vma);
spin_unlock(&obj->vma.lock);

i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);
Expand Down

0 comments on commit 766819e

Please sign in to comment.