Skip to contentSkip to conversation

drm/i915: Fix module initialisation.

PATCH Applied Maarten Lankhorst 5 participants 11 messages Aug 17, 2015 – Sep 2, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

---

drivers/gpu/drm/i915/i915_drv.c +1 -15
index 1d887459e37f..411ba8ccecca 100644
@@ -1646,7 +1646,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC,
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1655,10 +1655,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,
-
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = i915_debugfs_init,
 	.debugfs_cleanup = i915_debugfs_cleanup,
@@ -1701,7 +1697,6 @@ static int __init i915_init(void)
 	 * either the i915.modeset prarameter or by the
 	 * vga_text_mode_force boot option.
 	 */
-	driver.driver_features |= DRIVER_MODESET;
 
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
@@ -1712,20 +1707,11 @@ static int __init i915_init(void)
 #endif
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
-		driver.get_vblank_timestamp = NULL;
 		/* Silently fail loading to not upset userspace. */
 		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
 		return 0;
 	}
 
-	/*
-	 * FIXME: Note that we're lying to the DRM core here so that we can get access
-	 * to the atomic ioctl and the atomic properties.  Only plane operations on
-	 * a single CRTC will actually work.
-	 */
-	if (driver.driver_features & DRIVER_MODESET)
-		driver.driver_features |= DRIVER_ATOMIC;
-
 	return drm_pci_init(&driver, &i915_pci_driver);
 }
 

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#1 lore raw
Quoted 8 lines · Maarten Lankhorst

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to Maarten Lankhorst
Quoted 14 lines · Maarten Lankhorst

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

---

drivers/gpu/drm/i915/i915_drv.c +0 -0
index 1d887459e37f..411ba8ccecca 100644

drivers/gpu/drm/i915/i915_drv.c static struct drm_driver driver = { · line 1649

Quoted 5 lines
drivers/gpu/drm/i915/i915_drv.c +1 -1
@@ -1646,7 +1646,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC,

Nah, DRIVER_ATOMIC isn't quite there yet ...

drivers/gpu/drm/i915/i915_drv.c static struct drm_driver driver = { · line 1660

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +0 -3
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1655,10 +1655,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,

Can't we nuke the functions themselves now too?
-Daniel

Quoted 38 lines
drivers/gpu/drm/i915/i915_drv.c +0 -11
-
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = i915_debugfs_init,
 	.debugfs_cleanup = i915_debugfs_cleanup,
@@ -1701,7 +1697,6 @@ static int __init i915_init(void)
 	 * either the i915.modeset prarameter or by the
 	 * vga_text_mode_force boot option.
 	 */
-	driver.driver_features |= DRIVER_MODESET;
 
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
@@ -1712,20 +1707,11 @@ static int __init i915_init(void)
 #endif
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
-		driver.get_vblank_timestamp = NULL;
 		/* Silently fail loading to not upset userspace. */
 		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
 		return 0;
 	}
 
-	/*
-	 * FIXME: Note that we're lying to the DRM core here so that we can get access
-	 * to the atomic ioctl and the atomic properties.  Only plane operations on
-	 * a single CRTC will actually work.
-	 */
-	if (driver.driver_features & DRIVER_MODESET)
-		driver.driver_features |= DRIVER_ATOMIC;
-
 	return drm_pci_init(&driver, &i915_pci_driver);
 }
 

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Op 26-08-15 om 09:51 schreef Daniel Vetter:

Quoted 8 lines · Maarten Lankhorst
Quoted 7 lines

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

Quoted 13 lines

