public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix module unloading with DRM_I915_UMS=n
@ 2013-11-15 10:28 Daniel Vetter
  2013-11-15 10:34 ` Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2013-11-15 10:28 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter

Oops, makes testing early boot failures in i915.ko a bit more pain, so
let's fix it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index c2e00ed23195..d9e5c6fc52ea 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -982,6 +982,8 @@ static struct pci_driver i915_pci_driver = {
 	.driver.pm = &i915_pm_ops,
 };
 
+bool i915_no_driver_loaded;
+
 static int __init i915_init(void)
 {
 	driver.num_ioctls = i915_max_ioctl;
@@ -1011,6 +1013,7 @@ static int __init i915_init(void)
 		driver.get_vblank_timestamp = NULL;
 #ifndef CONFIG_DRM_I915_UMS
 		/* Silently fail loading to not upset userspace. */
+		i915_no_driver_loaded = true;
 		return 0;
 #endif
 	}
@@ -1020,6 +1023,9 @@ static int __init i915_init(void)
 
 static void __exit i915_exit(void)
 {
+	if (i915_no_driver_loaded)
+		return;
+
 	drm_pci_exit(&driver, &i915_pci_driver);
 }
 
-- 
1.8.3.1

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

end of thread, other threads:[~2013-11-25  8:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-15 10:28 [PATCH] drm/i915: Fix module unloading with DRM_I915_UMS=n Daniel Vetter
2013-11-15 10:34 ` Chris Wilson
2013-11-15 16:16   ` Daniel Vetter
2013-11-15 20:58     ` Chris Wilson
2013-11-15 21:49       ` Daniel Vetter
2013-11-22 19:25     ` Paulo Zanoni
2013-11-25  8:41       ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox