[PATCH v17 1/1] drm/i915: Allow user to set cache at BO creation
Andi Shyti
andi.shyti at linux.intel.com
Tue Jun 6 10:18:06 UTC 2023
On Tue, Jun 06, 2023 at 11:10:04AM +0100, Tvrtko Ursulin wrote:
>
> On 06/06/2023 11:00, Andi Shyti wrote:
> > From: Fei Yang <fei.yang at intel.com>
> >
> > To comply with the design that buffer objects shall have immutable
> > cache setting through out their life cycle, {set, get}_caching ioctl's
> > are no longer supported from MTL onward. With that change caching
> > policy can only be set at object creation time. The current code
> > applies a default (platform dependent) cache setting for all objects.
> > However this is not optimal for performance tuning. The patch extends
> > the existing gem_create uAPI to let user set PAT index for the object
> > at creation time.
> > The new extension is platform independent, so UMD's can switch to using
> > this extension for older platforms as well, while {set, get}_caching are
> > still supported on these legacy paltforms for compatibility reason.
> > However, since PAT index was not clearly defined for platforms prior to
> > GEN12 (TGL), so we are limiting this externsion to GEN12+ platforms
> > only. See ext_set_pat() in for the implementation details.
> >
> > Note: The documentation related to the PAT/MOCS tables is currently
> > available for Tiger Lake here:
> > https://www.intel.com/content/www/us/en/docs/graphics-for-linux/developer-reference/1-0/tiger-lake.html
> >
> > BSpec: 45101
> >
> > Mesa support has been submitted in this merge request:
> > https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22878
> >
> > The media driver is supported by the following commits:
> > https://github.com/intel/media-driver/commit/92c00a857433ebb34ec575e9834f473c6fcb6341
> > https://github.com/intel/media-driver/commit/fd375cf2c5e1f6bf6b43258ff797b3134aadc9fd
> > https://github.com/intel/media-driver/commit/08dd244b22484770a33464c2c8ae85430e548000
> >
> > The IGT test related to this change is
> > igt at gem_create@create-ext-set-pat
> >
> > Signed-off-by: Fei Yang <fei.yang at intel.com>
> > Cc: Chris Wilson <chris.p.wilson at linux.intel.com>
> > Cc: Matt Roper <matthew.d.roper at intel.com>
> > Cc: Andi Shyti <andi.shyti at linux.intel.com>
> > Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>
> > Acked-by: Jordan Justen <jordan.l.justen at intel.com>
> > Tested-by: Jordan Justen <jordan.l.justen at intel.com>
> > Acked-by: Carl Zhang <carl.zhang at intel.com>
> > Tested-by: Lihao Gu <lihao.gu at intel.com>
> > Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
>
> Acked-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Fiuuu! Thanks a lot, Tvrtko!
As soon as CI gives green light, I will get this in.
Andi
More information about the dri-devel
mailing list