drivers/gpu/drm/i915/i915_drv.c static struct drm_driver driver = { · line 1649

Quoted 12 lines

---

drivers/gpu/drm/i915/i915_drv.c +1 -1
index 1d887459e37f..411ba8ccecca 100644
@@ -1646,7 +1646,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET | DRIVER_ATOMIC,

Nah, DRIVER_ATOMIC isn't quite there yet ...

Indeed..

Quoted 7 lines
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.c +0 -0
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1655,10 +1655,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
Quoted 5 lines

drivers/gpu/drm/i915/i915_drv.c static struct drm_driver driver = { · line 1660

Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c +0 -3
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,

Can't we nuke the functions themselves now too?

vga switcheroo uses them.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw
Quoted 9 lines · Maarten Lankhorst

Op 26-08-15 om 09:51 schreef Daniel Vetter:

Quoted 8 lines · Maarten Lankhorst
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.c +0 -0
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1655,10 +1655,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
Quoted 6 lines
Quoted 5 lines

drivers/gpu/drm/i915/i915_drv.c static struct drm_driver driver = { · line 1660

Quoted 3 lines
drivers/gpu/drm/i915/i915_drv.c +0 -3
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,

Can't we nuke the functions themselves now too?

vga switcheroo uses them.

Oh, missed that. In that case maybe rename it to _switcheroo or something? That should probably have been done in fc49b3da0e1f2, yay for not renaming functions when they're meaning changes ...
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

PATCH 1/1 drm/i915: Fix module initialisation, v2.

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

---

drivers/gpu/drm/i915/i915_dma.c +2 -2
index 097d4ba0421c..f0eaa6f8826b 100644
@@ -364,12 +364,12 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		/* i915 resume handler doesn't set to D0 */
 		pci_set_power_state(dev->pdev, PCI_D0);
-		i915_resume_legacy(dev);
+		i915_resume_switcheroo(dev);
 		dev->switch_power_state = DRM_SWITCH_POWER_ON;
 	} else {
 		pr_err("switched off\n");
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
-		i915_suspend_legacy(dev, pmm);
+		i915_suspend_switcheroo(dev, pmm);
 		dev->switch_power_state = DRM_SWITCH_POWER_OFF;
 	}
 }
drivers/gpu/drm/i915/i915_drv.c +3 -14
index ce3bd0c713b9..4646fe1a0499 100644
@@ -679,7 +679,7 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 	return 0;
 }
 
-int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
+int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
 {
 	int error;
 
@@ -812,7 +812,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
 	return ret;
 }
 
-int i915_resume_legacy(struct drm_device *dev)
+int i915_resume_switcheroo(struct drm_device *dev)
 {
 	int ret;
 
@@ -1649,7 +1649,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET,
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1658,10 +1658,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,
-
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = i915_debugfs_init,
 	.debugfs_cleanup = i915_debugfs_cleanup,
@@ -1704,7 +1700,6 @@ static int __init i915_init(void)
 	 * either the i915.modeset prarameter or by the
 	 * vga_text_mode_force boot option.
 	 */
-	driver.driver_features |= DRIVER_MODESET;
 
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
@@ -1715,17 +1710,11 @@ static int __init i915_init(void)
 #endif
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
-		driver.get_vblank_timestamp = NULL;
 		/* Silently fail loading to not upset userspace. */
 		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
 		return 0;
 	}
 
-	/*
-	 * FIXME: Note that we're lying to the DRM core here so that we can get access
-	 * to the atomic ioctl and the atomic properties.  Only plane operations on
-	 * a single CRTC will actually work.
-	 */
 	if (i915.nuclear_pageflip)
 		driver.driver_features |= DRIVER_ATOMIC;
 
drivers/gpu/drm/i915/i915_drv.h +2 -2
index 8c938451a05e..5c2541ddf212 100644
@@ -2607,8 +2607,8 @@ struct drm_i915_cmd_table {
 extern const struct drm_ioctl_desc i915_ioctls[];
 extern int i915_max_ioctl;
 
-extern int i915_suspend_legacy(struct drm_device *dev, pm_message_t state);
-extern int i915_resume_legacy(struct drm_device *dev);
+extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
+extern int i915_resume_switcheroo(struct drm_device *dev);
 
 /* i915_params.c */
 struct i915_params {

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by on v1 1/1
#6 lore raw

Re: [PATCH] drm/i915: Fix module initialisation, v2.

Task id: 7275 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -1 253/253 252/253

SNB                                  248/248              248/248
IVB                                  281/281              281/281
BYT                                  234/234              234/234
HSW                                  317/317              317/317

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@gem_reloc_vs_gpu@forked-interruptible-faulting-reloc-thrashing PASS(1) DMESG_WARN(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#7 lore raw

Re: [PATCH] drm/i915: Fix module initialisation, v2.

In reply to Maarten Lankhorst
Quoted 8 lines · Maarten Lankhorst

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

Quoted 108 lines

---

drivers/gpu/drm/i915/i915_dma.c +2 -2
index 097d4ba0421c..f0eaa6f8826b 100644
@@ -364,12 +364,12 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		/* i915 resume handler doesn't set to D0 */
 		pci_set_power_state(dev->pdev, PCI_D0);
-		i915_resume_legacy(dev);
+		i915_resume_switcheroo(dev);
 		dev->switch_power_state = DRM_SWITCH_POWER_ON;
 	} else {
 		pr_err("switched off\n");
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
-		i915_suspend_legacy(dev, pmm);
+		i915_suspend_switcheroo(dev, pmm);
 		dev->switch_power_state = DRM_SWITCH_POWER_OFF;
 	}
 }
drivers/gpu/drm/i915/i915_drv.c +3 -14
index ce3bd0c713b9..4646fe1a0499 100644
@@ -679,7 +679,7 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 	return 0;
 }
 
