All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: use local __VLV_DISPLAY_BASE for i915 registers
Date: Wed, 25 Nov 2026 15:51:12 +0200	[thread overview]
Message-ID: <56954cfc1a740b49d16331b0dfa3b00a1db4229c@intel.com> (raw)
In-Reply-To: <awXrzzoa9yH_scGZ@intel.com>

On Tue, 24 Nov 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Tue, Nov 24, 2026 at 03:31:56PM +0200, Jani Nikula wrote:
>> Avoid including intel_display_reg_defs.h just for VLV_DISPLAY_BASE. It's
>> not great to have multiple definitions, but for now just break the
>> dependency.
>> 
>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_reg.h              | 19 ++++++++++---------
>>  include/drm/intel/intel_gmd_interrupt_regs.h | 14 ++++++++------
>>  2 files changed, 18 insertions(+), 15 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
>> index 32f8bb39babf..06b3ee0ad1b9 100644
>> --- a/drivers/gpu/drm/i915/i915_reg.h
>> +++ b/drivers/gpu/drm/i915/i915_reg.h
>> @@ -26,7 +26,6 @@
>>  #define _I915_REG_H_
>>  
>>  #include "i915_reg_defs.h"
>> -#include "display/intel_display_reg_defs.h"
>>  
>>  /**
>>   * DOC: The i915 register macro definition style guide
>> @@ -116,6 +115,8 @@
>>   *  #define GEN8_BAR                    _MMIO(0xb888)
>>   */
>>  
>> +#define __VLV_DISPLAY_BASE		0x180000
>> +
>>  #define GU_CNTL				_MMIO(0x101010)
>>  #define   LMEM_INIT			REG_BIT(7)
>>  #define   DRIVERFLR			REG_BIT(31)
>> @@ -152,7 +153,7 @@
>>  /*
>>   * IOSF sideband
>>   */
>> -#define VLV_IOSF_DOORBELL_REQ			_MMIO(VLV_DISPLAY_BASE + 0x2100)
>> +#define VLV_IOSF_DOORBELL_REQ			_MMIO(__VLV_DISPLAY_BASE + 0x2100)
>>  #define   IOSF_DEVFN_SHIFT			24
>>  #define   IOSF_OPCODE_SHIFT			16
>>  #define   IOSF_PORT_SHIFT			8
>> @@ -174,8 +175,8 @@
>>  #define   CHV_IOSF_PORT_GPIO_SE			0x48
>>  #define   CHV_IOSF_PORT_GPIO_E			0xa8
>>  #define   CHV_IOSF_PORT_GPIO_SW			0xb2
>> -#define VLV_IOSF_DATA				_MMIO(VLV_DISPLAY_BASE + 0x2104)
>> -#define VLV_IOSF_ADDR				_MMIO(VLV_DISPLAY_BASE + 0x2108)
>> +#define VLV_IOSF_DATA				_MMIO(__VLV_DISPLAY_BASE + 0x2104)
>> +#define VLV_IOSF_ADDR				_MMIO(__VLV_DISPLAY_BASE + 0x2108)
>>  
>>  /* DPIO registers */
>>  #define DPIO_DEVFN			0
>> @@ -325,8 +326,8 @@
>>  #define GEN7_MEDIA_MAX_REQ_COUNT	_MMIO(0x4070)
>>  #define GEN7_GFX_MAX_REQ_COUNT		_MMIO(0x4074)
>>  
>> -#define VLV_GU_CTL0	_MMIO(VLV_DISPLAY_BASE + 0x2030)
>> -#define VLV_GU_CTL1	_MMIO(VLV_DISPLAY_BASE + 0x2034)
>> +#define VLV_GU_CTL0	_MMIO(__VLV_DISPLAY_BASE + 0x2030)
>> +#define VLV_GU_CTL1	_MMIO(__VLV_DISPLAY_BASE + 0x2034)
>>  #define GEN2_IER	_MMIO(0x20a0)
>>  #define GEN2_IIR	_MMIO(0x20a4)
>>  #define GEN2_IMR	_MMIO(0x20a8)
>> @@ -336,10 +337,10 @@
>>  					      GEN2_IER, \
>>  					      GEN2_IIR)
>>  
>> -#define VLV_GUNIT_CLOCK_GATE	_MMIO(VLV_DISPLAY_BASE + 0x2060)
>> +#define VLV_GUNIT_CLOCK_GATE	_MMIO(__VLV_DISPLAY_BASE + 0x2060)
>>  #define   GINT_DIS		(1 << 22)
>>  #define   GCFG_DIS		(1 << 8)
>> -#define VLV_GUNIT_CLOCK_GATE2	_MMIO(VLV_DISPLAY_BASE + 0x2064)
>> +#define VLV_GUNIT_CLOCK_GATE2	_MMIO(__VLV_DISPLAY_BASE + 0x2064)
>>  
>>  #define EIR		_MMIO(0x20b0)
>>  #define EMR		_MMIO(0x20b4)
>> @@ -608,7 +609,7 @@
>>  #define VLV_CLK_CTL2			_MMIO(0x101104)
>>  #define   CLK_CTL2_CZCOUNT_30NS_SHIFT	28
>>  
>> -#define VLV_DPFLIPSTAT				_MMIO(VLV_DISPLAY_BASE + 0x70028)
>> +#define VLV_DPFLIPSTAT				_MMIO(__VLV_DISPLAY_BASE + 0x70028)
>>  #define   PIPEB_LINE_COMPARE_INT_EN			REG_BIT(29)
>>  #define   PIPEB_HLINE_INT_EN			REG_BIT(28)
>>  #define   PIPEB_VBLANK_INT_EN			REG_BIT(27)
>
> I have a commit in some branch that moves that into the display
> header where it belongs. I should dig that up...
>
> I suppose for the rest of these registers we could even call it
> VLV_GUNIT_BASE or something, but doesn't really matter I suppose.
>
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Thanks, pushed to din.

