diff options
author | Dave Airlie <airlied@redhat.com> | 2010-05-31 19:09:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-05-31 20:36:02 -0400 |
commit | fbf81762e385d3d45acad057b654d56972acf58c (patch) | |
tree | bc1b9e31e92ca702ea808650fda45443145f6776 /drivers/gpu/drm/i915/i915_dma.c | |
parent | fc5ea29d72bde1bec230538becf396caad8621b8 (diff) |
drm/kms: disable/enable poll around switcheroo on/off
Because we aren't in a suspend state the poll will still run when we have switcherooed a card off.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_dma.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 2a6b5de5ae5d..cc6e56a18edd 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1399,12 +1399,14 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_ | |||
1399 | struct drm_device *dev = pci_get_drvdata(pdev); | 1399 | struct drm_device *dev = pci_get_drvdata(pdev); |
1400 | pm_message_t pmm = { .event = PM_EVENT_SUSPEND }; | 1400 | pm_message_t pmm = { .event = PM_EVENT_SUSPEND }; |
1401 | if (state == VGA_SWITCHEROO_ON) { | 1401 | if (state == VGA_SWITCHEROO_ON) { |
1402 | printk(KERN_INFO "i915: switched off\n"); | 1402 | printk(KERN_INFO "i915: switched on\n"); |
1403 | /* i915 resume handler doesn't set to D0 */ | 1403 | /* i915 resume handler doesn't set to D0 */ |
1404 | pci_set_power_state(dev->pdev, PCI_D0); | 1404 | pci_set_power_state(dev->pdev, PCI_D0); |
1405 | i915_resume(dev); | 1405 | i915_resume(dev); |
1406 | drm_kms_helper_poll_enable(dev); | ||
1406 | } else { | 1407 | } else { |
1407 | printk(KERN_ERR "i915: switched off\n"); | 1408 | printk(KERN_ERR "i915: switched off\n"); |
1409 | drm_kms_helper_poll_disable(dev); | ||
1408 | i915_suspend(dev, pmm); | 1410 | i915_suspend(dev, pmm); |
1409 | } | 1411 | } |
1410 | } | 1412 | } |