-int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
+int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
 {
 	int error;
 
@@ -812,7 +812,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
 	return ret;
 }
 
-int i915_resume_legacy(struct drm_device *dev)
+int i915_resume_switcheroo(struct drm_device *dev)
 {
 	int ret;
 
@@ -1649,7 +1649,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET,
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1658,10 +1658,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,
-
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = i915_debugfs_init,
 	.debugfs_cleanup = i915_debugfs_cleanup,
@@ -1704,7 +1700,6 @@ static int __init i915_init(void)
 	 * either the i915.modeset prarameter or by the
 	 * vga_text_mode_force boot option.
 	 */
-	driver.driver_features |= DRIVER_MODESET;
 
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
@@ -1715,17 +1710,11 @@ static int __init i915_init(void)
 #endif
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
-		driver.get_vblank_timestamp = NULL;
 		/* Silently fail loading to not upset userspace. */
 		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
 		return 0;
 	}
 
-	/*
-	 * FIXME: Note that we're lying to the DRM core here so that we can get access
-	 * to the atomic ioctl and the atomic properties.  Only plane operations on
-	 * a single CRTC will actually work.
-	 */
 	if (i915.nuclear_pageflip)
 		driver.driver_features |= DRIVER_ATOMIC;
 
drivers/gpu/drm/i915/i915_drv.h +2 -2
index 8c938451a05e..5c2541ddf212 100644
@@ -2607,8 +2607,8 @@ struct drm_i915_cmd_table {
 extern const struct drm_ioctl_desc i915_ioctls[];
 extern int i915_max_ioctl;
 
-extern int i915_suspend_legacy(struct drm_device *dev, pm_message_t state);
-extern int i915_resume_legacy(struct drm_device *dev);
+extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
+extern int i915_resume_switcheroo(struct drm_device *dev);
 
 /* i915_params.c */
 struct i915_params {

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 9 lines
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

Re: [PATCH] drm/i915: Fix module initialisation, v2.

Quoted 11 lines · Matt Roper
Quoted 8 lines · Maarten Lankhorst

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

Review should include the commit message and this commit message doesn't match v2 at all ... Please rectify (or at least tell me what I should put there).

Thanks, Daniel

Quoted 116 lines
Quoted 109 lines

---

drivers/gpu/drm/i915/i915_dma.c +2 -2
index 097d4ba0421c..f0eaa6f8826b 100644
@@ -364,12 +364,12 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		/* i915 resume handler doesn't set to D0 */
 		pci_set_power_state(dev->pdev, PCI_D0);
-		i915_resume_legacy(dev);
+		i915_resume_switcheroo(dev);
 		dev->switch_power_state = DRM_SWITCH_POWER_ON;
 	} else {
 		pr_err("switched off\n");
 		dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
-		i915_suspend_legacy(dev, pmm);
+		i915_suspend_switcheroo(dev, pmm);
 		dev->switch_power_state = DRM_SWITCH_POWER_OFF;
 	}
 }
drivers/gpu/drm/i915/i915_drv.c +3 -14
index ce3bd0c713b9..4646fe1a0499 100644
@@ -679,7 +679,7 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 	return 0;
 }
 
-int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
+int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state)
 {
 	int error;
 
@@ -812,7 +812,7 @@ static int i915_drm_resume_early(struct drm_device *dev)
 	return ret;
 }
 