>
>> diff --git a/include/drm/intel/intel_gmd_interrupt_regs.h b/include/drm/intel/intel_gmd_interrupt_regs.h
>> index 0d85ec907396..fcfd8bc093b8 100644
>> --- a/include/drm/intel/intel_gmd_interrupt_regs.h
>> +++ b/include/drm/intel/intel_gmd_interrupt_regs.h
>> @@ -4,6 +4,8 @@
>>  #ifndef _INTEL_GMD_INTERRUPT_REGS_H_
>>  #define _INTEL_GMD_INTERRUPT_REGS_H_
>>  
>> +#define __VLV_DISPLAY_BASE		0x180000
>> +
>>  #define I915_PM_INTERRUPT				(1 << 31)
>>  #define I915_ISP_INTERRUPT				(1 << 22)
>>  #define I915_LPE_PIPE_B_INTERRUPT			(1 << 21)
>> @@ -62,12 +64,12 @@
>>  #define  SCPD_FBC_IGNORE_3D			(1 << 6)
>>  #define  CSTATE_RENDER_CLOCK_GATE_DISABLE	(1 << 5)
>>  
>> -#define VLV_IIR_RW	_MMIO(VLV_DISPLAY_BASE + 0x2084)
>> -#define VLV_IER		_MMIO(VLV_DISPLAY_BASE + 0x20a0)
>> -#define VLV_IIR		_MMIO(VLV_DISPLAY_BASE + 0x20a4)
>> -#define VLV_IMR		_MMIO(VLV_DISPLAY_BASE + 0x20a8)
>> -#define VLV_ISR		_MMIO(VLV_DISPLAY_BASE + 0x20ac)
>> -#define VLV_PCBR	_MMIO(VLV_DISPLAY_BASE + 0x2120)
>> +#define VLV_IIR_RW	_MMIO(__VLV_DISPLAY_BASE + 0x2084)
>> +#define VLV_IER		_MMIO(__VLV_DISPLAY_BASE + 0x20a0)
>> +#define VLV_IIR		_MMIO(__VLV_DISPLAY_BASE + 0x20a4)
>> +#define VLV_IMR		_MMIO(__VLV_DISPLAY_BASE + 0x20a8)
>> +#define VLV_ISR		_MMIO(__VLV_DISPLAY_BASE + 0x20ac)
>> +#define VLV_PCBR	_MMIO(__VLV_DISPLAY_BASE + 0x2120)
>>  #define VLV_PCBR_ADDR_SHIFT	12
>>  
>>  #endif
>> -- 
>> 2.47.3

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-11-25 13:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 13:31 [PATCH] drm/i915: use local __VLV_DISPLAY_BASE for i915 registers Jani Nikula
2026-11-24 13:46 ` ✗ CI.KUnit: failure for " Patchwork
2026-11-24 18:06 ` ✗ Fi.CI.BUILD: warning " Patchwork
2026-11-24 18:33 ` ✓ i915.CI.BAT: success " Patchwork
2026-11-24 19:55 ` [PATCH] " Ville Syrjälä
2026-11-25 13:51   ` Jani Nikula [this message]
2026-11-25  7:58 ` ✗ i915.CI.Full: failure for " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56954cfc1a740b49d16331b0dfa3b00a1db4229c@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.