Skip to content

Commit 766819e

Browse files
committed
drm/i915: Use the i915_vma_flush_writes helper
We can use the existing helper in flush_write_domain() and save some lines of code. Signed-off-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 306f7a5 commit 766819e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/gpu/drm/i915/gem/i915_gem_domain.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ flush_write_domain(struct drm_i915_gem_object *obj, unsigned int flush_domains)
6868
switch (obj->write_domain) {
6969
case I915_GEM_DOMAIN_GTT:
7070
spin_lock(&obj->vma.lock);
71-
for_each_ggtt_vma(vma, obj) {
72-
if (i915_vma_unset_ggtt_write(vma))
73-
intel_gt_flush_ggtt_writes(vma->vm->gt);
74-
}
71+
for_each_ggtt_vma(vma, obj)
72+
i915_vma_flush_writes(vma);
7573
spin_unlock(&obj->vma.lock);
7674

7775
i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);

0 commit comments

Comments
 (0)