From 5ddd90a5d86cd972ad487c5451966b24f86cbdd0 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 9 Nov 2010 14:40:50 +1000 Subject: [PATCH] - add i915 polling s/r patch --- drm-i915-disable-sr-polling.patch | 70 +++++++++++++++++++++++++++++++ kernel.spec | 7 +++- 2 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 drm-i915-disable-sr-polling.patch diff --git a/drm-i915-disable-sr-polling.patch b/drm-i915-disable-sr-polling.patch new file mode 100644 index 000000000..71d1fabd7 --- /dev/null +++ b/drm-i915-disable-sr-polling.patch @@ -0,0 +1,70 @@ +From ab7959dd389be36c0bc63e3e883b7891d2c1bfc4 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Wed, 8 Sep 2010 09:45:11 +0100 +Subject: [PATCH] drm/i915: Disable output polling across suspend & resume + +Suspending (especially hibernating) may take a finite amount of time, +during which a hotplug event may trigger and we will attempt to handle +it with inconsistent state. Disable hotplug polling around suspend and +resume. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30070 +Reported-by: Rui Tiago Matos +Signed-off-by: Chris Wilson +--- + drivers/gpu/drm/i915/i915_dma.c | 2 -- + drivers/gpu/drm/i915/i915_drv.c | 11 ++++++++++- + 2 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c +index ce8ff0e..c569617 100644 +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -1334,10 +1334,8 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, enum vga_switcheroo_ + /* i915 resume handler doesn't set to D0 */ + pci_set_power_state(dev->pdev, PCI_D0); + i915_resume(dev); +- drm_kms_helper_poll_enable(dev); + } else { + printk(KERN_ERR "i915: switched off\n"); +- drm_kms_helper_poll_disable(dev); + i915_suspend(dev, pmm); + } + } +diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c +index 194e0c4..3ad3ebe 100644 +--- a/drivers/gpu/drm/i915/i915_drv.c ++++ b/drivers/gpu/drm/i915/i915_drv.c +@@ -263,6 +263,8 @@ int i915_suspend(struct drm_device *dev, pm_message_t state) + if (state.event == PM_EVENT_PRETHAW) + return 0; + ++ drm_kms_helper_poll_disable(dev); ++ + error = i915_drm_freeze(dev); + if (error) + return error; +@@ -306,12 +308,19 @@ static int i915_drm_thaw(struct drm_device *dev) + + int i915_resume(struct drm_device *dev) + { ++ int ret; ++ + if (pci_enable_device(dev->pdev)) + return -EIO; + + pci_set_master(dev->pdev); + +- return i915_drm_thaw(dev); ++ ret = i915_drm_thaw(dev); ++ if (ret) ++ return ret; ++ ++ drm_kms_helper_poll_enable(dev); ++ return 0; + } + + /** +-- +1.7.2.3 + diff --git a/kernel.spec b/kernel.spec index 514438123..f9534a9fe 100644 --- a/kernel.spec +++ b/kernel.spec @@ -48,7 +48,7 @@ Summary: The Linux kernel # reset this by hand to 1 (or to 0 and then use rpmdev-bumpspec). # scripts/rebase.sh should be made to do that for you, actually. # -%global baserelease 51 +%global baserelease 52 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -676,6 +676,7 @@ Patch1819: drm-intel-big-hammer.patch Patch1824: drm-intel-next.patch # make sure the lvds comes back on lid open Patch1825: drm-intel-make-lvds-work.patch +Patch1826: drm-i915-disable-sr-polling.patch Patch1900: linux-2.6-intel-iommu-igfx.patch Patch2000: efifb-add-more-models.patch Patch2001: efifb-check-that-the-base-addr-is-plausible-on-pci-systems.patch @@ -1340,6 +1341,7 @@ ApplyPatch drm-nouveau-connector-fix.patch ApplyPatch drm-intel-big-hammer.patch ApplyOptionalPatch drm-intel-next.patch ApplyPatch drm-intel-make-lvds-work.patch +ApplyPatch drm-i915-disable-sr-polling.patch ApplyPatch linux-2.6-intel-iommu-igfx.patch ApplyPatch efifb-add-more-models.patch @@ -2043,6 +2045,9 @@ fi # and build. %changelog +* Tue Nov 09 2010 Dave Airlie - 2.6.35.6-52 +- add i915 polling s/r patch + * Mon Nov 08 2010 Dave Airlie - 2.6.35.6-51 - Backport polling fixes + radeon hang fixes from upstream