Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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

+2 -4
+2 -4
drivers/gpu/drm/i915/gem/i915_gem_domain.c
··· 68 68 switch (obj->write_domain) { 69 69 case I915_GEM_DOMAIN_GTT: 70 70 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); 75 73 spin_unlock(&obj->vma.lock); 76 74 77 75 i915_gem_object_flush_frontbuffer(obj, ORIGIN_CPU);