All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Check for nomodeset in i915_init() first
@ 2021-07-19  8:35 ` Daniel Vetter
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Vetter @ 2021-07-19  8:35 UTC (permalink / raw)
  To: DRI Development
  Cc: Daniel Vetter, Intel Graphics Development, Jason Ekstrand, Daniel Vetter

Jason is trying to sort out the unwinding in i915_init and i915_exit,
while reviewing those patches I noticed that we also have the
nomodeset handling now in the middle of things.

Pull that out for simplisity in unwinding - if you run selftest with
nomodeset you get nothing, *shrug*.

Cc: Jason Ekstrand <jason@jlekstrand.net>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 67696d752271..6fe709ac1b4b 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -1199,14 +1199,6 @@ static int __init i915_init(void)
 	bool use_kms = true;
 	int err;
 
-	err = i915_globals_init();
-	if (err)
-		return err;
-
-	err = i915_mock_selftests();
-	if (err)
-		return err > 0 ? 0 : err;
-
 	/*
 	 * Enable KMS by default, unless explicitly overriden by
 	 * either the i915.modeset prarameter or by the
@@ -1225,6 +1217,14 @@ static int __init i915_init(void)
 		return 0;
 	}
 
+	err = i915_globals_init();
+	if (err)
+		return err;
+
+	err = i915_mock_selftests();
+	if (err)
+		return err > 0 ? 0 : err;
+
 	i915_pmu_init();
 
 	err = pci_register_driver(&i915_pci_driver);
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-07-20 15:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19  8:35 [PATCH] drm/i915: Check for nomodeset in i915_init() first Daniel Vetter
2021-07-19  8:35 ` [Intel-gfx] " Daniel Vetter
2021-07-19  9:05 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2021-07-19  9:09 ` [Intel-gfx] [PATCH] " Tvrtko Ursulin
2021-07-19  9:09   ` Tvrtko Ursulin
2021-07-19  9:37   ` Tvrtko Ursulin
2021-07-19  9:37     ` Tvrtko Ursulin
2021-07-19  9:09 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for " Patchwork
2021-07-19  9:31 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-07-19 12:28 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-07-20 15:53 ` [PATCH] " Jason Ekstrand
2021-07-20 15:53   ` [Intel-gfx] " Jason Ekstrand

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.