> I think we can bump this now for dg2? I think we treat dgfx as always
> coherent with system memory. So maybe s/IS_DG1/IS_DGFX/ in a separate
> patch? Pretty sure the rest of the driver is the same.
Agreed. I'll send that as a separate patch, "drm/i915/dmabuf: skip
acquire flush on all discrete GPUs", with you as Suggested-by.
> Do we need the flush under the else here? If it's not placed in system
> memory what is this flushing, from i915 pov?
Right. i915_gem_dmabuf_attach() migrates the exporter to SMEM
(INTEL_REGION_SMEM) before get_pages() runs, so dma_obj is always
struct-page backed here and the else was effectively dead code; a wbinvd
of device memory doesn't make sense from i915's point of view. Dropped
in v3 -- the own-dma-buf branch is now just:
drm_clflush_sg(dma_obj->mm.pages);
Thanks
Krishna