Re: [v2 07/19] drm/{i915, xe}: Remove i915_reg.h from intel_dram.c

Jani Nikula
2026-01-22T11:42:10Z

On Thu, 22 Jan 2026, Uma Shankar <uma.shankar@intel.com> wrote:
> Make intel_dram.c free from including i915_reg.h.
>
> Signed-off-by: Uma Shankar <uma.shankar@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_regs.h | 6 +++++-
> drivers/gpu/drm/i915/display/intel_dram.c | 3 ++-
> drivers/gpu/drm/i915/i915_reg.h | 6 ------
> 3 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_regs.h b/drivers/gpu/drm/i915/display/intel_display_regs.h
> index 3447ee229354..f395b7d4d640 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_regs.h
> @@ -3075,6 +3075,10 @@ enum skl_power_gate {
> #define MTL_TRAS_MASK REG_GENMASK(16, 8)
> #define MTL_TRDPRE_MASK REG_GENMASK(7, 0)
>
> -
> +#define MTL_MEM_SS_INFO_GLOBAL _MMIO(0x45700)
> +#define XE3P_ECC_IMPACTING_DE REG_BIT(12)
> +#define MTL_N_OF_ENABLED_QGV_POINTS_MASK REG_GENMASK(11, 8)
> +#define MTL_N_OF_POPULATED_CH_MASK REG_GENMASK(7, 4)
> +#define MTL_DDR_TYPE_MASK REG_GENMASK(3, 0)
>
> #endif /* __INTEL_DISPLAY_REGS_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_dram.c b/drivers/gpu/drm/i915/display/intel_dram.c
> index 170de304fe96..73a127dd6720 100644
> --- a/drivers/gpu/drm/i915/display/intel_dram.c
> +++ b/drivers/gpu/drm/i915/display/intel_dram.c
> @@ -7,10 +7,11 @@
>
> #include <drm/drm_managed.h>
> #include <drm/drm_print.h>
> +#include <drm/intel/intel_gmd_common_regs.h>

dram only needs a few pcode things, so I'd prefer having a file for
pcode regs and only including that here.

>
> -#include "i915_reg.h"
> #include "intel_display_core.h"
> #include "intel_display_utils.h"
> +#include "intel_display_regs.h"
> #include "intel_dram.h"
> #include "intel_mchbar_regs.h"
> #include "intel_pcode.h"
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index fac24a649d61..c9fb9af1a35c 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1005,12 +1005,6 @@
> #define OROM_OFFSET _MMIO(0x1020c0)
> #define OROM_OFFSET_MASK REG_GENMASK(20, 16)
>
> -#define MTL_MEM_SS_INFO_GLOBAL _MMIO(0x45700)
> -#define XE3P_ECC_IMPACTING_DE REG_BIT(12)
> -#define MTL_N_OF_ENABLED_QGV_POINTS_MASK REG_GENMASK(11, 8)
> -#define MTL_N_OF_POPULATED_CH_MASK REG_GENMASK(7, 4)
> -#define MTL_DDR_TYPE_MASK REG_GENMASK(3, 0)
> -
> #define MTL_MEDIA_GSI_BASE 0x380000
>
> #endif /* _I915_REG_H_ */

--
Jani Nikula, Intel