[Intel-xe] [PATCH 3/7] drm/xe: Use media base for GMD_ID access

Lucas De Marchi lucas.demarchi at intel.com
Fri May 5 20:19:01 UTC 2023


On Fri, May 05, 2023 at 01:05:18PM -0400, Rodrigo Vivi wrote:
>On Mon, May 01, 2023 at 08:07:28AM -0700, Lucas De Marchi wrote:
>> On Sun, Apr 30, 2023 at 07:47:38PM +0200, Michal Wajdeczko wrote:
>> >
>> >
>> > On 29.04.2023 08:23, Lucas De Marchi wrote:
>> > > Instead of adding a hardcoded base, define GMD_ID() with a base
>> > > argument and use it in all places.
>> > >
>> > > Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
>> > > ---
>> > >  drivers/gpu/drm/xe/regs/xe_gt_regs.h | 4 +++-
>> > >  drivers/gpu/drm/xe/xe_pci.c          | 9 +++++----
>> > >  2 files changed, 8 insertions(+), 5 deletions(-)
>> > >
>> > > diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
>> > > index 4d87f1fe010d..da7b6d2c7e01 100644
>> > > --- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
>> > > +++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
>> > > @@ -8,6 +8,8 @@
>> > >
>> > >  #include "regs/xe_reg_defs.h"
>> > >
>> > > +#define MTL_MEDIA_GT_BASE			0x380000
>> >
>> > maybe for completeness (and to avoid using anonymous 0 offset in other
>> > places) we should define also:
>> >
>> > #define GRAPHICS_GT_BASE			0x0
>>
>> there are very vew places in the driver that would care about the base.
>> Today the base is automatically applied for anything using xe_mmio_,
>> just like we have it automatically applied in intel_uncore for i915.
>> So, we really don't want to change each register to receive base as
>> param.
>
>I'm with Michal here. I had the same thought when reviewing and just read
>his comment afterwards. Although it is rarely used it would be good
>to avoid later confusion.

rather than changing this to bring the final XE_REG define to the
header, I think I will just leave it as is and drop this patch.

Just rebased the series and end result looks ok

Lucas De Marchi


More information about the Intel-xe mailing list