Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: <intel-xe@lists.freedesktop.org>
Subject: [PATCH v2 07/11] drm/xe/display: Drop xe_display_driver_remove()
Date: Fri, 21 Feb 2025 16:10:47 -0800	[thread overview]
Message-ID: <20250222001051.3012936-8-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20250222001051.3012936-1-lucas.demarchi@intel.com>

Handle it as part of xe_display_fini(). The error handling was already
calling it if a step after xe_display_init() failed. Just re-use the
same xe_display_fini() for driver remove.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/display/xe_display.c | 11 +----------
 drivers/gpu/drm/xe/display/xe_display.h |  1 -
 drivers/gpu/drm/xe/xe_device.c          |  8 ++------
 3 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index c26108f54389f..d5d453dc927a1 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -170,6 +170,7 @@ static void xe_display_fini(void *arg)
 	intel_hpd_poll_fini(xe);
 	intel_hdcp_component_fini(display);
 	intel_audio_deinit(display);
+	intel_display_driver_remove(display);
 }
 
 int xe_display_init(struct xe_device *xe)
@@ -209,16 +210,6 @@ void xe_display_unregister(struct xe_device *xe)
 	intel_display_driver_unregister(display);
 }
 
-void xe_display_driver_remove(struct xe_device *xe)
-{
-	struct intel_display *display = &xe->display;
-
-	if (!xe->info.probe_display)
-		return;
-
-	intel_display_driver_remove(display);
-}
-
 /* IRQ-related functions */
 
 void xe_display_irq_handler(struct xe_device *xe, u32 master_ctl)
diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
index 685dc74402fb8..46e14f8dee28a 100644
--- a/drivers/gpu/drm/xe/display/xe_display.h
+++ b/drivers/gpu/drm/xe/display/xe_display.h
@@ -14,7 +14,6 @@ struct drm_driver;
 
 bool xe_display_driver_probe_defer(struct pci_dev *pdev);
 void xe_display_driver_set_hooks(struct drm_driver *driver);
-void xe_display_driver_remove(struct xe_device *xe);
 
 int xe_display_create(struct xe_device *xe);
 
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index e76d233025a69..83e64525839db 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -868,11 +868,11 @@ int xe_device_probe(struct xe_device *xe)
 
 	err = xe_pxp_init(xe);
 	if (err)
-		goto err_remove_display;
+		return err;
 
 	err = drm_dev_register(&xe->drm, 0);
 	if (err)
-		goto err_remove_display;
+		return err;
 
 	xe_display_register(xe);
 
@@ -899,8 +899,6 @@ int xe_device_probe(struct xe_device *xe)
 
 err_unregister_display:
 	xe_display_unregister(xe);
-err_remove_display:
-	xe_display_driver_remove(xe);
 
 	return err;
 }
@@ -911,8 +909,6 @@ void xe_device_remove(struct xe_device *xe)
 
 	drm_dev_unplug(&xe->drm);
 
-	xe_display_driver_remove(xe);
-
 	xe_heci_gsc_fini(xe);
 }
 
-- 
2.48.1


  parent reply	other threads:[~2025-02-22  0:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22  0:10 [PATCH v2 00/11] Cleanup error handling on probe, batch 2 Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 01/11] drivers: base: devres: Allow to release group on device release Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 02/11] drivers: base: devres: Fix find_group() documentation Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 03/11] drivers: base: component: Add debug message for unbind Lucas De Marchi
2025-02-22  7:19   ` Upadhyay, Tejas
2025-02-22  0:10 ` [PATCH v2 04/11] drm/xe: Stop setting drvdata to NULL Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 05/11] drm/xe: Switch from xe to devm actions Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 06/11] drm/xe: Drop remove callback support Lucas De Marchi
2025-02-22  0:10 ` Lucas De Marchi [this message]
2025-02-22  0:10 ` [PATCH v2 08/11] drm/xe: Move survivability entirely to xe_pci Lucas De Marchi
2025-02-24  4:40   ` Riana Tauro
2025-02-22  0:10 ` [PATCH v2 09/11] drm/xe: Stop ignoring errors from xe_heci_gsc_init() Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 10/11] drm/xe: Rename update_device_info() after sriov Lucas De Marchi
2025-02-22  0:10 ` [PATCH v2 11/11] drm/xe: Stop ignoring errors from xe_ttm_sys_mgr_init() Lucas De Marchi
2025-02-22  0:16 ` ✓ CI.Patch_applied: success for Cleanup error handling on probe, batch 2 (rev2) Patchwork
2025-02-22  0:17 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-22  0:18 ` ✓ CI.KUnit: success " Patchwork
2025-02-22  0:34 ` ✓ CI.Build: " Patchwork
2025-02-22  0:37 ` ✓ CI.Hooks: " Patchwork
2025-02-22  0:38 ` ✓ CI.checksparse: " Patchwork
2025-02-22  1:04 ` ✓ Xe.CI.BAT: " Patchwork
2025-02-22 14:19 ` ✗ 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=20250222001051.3012936-8-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /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