drm/xe: Move enable host l2 VRAM post MCR init
authorTejas Upadhyay <tejas.upadhyay@intel.com>
Wed, 14 Aug 2024 09:56:12 +0000 (15:26 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 14 Aug 2024 19:27:42 +0000 (12:27 -0700)
commitab0d6ef864c5fa820e894ee1a07f861e63851664
treead4fac0384a7da0ff48f2897fe6f17fc3a689ed0
parent1eda95cba9df35f1fb0fb4b89511beb6603c614e
drm/xe: Move enable host l2 VRAM post MCR init

xe_gt_enable_host_l2_vram() is reading the XE2_GAMREQSTRM_CTRL register
that is currently missing the MCR annotation. However, just adding the
annotation doesn't work as this function is called before MCR handling
is initialized in xe_gt_mcr_init().

xe_gt_enable_host_l2_vram() is used to implement WA 16023588340 that
needs to be done as early as possible during initialization in order to
be effective since the MMIO writes impact it. In the failure scenario,
driver would simply not be able to bind successfully.

Moving xe_gt_enable_host_l2_vram() later, after MCR initialization is
done, only incurs a few additional HW accesses, particularly when
loading GuC for hwconfig. Binding/unbinding the driver 100 times in BMG
still works so it should be ok to start handling the WA a little bit
later. This is sufficient to allow adding the MCR annotation to
XE2_GAMREQSTRM_CTRL.

Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240814095614.909774-2-tejas.upadhyay@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_gt.c