All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/de: Nuke driver_is_i915()
Date: Thu, 03 Dec 2026 15:09:54 +0200	[thread overview]
Message-ID: <68e77d58e6d5c551beccab83a98203ca3011a6c8@intel.com> (raw)
In-Reply-To: <20261203124025.3616-2-ville.syrjala@linux.intel.com>

On Thu, 03 Dec 2026, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Now that both i915 and xe use the same mmio funcs for
> TGL+ we can unify the intel_de_init() if-ladders for
> the two drivers and get rid of driver_is_i915().
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Yup.

So after this we're still missing enabling unclaimed access checks for
display version 20+.

BR,
Jani.


> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_de.c | 49 ++++++++-----------------
>  1 file changed, 15 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_de.c b/drivers/gpu/drm/i915/display/intel_de.c
> index 9fec9229c9ae..b05535178690 100644
> --- a/drivers/gpu/drm/i915/display/intel_de.c
> +++ b/drivers/gpu/drm/i915/display/intel_de.c
> @@ -594,46 +594,27 @@ static const struct intel_mmio_funcs ptl_mmio_funcs = {
>  	.write = ptl_mmio_write,
>  };
>  
> -static bool driver_is_i915(void)
> -{
> -#ifdef I915
> -	return true;
> -#else
> -	return false;
> -#endif
> -}
> -
>  void intel_de_init(struct intel_display *display)
>  {
>  	display->mmio.regs = intel_parent_mmio_regs(display);
>  
>  	spin_lock_init(&display->mmio.lock);
>  
> -	/*
> -	 * TODO: enable unclaimed register detection
> -	 * (ideally without the lock) for xe and get
> -	 * rid of driver_is_i915().
> -	 */
> -	if (driver_is_i915()) {
> -		if (DISPLAY_VER(display) >= 12)
> -			display->mmio.funcs = &tgl_mmio_funcs;
> -		else if (DISPLAY_VER(display) >= 9 ||
> -			 display->platform.broadwell || display->platform.haswell)
> -			display->mmio.funcs = &hsw_mmio_funcs;
> -		else if (display->platform.valleyview || display->platform.cherryview)
> -			display->mmio.funcs = &vlv_mmio_funcs;
> -		else if (DISPLAY_VER(display) >= 6)
> -			display->mmio.funcs = &snb_mmio_funcs;
> -		else
> -			display->mmio.funcs = &i9xx_mmio_funcs;
> -	} else {
> -		if (DISPLAY_VER(display) >= 30)
> -			display->mmio.funcs = &ptl_mmio_funcs;
> -		else if (DISPLAY_VER(display) >= 20)
> -			display->mmio.funcs = &lnl_mmio_funcs;
> -		else
> -			display->mmio.funcs = &tgl_mmio_funcs;
> -	}
> +	if (DISPLAY_VER(display) >= 30)
> +		display->mmio.funcs = &ptl_mmio_funcs;
> +	else if (DISPLAY_VER(display) >= 20)
> +		display->mmio.funcs = &lnl_mmio_funcs;
> +	else if (DISPLAY_VER(display) >= 12)
> +		display->mmio.funcs = &tgl_mmio_funcs;
> +	else if (DISPLAY_VER(display) >= 9 ||
> +		 display->platform.broadwell || display->platform.haswell)
> +		display->mmio.funcs = &hsw_mmio_funcs;
> +	else if (display->platform.valleyview || display->platform.cherryview)
> +		display->mmio.funcs = &vlv_mmio_funcs;
> +	else if (DISPLAY_VER(display) >= 6)
> +		display->mmio.funcs = &snb_mmio_funcs;
> +	else
> +		display->mmio.funcs = &i9xx_mmio_funcs;
>  
>  	if (display->mmio.funcs->check_for_unclaimed_mmio)
>  		WRITE_ONCE(display->mmio.unclaimed_mmio_check, true);

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-12-03 13:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 12:40 [PATCH 1/2] drm/xe: Enable unclaimed register detection on xe for pre-LNL Ville Syrjala
2026-12-03 12:40 ` [PATCH 2/2] drm/i915/de: Nuke driver_is_i915() Ville Syrjala
2026-12-03 13:09   ` Jani Nikula [this message]
2026-12-03 12:49 ` ✓ CI.KUnit: success for series starting with [1/2] drm/xe: Enable unclaimed register detection on xe for pre-LNL Patchwork
2026-12-03 13:06 ` [PATCH 1/2] " Jani Nikula
2026-12-03 13:20 ` ✓ Xe.CI.BAT: success for series starting with [1/2] " Patchwork
2026-12-03 15:03 ` ✗ i915.CI.BAT: failure " Patchwork
2026-12-04 11:00 ` ✗ 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=68e77d58e6d5c551beccab83a98203ca3011a6c8@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.