-int i915_resume_legacy(struct drm_device *dev)
+int i915_resume_switcheroo(struct drm_device *dev)
 {
 	int ret;
 
@@ -1649,7 +1649,7 @@ static struct drm_driver driver = {
 	 */
 	.driver_features =
 	    DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM | DRIVER_PRIME |
-	    DRIVER_RENDER,
+	    DRIVER_RENDER | DRIVER_MODESET,
 	.load = i915_driver_load,
 	.unload = i915_driver_unload,
 	.open = i915_driver_open,
@@ -1658,10 +1658,6 @@ static struct drm_driver driver = {
 	.postclose = i915_driver_postclose,
 	.set_busid = drm_pci_set_busid,
 
-	/* Used in place of i915_pm_ops for non-DRIVER_MODESET */
-	.suspend = i915_suspend_legacy,
-	.resume = i915_resume_legacy,
-
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = i915_debugfs_init,
 	.debugfs_cleanup = i915_debugfs_cleanup,
@@ -1704,7 +1700,6 @@ static int __init i915_init(void)
 	 * either the i915.modeset prarameter or by the
 	 * vga_text_mode_force boot option.
 	 */
-	driver.driver_features |= DRIVER_MODESET;
 
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
@@ -1715,17 +1710,11 @@ static int __init i915_init(void)
 #endif
 
 	if (!(driver.driver_features & DRIVER_MODESET)) {
-		driver.get_vblank_timestamp = NULL;
 		/* Silently fail loading to not upset userspace. */
 		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
 		return 0;
 	}
 
-	/*
-	 * FIXME: Note that we're lying to the DRM core here so that we can get access
-	 * to the atomic ioctl and the atomic properties.  Only plane operations on
-	 * a single CRTC will actually work.
-	 */
 	if (i915.nuclear_pageflip)
 		driver.driver_features |= DRIVER_ATOMIC;
 
drivers/gpu/drm/i915/i915_drv.h +2 -2
index 8c938451a05e..5c2541ddf212 100644
@@ -2607,8 +2607,8 @@ struct drm_i915_cmd_table {
 extern const struct drm_ioctl_desc i915_ioctls[];
 extern int i915_max_ioctl;
 
-extern int i915_suspend_legacy(struct drm_device *dev, pm_message_t state);
-extern int i915_resume_legacy(struct drm_device *dev);
+extern int i915_suspend_switcheroo(struct drm_device *dev, pm_message_t state);
+extern int i915_resume_switcheroo(struct drm_device *dev);
 
 /* i915_params.c */
 struct i915_params {

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

Re: [PATCH] drm/i915: Fix module initialisation, v2.

Op 01-09-15 om 12:12 schreef Daniel Vetter:

Quoted 7 lines · Matt Roper
Quoted 6 lines · Maarten Lankhorst
Quoted 5 lines

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

Review should include the commit message and this commit message doesn't match v2 at all ... Please rectify (or at least tell me what I should put there).

Oops..

The driver doesn't support UMS any more, so set DRIVER_MODESET by default, remove the legacy s/r callbacks, and rename the s/r functions to make it more clear they're only in use by switcheroo now.

Also remove an obsolete comment about atomic. Normal updates are supported only async updates aren't yet.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#10 lore raw

Re: [PATCH] drm/i915: Fix module initialisation, v2.

Quoted 16 lines · Maarten Lankhorst

Op 01-09-15 om 12:12 schreef Daniel Vetter:

Quoted 7 lines · Matt Roper
Quoted 6 lines · Maarten Lankhorst
Quoted 5 lines

Set DRIVER_MODESET and DRIVER_ATOMIC by default. The driver is fully atomic. Remove the legacy suspend/resume, to fix a warning introduced by:

"drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers"

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

and removing the .get_vblank_timestamp reset to NULL. It's a noop without UMS.

Review should include the commit message and this commit message doesn't match v2 at all ... Please rectify (or at least tell me what I should put there).

Quoted 8 lines

Oops..

The driver doesn't support UMS any more, so set DRIVER_MODESET by default, remove the legacy s/r callbacks, and rename the s/r functions to make it more clear they're only in use by switcheroo now.

Also remove an obsolete comment about atomic. Normal updates are supported only async updates aren't yet.

Queued for -next, thanks for the patch.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx