[PATCH 6/6] drm/xe/xe3lpm: Add new "instance0" steering table

Gustavo Sousa gustavo.sousa at intel.com
Mon Oct 7 22:03:56 UTC 2024


Quoting Matt Atwood (2024-10-04 19:05:50-03:00)
>From: Matt Roper <matthew.d.roper at intel.com>
>
>MCR steering on Xe3 media IP is almost the same as it was on Xe2, except
>for one new range (0x38D0D0 - 0x38D0FF) which has changed to an MCR
>"MEDIAINF" range on Xe3.  Since we can always steer to to grpid /
>instanceid 0 for MEDIAINF ranges, define a new "INSTANCE0" steering
>table for Xe3 media.  Xe3 can continue to use the same OADDRM/GPMXMT
>table as Xe2.
>
>Bspec: 74298
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
>Signed-off-by: Matt Atwood <matthew.s.atwood at intel.com>
>---
> drivers/gpu/drm/xe/xe_gt_mcr.c | 17 ++++++++++++++++-
> 1 file changed, 16 insertions(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_gt_mcr.c b/drivers/gpu/drm/xe/xe_gt_mcr.c
>index 4c0767403881..2f2fb84b4e58 100644
>--- a/drivers/gpu/drm/xe/xe_gt_mcr.c
>+++ b/drivers/gpu/drm/xe/xe_gt_mcr.c
>@@ -237,6 +237,18 @@ static const struct xe_mmio_range xe2lpm_instance0_steering_table[] = {
>         {},
> };
> 
>+static const struct xe_mmio_range xe3lpm_instance0_steering_table[] = {
>+        { 0x384000, 0x3847DF },         /* GAM, rsvd, GAM */
>+        { 0x384900, 0x384AFF },         /* GAM */
>+        { 0x389560, 0x3895FF },         /* MEDIAINF */
>+        { 0x38B600, 0x38B8FF },         /* L3BANK */
>+        { 0x38C800, 0x38D07F },         /* GAM, MEDIAINF */
>+        { 0x38D0D0, 0x38D0FF },                /* MEDIAINF */
>+        { 0x38F000, 0x38F0FF },         /* GAM */

Looks like [0x38D0D0:0x38D0FF] and [0x38F000:0x38F0FF] could be
merged into a single entry here. In other words:

    { 0x38D0D0, 0x38F0FF }, /* MEDIAINF, GAM */

With that,

Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>

>+        { 0x393C00, 0x393C7F },         /* MEDIAINF */
>+        {},
>+};
>+
> static void init_steering_l3bank(struct xe_gt *gt)
> {
>         struct xe_mmio *mmio = &gt->mmio;
>@@ -441,7 +453,10 @@ void xe_gt_mcr_init(struct xe_gt *gt)
>         if (gt->info.type == XE_GT_TYPE_MEDIA) {
>                 drm_WARN_ON(&xe->drm, MEDIA_VER(xe) < 13);
> 
>-                if (MEDIA_VERx100(xe) >= 1301) {
>+                if (MEDIA_VER(xe) >= 30) {
>+                        gt->steering[OADDRM].ranges = xe2lpm_gpmxmt_steering_table;
>+                        gt->steering[INSTANCE0].ranges = xe3lpm_instance0_steering_table;
>+                } else if (MEDIA_VERx100(xe) >= 1301) {
>                         gt->steering[OADDRM].ranges = xe2lpm_gpmxmt_steering_table;
>                         gt->steering[INSTANCE0].ranges = xe2lpm_instance0_steering_table;
>                 } else {
>-- 
>2.45.0
>


More information about the Intel-xe mailing list