rpms/kernel/devel drm-intel-suspend.patch, NONE, 1.1 kernel.spec, 1.1308, 1.1309
Kristian Høgsberg
krh at fedoraproject.org
Wed Feb 18 23:44:15 UTC 2009
- Previous message (by thread): rpms/gtk2/devel disconnected-monitors.patch, NONE, 1.1 gtk2.spec, 1.360, 1.361
- Next message (by thread): rpms/xorg-x11-drv-evdev/devel xorg-x11-drv-evdev.spec, 1.42, 1.43 evdev-2.0.4-cache-info.patch, 1.2, NONE evdev-2.0.4-reopen-device.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: krh
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13267
Modified Files:
kernel.spec
Added Files:
drm-intel-suspend.patch
Log Message:
* Wed Feb 18 2009 Kristian Høgsberg <krh at redhat.com>
- Add drm-intel-suspend.patch to fix suspend/resume with intel KMS.
drm-intel-suspend.patch:
--- NEW FILE drm-intel-suspend.patch ---
Subject: [Intel-gfx] [PATCH] i915: suspend/resume GEM when KMS is active
From: Jesse Barnes <jbarnes at virtuousgeek.org>
On Tuesday, February 17, 2009 3:13 pm Jesse Barnes wrote:
> In the KMS case, we need to suspend/resume GEM as well. So on suspend,
> make sure we idle GEM and stop any new rendering from coming in, and on
> resume, re-init the framebuffer and clear the suspended flag.
>
> Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
Oops should have included the IRQ bits as well. We need to do this t
properly tear down vblank state and make sure no interrupts come in
either after suspend or before resume while the machine is still running.
Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index a31cbdb..139a0d8 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -27,6 +27,7 @@
*
*/
+#include <linux/device.h>
#include "drmP.h"
#include "drm.h"
#include "i915_drm.h"
@@ -64,6 +65,15 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
pci_save_state(dev->pdev);
+ /* If KMS is active, we do the leavevt stuff here */
+ if (drm_core_check_feature(dev, DRIVER_MODESET) && i915_gem_idle(dev)) {
+ dev_err(&dev->pdev->dev, "GEM idle failed, aborting suspend\n");
+ return -EBUSY;
+ }
+
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
+ drm_irq_uninstall(dev);
+
i915_save_state(dev);
intel_opregion_free(dev);
@@ -79,6 +89,9 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
static int i915_resume(struct drm_device *dev)
{
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ int ret = 0;
+
pci_set_power_state(dev->pdev, PCI_D0);
pci_restore_state(dev->pdev);
if (pci_enable_device(dev->pdev))
@@ -89,7 +102,19 @@ static int i915_resume(struct drm_device *dev)
intel_opregion_init(dev);
- return 0;
+ /* KMS EnterVT equivalent */
+ if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+ mutex_lock(&dev->struct_mutex);
+ dev_priv->mm.suspended = 0;
+
+ ret = i915_gem_init_ringbuffer(dev);
+ if (ret != 0)
+ ret = -1;
+ mutex_unlock(&dev->struct_mutex);
+ drm_irq_install(dev);
+ }
+
+ return ret;
}
static struct vm_operations_struct i915_gem_vm_ops = {
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a8d3256..2461d9b 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -621,6 +621,7 @@ int i915_gem_init_ringbuffer(struct drm_device *dev);
void i915_gem_cleanup_ringbuffer(struct drm_device *dev);
int i915_gem_do_init(struct drm_device *dev, unsigned long start,
unsigned long end);
+int i915_gem_idle(struct drm_device *dev);
int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf);
int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj,
int write);
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index ac534c9..cd5101c 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2967,7 +2967,7 @@ i915_gem_evict_from_list(struct drm_device *dev, struct list_head *head)
return 0;
}
-static int
+int
i915_gem_idle(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1308
retrieving revision 1.1309
diff -u -r1.1308 -r1.1309
--- kernel.spec 18 Feb 2009 23:28:35 -0000 1.1308
+++ kernel.spec 18 Feb 2009 23:43:44 -0000 1.1309
@@ -642,6 +642,7 @@
Patch1814: drm-nouveau.patch
Patch1815: drm-intel-next.patch
Patch1816: drm-no-gem-on-i8xx.patch
+Patch1817: drm-intel-suspend.patch
# kludge to make ich9 e1000 work
Patch2000: linux-2.6-e1000-ich9.patch
@@ -1144,6 +1145,7 @@
ApplyPatch drm-nouveau.patch
ApplyPatch drm-intel-next.patch
ApplyPatch drm-no-gem-on-i8xx.patch
+ApplyPatch drm-intel-suspend.patch
# linux1394 git patches
ApplyPatch linux-2.6-firewire-git-update.patch
@@ -1740,6 +1742,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Wed Feb 18 2009 Kristian Høgsberg <krh at redhat.com>
+- Add drm-intel-suspend.patch to fix suspend/resume with intel KMS.
+
* Wed Feb 18 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.29-0.128.rc5.git2
- 2.6.29-rc5-git2
- Previous message (by thread): rpms/gtk2/devel disconnected-monitors.patch, NONE, 1.1 gtk2.spec, 1.360, 1.361
- Next message (by thread): rpms/xorg-x11-drv-evdev/devel xorg-x11-drv-evdev.spec, 1.42, 1.43 evdev-2.0.4-cache-info.patch, 1.2, NONE evdev-2.0.4-reopen-device.patch, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list