All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 12/12] drm/i915/rom: Use intel_de for SPI ROM register access
Date: Thu, 26 Mar 2026 13:47:17 +0200	[thread overview]
Message-ID: <d2fd286522bca63de052868b228920075511a4e8@intel.com> (raw)
In-Reply-To: <20260325185342.11482-13-ville.syrjala@linux.intel.com>

On Wed, 25 Mar 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Since we moved intel_rom.c back into the display code, juse
> use intel_de_{read,write}() for the register accesses.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_rom.c | 19 ++++++++++---------
>  1 file changed, 10 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_rom.c b/drivers/gpu/drm/i915/display/intel_rom.c
> index d573059fb0d9..54f842c09fb0 100644
> --- a/drivers/gpu/drm/i915/display/intel_rom.c
> +++ b/drivers/gpu/drm/i915/display/intel_rom.c
> @@ -7,8 +7,9 @@
>  
>  #include <drm/drm_device.h>
>  
> +#include "intel_de.h"
> +#include "intel_display_types.h"
>  #include "intel_rom.h"
> -#include "intel_uncore.h"
>  #include "intel_oprom_regs.h"
>  
>  struct intel_rom {
> @@ -17,7 +18,7 @@ struct intel_rom {
>  	void __iomem *oprom;
>  
>  	/* for SPI */
> -	struct intel_uncore *uncore;
> +	struct intel_display *display;
>  	loff_t offset;
>  
>  	size_t size;
> @@ -30,10 +31,10 @@ struct intel_rom {
>  
>  static u32 spi_read32(struct intel_rom *rom, loff_t offset)
>  {
> -	intel_uncore_write(rom->uncore, PRIMARY_SPI_ADDRESS,
> -			   rom->offset + offset);
> +	intel_de_write(rom->display, PRIMARY_SPI_ADDRESS,
> +		       rom->offset + offset);
>  
> -	return intel_uncore_read(rom->uncore, PRIMARY_SPI_TRIGGER);
> +	return intel_de_read(rom->display, PRIMARY_SPI_TRIGGER);
>  }
>  
>  static u16 spi_read16(struct intel_rom *rom, loff_t offset)
> @@ -50,13 +51,13 @@ struct intel_rom *intel_rom_spi(struct drm_device *drm)
>  	if (!rom)
>  		return NULL;
>  
> -	rom->uncore = to_intel_uncore(drm);
> +	rom->display = to_intel_display(drm);
>  
> -	static_region = intel_uncore_read(rom->uncore, SPI_STATIC_REGIONS);
> +	static_region = intel_de_read(rom->display, SPI_STATIC_REGIONS);
>  	static_region &= OPTIONROM_SPI_REGIONID_MASK;
> -	intel_uncore_write(rom->uncore, PRIMARY_SPI_REGIONID, static_region);
> +	intel_de_write(rom->display, PRIMARY_SPI_REGIONID, static_region);
>  
> -	rom->offset = intel_uncore_read(rom->uncore, OROM_OFFSET) & OROM_OFFSET_MASK;
> +	rom->offset = intel_de_read(rom->display, OROM_OFFSET) & OROM_OFFSET_MASK;
>  
>  	rom->size = 0x200000;

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-03-26 11:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 18:53 [PATCH 00/12] drm/i915: More uncore nukage from display code Ville Syrjala
2026-03-25 18:53 ` [PATCH 01/12] drm/i915/qgv: Use intel_de_read() for MTL_MEM_SS_INFO* reads Ville Syrjala
2026-03-26  9:15   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 02/12] drm/i915/mchbar: Provide intel_mchbar_read*() abstraction Ville Syrjala
2026-03-26  9:16   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 03/12] drm/i915/mchbar: Define the end of the MCHBAR mirror Ville Syrjala
2026-03-26 11:15   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 04/12] drm/i915/mchbar: WARN when accessing non-MCHBAR registers via intel_mchbar_read*() Ville Syrjala
2026-03-26 11:26   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 05/12] drm/i915/mchbar: Use intel_mchbar_read() instead of intel_de_read() Ville Syrjala
2026-03-26 11:28   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 06/12] drm/i915/mchbar: Use intel_mchbar_read*() instead of intel_uncore_read*() Ville Syrjala
2026-03-26 11:31   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 07/12] drm/i915/de: Add intel_de_read16() Ville Syrjala
2026-03-26 11:32   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 08/12] drm/i915/de: s/intel_de_read64_2x32()/intel_de_read64_2x32_volatile()/ Ville Syrjala
2026-03-26 11:33   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 09/12] drm/i915/de: Add a simple intel_de_read64_2x32() Ville Syrjala
2026-03-26 11:41   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 10/12] drm/i915/vrr: Use intel_de_read64_2x32() Ville Syrjala
2026-03-26 11:42   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 11/12] drm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses Ville Syrjala
2026-03-26 11:44   ` Jani Nikula
2026-03-25 18:53 ` [PATCH 12/12] drm/i915/rom: Use intel_de for SPI ROM register access Ville Syrjala
2026-03-26 11:47   ` Jani Nikula [this message]
2026-03-25 19:30 ` ✗ CI.checkpatch: warning for drm/i915: More uncore nukage from display code Patchwork
2026-03-25 19:32 ` ✓ CI.KUnit: success " Patchwork
2026-03-25 21:26 ` ✗ i915.CI.BAT: failure " Patchwork
2026-03-26  8:51   ` Ville Syrjälä
2026-03-27 14:43 ` ✓ i915.CI.BAT: success for drm/i915: More uncore nukage from display code (rev2) Patchwork
2026-03-28 14:39 ` ✓ i915.CI.Full: " Patchwork
2026-03-30 16:05 ` ✗ CI.checkpatch: warning " Patchwork
2026-03-30 16:06 ` ✓ CI.KUnit: success " Patchwork
2026-03-30 16:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-30 20:11 ` ✓ Xe.CI.FULL: " 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=d2fd286522bca63de052868b228920075511a4e8@intel.com \
    --to=jani.nikula@linux.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.