[Intel-gfx] [PATCH] drm/i915: Refactor dma mask usage to a common helper

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 17 17:22:53 UTC 2020


Quoting Ruhl, Michael J (2020-04-17 18:14:24)
> Ahh, I just remembered why I did not put the work arounds in the new
> helper.
> 
> I discovered that the  intel_gmch_probe() code is in the char/agp directory,
> so the path is:
> 
> i915 set dma_mask
> < gen5 set dma_mask
> i915 < gen 5 work arounds
> 
> If I put the workarounds in the set dma mask, I lose the workaround.
> 
> Hmmm, intel_gmch_probe() has  "gpu_pdev" to indicate that it is being
> inited from i915.  I could use this to skip the dma mask setting for this
> path.
> 
> Is that reasonable?

If this is the straw the breaks the camel's back to pull in the gmch
code under gt/, let me add a pile of hay!

Honestly, I would set the dma masks as we think they should be here and
if they are being overridden in char/agp, so be it. When we do pull the
code out, it will remain correct; and overall with the refactoring you
are doing the driver will be much more consistent across all gen.
-Chris


More information about the Intel-gfx mailing list