RE: [v2 06/19] drm/{i915, xe}: Remove i915_reg.h from intel_display_device.c

Shankar, Uma
2026-01-23T10:43:40Z

> -----Original Message-----
> From: Nikula, Jani <jani.nikula@intel.com>
> Sent: Thursday, January 22, 2026 5:07 PM
> To: Shankar, Uma <uma.shankar@intel.com>; intel-gfx@lists.freedesktop.org;
> intel-xe@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com; Shankar, Uma <uma.shankar@intel.com>
> Subject: Re: [v2 06/19] drm/{i915, xe}: Remove i915_reg.h from
> intel_display_device.c
>
> On Thu, 22 Jan 2026, Uma Shankar <uma.shankar@intel.com> wrote:
> > Move GU_CNTL_PROTECTED to common header, this helps
> > intel_display_device.c free from i915_reg.h dependency.
>
> This doesn't mention the GMD ID stuff.
>
> >
> > Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_display_device.c | 2 +-
> > drivers/gpu/drm/i915/display/intel_display_regs.h | 3 +++
> > drivers/gpu/drm/i915/i915_reg.h | 8 --------
> > include/drm/intel/intel_gmd_common_regs.h | 5 +++++
> > 4 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c
> > b/drivers/gpu/drm/i915/display/intel_display_device.c
> > index 471f236c9ddf..f7cc4198a870 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_device.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display_device.c
> > @@ -9,8 +9,8 @@
> > #include <drm/drm_drv.h>
> > #include <drm/drm_print.h>
> > #include <drm/intel/pciids.h>
> > +#include <drm/intel/intel_gmd_common_regs.h>
> >
> > -#include "i915_reg.h"
> > #include "intel_cx0_phy_regs.h"
> > #include "intel_de.h"
> > #include "intel_display.h"
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_regs.h
> > b/drivers/gpu/drm/i915/display/intel_display_regs.h
> > index 5136b7166775..3447ee229354 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_regs.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_regs.h
> > @@ -6,6 +6,9 @@
> >
> > #include "intel_display_reg_defs.h"
> >
> > +#define GU_CNTL_PROTECTED _MMIO(0x10100C)
> > +#define DEPRESENT REG_BIT(9)
> > +
> > #define _GEN7_PIPEA_DE_LOAD_SL 0x70068
> > #define _GEN7_PIPEB_DE_LOAD_SL 0x71068
> > #define GEN7_PIPE_DE_LOAD_SL(pipe) _MMIO_PIPE(pipe,
> > _GEN7_PIPEA_DE_LOAD_SL, _GEN7_PIPEB_DE_LOAD_SL) diff --git
> > a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> > index 35122c997b8a..fac24a649d61 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -117,9 +117,6 @@
> > * #define GEN8_BAR _MMIO(0xb888)
> > */
> >
> > -#define GU_CNTL_PROTECTED _MMIO(0x10100C)
> > -#define DEPRESENT REG_BIT(9)
> > -
> > #define GU_CNTL _MMIO(0x101010)
> > #define LMEM_INIT REG_BIT(7)
> > #define DRIVERFLR REG_BIT(31)
> > @@ -925,11 +922,6 @@
> > #define MASK_WAKEMEM REG_BIT(13)
> > #define DDI_CLOCK_REG_ACCESS REG_BIT(7)
> >
> > -#define GMD_ID_DISPLAY _MMIO(0x510a0)
> > -#define GMD_ID_ARCH_MASK REG_GENMASK(31, 22)
> > -#define GMD_ID_RELEASE_MASK REG_GENMASK(21, 14)
> > -#define GMD_ID_STEP REG_GENMASK(5, 0)
> > -
> > /* PCH */
> >
> > #define SDEISR _MMIO(0xc4000)
> > diff --git a/include/drm/intel/intel_gmd_common_regs.h
> > b/include/drm/intel/intel_gmd_common_regs.h
> > index 8e9a574c87d9..489d59379ab0 100644
> > --- a/include/drm/intel/intel_gmd_common_regs.h
> > +++ b/include/drm/intel/intel_gmd_common_regs.h
> > @@ -105,4 +105,9 @@
> > #define PCODE_MBOX_DOMAIN_NONE 0x0
> > #define PCODE_MBOX_DOMAIN_MEDIAFF 0x3
> >
> > +#define GMD_ID_DISPLAY _MMIO(0x510a0)
> > +#define GMD_ID_ARCH_MASK REG_GENMASK(31, 22)
> > +#define GMD_ID_RELEASE_MASK
> REG_GENMASK(21, 14)
> > +#define GMD_ID_STEP REG_GENMASK(5, 0)
>
> Only display uses GMD_ID_DISPLAY register. I'd put this in display regs, and
> define the register contents with GMD_ID_DISPLAY_* even if the register
> contents are identical for display and non-display GMD registers.
>
> Main point is, we should use the common regs file as little as possible.

Sure, will fix it.

Regards,
Uma Shankar

> BR,
> Jani.
>
> > +
> > #endif
>
> --
> Jani Nikula, Intel