From: Matthew Auld <matthew.auld@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 7/7] drm/xe/display: use xe->display to decide whether to do anything
Date: Fri, 16 May 2025 15:27:50 +0100 [thread overview]
Message-ID: <1eb02f9b-7a2c-4564-8a09-e0fcaf91e52a@intel.com> (raw)
In-Reply-To: <945d2a987214044a81f4816684972961b772b45a.1747397638.git.jani.nikula@intel.com>
On 16/05/2025 13:17, Jani Nikula wrote:
> Since we only initialize xe->display when xe->info.probe_display, we can
> use !xe->display to bail out early. This seems cleaner and more accurate
> than relying on xe->info.probe_display, since xe->display may indeed be
> NULL.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
> ---
> drivers/gpu/drm/xe/display/xe_display.c | 40 ++++++++++++-------------
> 1 file changed, 20 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 8b2aa7dc6e07..1e59b6dd2c3b 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -92,7 +92,7 @@ static void xe_display_fini_early(void *arg)
> struct xe_device *xe = arg;
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_display_driver_remove_nogem(display);
> @@ -106,7 +106,7 @@ int xe_display_init_early(struct xe_device *xe)
> struct intel_display *display = xe->display;
> int err;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return 0;
>
> /* Fake uncore lock */
> @@ -160,7 +160,7 @@ int xe_display_init(struct xe_device *xe)
> struct intel_display *display = xe->display;
> int err;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return 0;
>
> err = intel_display_driver_probe(display);
> @@ -174,7 +174,7 @@ void xe_display_register(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_display_driver_register(display);
> @@ -185,7 +185,7 @@ void xe_display_unregister(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_power_domains_disable(display);
> @@ -198,7 +198,7 @@ void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (master_ctl & DISPLAY_IRQ)
> @@ -209,7 +209,7 @@ void xe_display_irq_enable(struct xe_device *xe, u32 gu_misc_iir)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (gu_misc_iir & GU_MISC_GSE)
> @@ -220,7 +220,7 @@ void xe_display_irq_reset(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> gen11_display_irq_reset(display);
> @@ -230,7 +230,7 @@ void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (gt->info.id == XE_GT0)
> @@ -271,7 +271,7 @@ static void xe_display_enable_d3cold(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> /*
> @@ -294,7 +294,7 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_dmc_resume(display);
> @@ -319,7 +319,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
> struct intel_display *display = xe->display;
> bool s2idle = suspend_to_idle();
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> /*
> @@ -353,7 +353,7 @@ void xe_display_pm_shutdown(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_power_domains_disable(display);
> @@ -384,7 +384,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (xe->d3cold.allowed) {
> @@ -400,7 +400,7 @@ void xe_display_pm_suspend_late(struct xe_device *xe)
> struct intel_display *display = xe->display;
> bool s2idle = suspend_to_idle();
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_display_power_suspend_late(display, s2idle);
> @@ -410,7 +410,7 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (xe->d3cold.allowed)
> @@ -428,7 +428,7 @@ void xe_display_pm_shutdown_late(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> /*
> @@ -443,7 +443,7 @@ void xe_display_pm_resume_early(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_display_power_resume_early(display);
> @@ -453,7 +453,7 @@ void xe_display_pm_resume(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> intel_dmc_resume(display);
> @@ -488,7 +488,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
>
> - if (!xe->info.probe_display)
> + if (!display)
> return;
>
> if (xe->d3cold.allowed) {
next prev parent reply other threads:[~2025-05-16 14:27 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 12:16 [PATCH 0/7] drm/i915 & drm/xe: prep work towards opaque struct intel_display Jani Nikula
2025-05-16 12:16 ` [PATCH 1/7] drm/i915/display: Add check for alloc_ordered_workqueue() and alloc_workqueue() Jani Nikula
2025-05-16 14:04 ` Matthew Auld
2025-05-20 18:10 ` Jani Nikula
2025-05-16 12:16 ` [PATCH 2/7] drm/xe/display: Add check for alloc_ordered_workqueue() Jani Nikula
2025-05-16 14:05 ` Matthew Auld
2025-05-16 12:16 ` [PATCH 3/7] drm/xe/display: drop duplicate display->fb_tracking.lock init Jani Nikula
2025-05-16 12:16 ` [PATCH 4/7] drm/i915/display: move hotplug.dp_wq init from xe and i915 to display Jani Nikula
2025-05-16 14:11 ` Matthew Auld
2025-05-16 12:16 ` [PATCH 5/7] drm/xe/display: move xe->display initialization to xe_display_probe() Jani Nikula
2025-05-16 14:24 ` Matthew Auld
2025-05-16 12:16 ` [PATCH 6/7] drm/xe/display: add notes about how early a few functions can be called Jani Nikula
2025-05-16 14:25 ` Matthew Auld
2025-05-16 12:17 ` [PATCH 7/7] drm/xe/display: use xe->display to decide whether to do anything Jani Nikula
2025-05-16 14:27 ` Matthew Auld [this message]
2025-05-16 12:53 ` ✗ Fi.CI.SPARSE: warning for drm/i915 & drm/xe: prep work towards opaque struct intel_display Patchwork
2025-05-16 13:16 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-19 11:39 ` Jani Nikula
2025-05-16 13:19 ` ✓ CI.Patch_applied: " Patchwork
2025-05-16 13:19 ` ✓ CI.checkpatch: " Patchwork
2025-05-16 13:20 ` ✓ CI.KUnit: " Patchwork
2025-05-16 13:30 ` ✓ CI.Build: " Patchwork
2025-05-16 13:33 ` ✓ CI.Hooks: " Patchwork
2025-05-16 13:34 ` ✓ CI.checksparse: " Patchwork
2025-05-16 13:58 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-17 8:26 ` ✗ Xe.CI.Full: failure " Patchwork
2025-05-19 18:36 ` ✗ i915.CI.Full: " Patchwork
2025-05-20 12:06 ` ✗ Fi.CI.SPARSE: warning for drm/i915 & drm/xe: prep work towards opaque struct intel_display (rev2) Patchwork
2025-05-20 12:33 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-20 14:14 ` ✗ i915.CI.Full: failure " Patchwork
2025-05-27 3:03 ` ✗ CI.Patch_applied: failure for drm/i915 & drm/xe: prep work towards opaque struct intel_display 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=1eb02f9b-7a2c-4564-8a09-e0fcaf91e52a@intel.com \
--to=matthew.auld@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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.