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 5/7] drm/xe/display: Add macro with display driver features
Date: Wed, 13 May 2026 12:01:10 +0300 [thread overview]
Message-ID: <5d63ad6cc5927dace0d0af7dc62eaafce62fcef0@intel.com> (raw)
In-Reply-To: <20260512183342.3374-6-michal.wajdeczko@intel.com>
On Tue, 12 May 2026, Michal Wajdeczko <michal.wajdeczko@intel.com> wrote:
> Instead of updating drm_driver.driver_features in the runtime, we
> can use macro which value depends on the CONFIG_DRM_XE_DISPLAY.
>
> And if display support is later disabled by the xe_modparam then we
> will clear related bits in the drm_device.driver_features instead.
>
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/xe/display/xe_display.c | 4 +---
> drivers/gpu/drm/xe/display/xe_display.h | 2 ++
> drivers/gpu/drm/xe/xe_device.c | 2 ++
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 7e7d476da8ce..7e5382fc161d 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -84,13 +84,11 @@ void xe_display_driver_set_hooks(struct drm_driver *driver)
> {
> if (!xe_modparam.probe_display)
> return;
> -
> - driver->driver_features |= DRIVER_MODESET | DRIVER_ATOMIC;
This is also bonkers, because it modifies the driver for *all* devices.
I think the patch subject downplays the actual change, but *shrug*.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> }
>
> static void unset_display_features(struct xe_device *xe)
> {
> - xe->drm.driver_features &= ~(DRIVER_MODESET | DRIVER_ATOMIC);
> + xe->drm.driver_features &= ~XE_DISPLAY_DRIVER_FEATURES;
> }
>
> static void xe_display_fini_early(void *arg)
> diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
> index deec0232532e..d2b105d5f2a1 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.h
> +++ b/drivers/gpu/drm/xe/display/xe_display.h
> @@ -44,12 +44,14 @@ 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_FEATURES (DRIVER_MODESET | DRIVER_ATOMIC)
> #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_FEATURES 0
> #define XE_DISPLAY_DRIVER_OPS \
> .fbdev_probe = NULL
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 3bca4c1d1d5f..c053e4d2692f 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -393,6 +393,7 @@ bool xe_is_xe_file(const struct file *file)
>
> static struct drm_driver regular_driver = {
> .driver_features =
> + XE_DISPLAY_DRIVER_FEATURES |
> DRIVER_GEM |
> DRIVER_RENDER | DRIVER_SYNCOBJ |
> DRIVER_SYNCOBJ_TIMELINE | DRIVER_GEM_GPUVA,
> @@ -425,6 +426,7 @@ static const struct drm_ioctl_desc xe_ioctls_admin_only[] = {
>
> static struct drm_driver admin_only_driver = {
> .driver_features =
> + XE_DISPLAY_DRIVER_FEATURES |
> DRIVER_GEM | DRIVER_RENDER | DRIVER_GEM_GPUVA,
> .open = xe_file_open,
> .postclose = xe_file_close,
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-05-13 9:01 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
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 [this message]
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=5d63ad6cc5927dace0d0af7dc62eaafce62fcef0@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