Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>,
	intel-xe@lists.freedesktop.org
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Subject: Re: [PATCH 4/7] drm/xe/display: Add macro with display driver ops
Date: Wed, 13 May 2026 11:55:55 +0300	[thread overview]
Message-ID: <99f7a5b9b5f7dff28c11821806f0834c2c994057@intel.com> (raw)
In-Reply-To: <20260512183342.3374-5-michal.wajdeczko@intel.com>

On Tue, 12 May 2026, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
> Instead of updating the drm_driver.fbdev_probe field in the runtime,
> we can use macro which value depends on the actual Kconfig setup.
>
> The hook .fbdev_probe shall not be used until confirmed by enabling
> a DRIVER_MODESET driver feature flag, which still depends on the
> xe_modparam.probe_display parameter.

I don't undestand what you're trying to say with "until confirmed by
enabling ..."

The change itself seems sound.

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


>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/xe/display/xe_display.c | 12 ++++++++----
>  drivers/gpu/drm/xe/display/xe_display.h | 11 +++++++++++
>  drivers/gpu/drm/xe/xe_device.c          |  2 ++
>  3 files changed, 21 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 263e92203c9d..7e7d476da8ce 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -85,10 +85,6 @@ void xe_display_driver_set_hooks(struct drm_driver *driver)
>  	if (!xe_modparam.probe_display)
>  		return;
>  
> -#ifdef CONFIG_DRM_FBDEV_EMULATION
> -	driver->fbdev_probe = intel_fbdev_driver_fbdev_probe;
> -#endif
> -
>  	driver->driver_features |= DRIVER_MODESET | DRIVER_ATOMIC;
>  }
>  
> @@ -603,3 +599,11 @@ int xe_display_probe(struct xe_device *xe)
>  	unset_display_features(xe);
>  	return 0;
>  }
> +
> +#ifdef CONFIG_DRM_FBDEV_EMULATION
> +int xe_display_driver_fbdev_probe(struct drm_fb_helper *fbh,
> +				  struct drm_fb_helper_surface_size *sizes)
> +{
> +	return intel_fbdev_driver_fbdev_probe(fbh, sizes);
> +}
> +#endif
> diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
> index 95acf0fd8e7b..deec0232532e 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -9,6 +9,8 @@
>  #include <linux/types.h>
>  
>  struct drm_driver;
> +struct drm_fb_helper;
> +struct drm_fb_helper_surface_size;
>  struct pci_dev;
>  struct xe_device;
>  
> @@ -16,6 +18,8 @@ struct xe_device;
>  
>  bool xe_display_driver_probe_defer(struct pci_dev *pdev);
>  void xe_display_driver_set_hooks(struct drm_driver *driver);
> +int xe_display_driver_fbdev_probe(struct drm_fb_helper *fbh,
> +				  struct drm_fb_helper_surface_size *sizes);
>  
>  int xe_display_probe(struct xe_device *xe);
>  
> @@ -40,8 +44,15 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe);
>  void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
>  void xe_display_pm_runtime_resume(struct xe_device *xe);
>  
> +#define XE_DISPLAY_DRIVER_OPS						\
> +	.fbdev_probe = PTR_IF(IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION),	\
> +			      xe_display_driver_fbdev_probe)
> +
>  #else
>  
> +#define XE_DISPLAY_DRIVER_OPS \
> +	.fbdev_probe = NULL
> +
>  static inline int xe_display_driver_probe_defer(struct pci_dev *pdev) { return 0; }
>  static inline void xe_display_driver_set_hooks(struct drm_driver *driver) { }
>  
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 6512f1dfe691..3bca4c1d1d5f 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -414,6 +414,7 @@ static struct drm_driver regular_driver = {
>  	.major = DRIVER_MAJOR,
>  	.minor = DRIVER_MINOR,
>  	.patchlevel = DRIVER_PATCHLEVEL,
> +	XE_DISPLAY_DRIVER_OPS,
>  };
>  
>  #ifdef CONFIG_PCI_IOV
> @@ -435,6 +436,7 @@ static struct drm_driver admin_only_driver = {
>  	.major = DRIVER_MAJOR,
>  	.minor = DRIVER_MINOR,
>  	.patchlevel = DRIVER_PATCHLEVEL,
> +	XE_DISPLAY_DRIVER_OPS,
>  };
>  
>  /**

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-05-13  8:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 18:33 [PATCH 0/7] drm/xe: Make drm_driver const Michal Wajdeczko
2026-05-12 18:33 ` [PATCH 1/7] drm/xe: Drop unused drm/drm_atomic_helper.h include Michal Wajdeczko
2026-05-13  8:56   ` Jani Nikula
2026-05-12 18:33 ` [PATCH 2/7] drm/xe/display: Drop xe_display_driver_remove() stub Michal Wajdeczko
2026-05-13  8:56   ` Jani Nikula
2026-05-12 18:33 ` [PATCH 3/7] drm/xe/display: Prefer forward declarations Michal Wajdeczko
2026-05-13  8:56   ` Jani Nikula
2026-05-12 18:33 ` [PATCH 4/7] drm/xe/display: Add macro with display driver ops Michal Wajdeczko
2026-05-13  8:55   ` Jani Nikula [this message]
2026-05-12 18:33 ` [PATCH 5/7] drm/xe/display: Add macro with display driver features Michal Wajdeczko
2026-05-13  9:01   ` Jani Nikula
2026-05-12 18:33 ` [PATCH 6/7] drm/xe/display: Drop xe_display_driver_set_hooks() Michal Wajdeczko
2026-05-13  9:01   ` Jani Nikula
2026-05-12 18:33 ` [PATCH 7/7] drm/xe: Make drm_driver const Michal Wajdeczko
2026-05-13  9:01   ` Jani Nikula
2026-05-13  3:36 ` ✓ CI.KUnit: success for " Patchwork
2026-05-13  5:12 ` ✓ Xe.CI.BAT: " Patchwork
2026-05-14  1:01 ` ✗ Xe.CI.FULL: failure " 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=99f7a5b9b5f7dff28c11821806f0834c2c994057@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox