radeon updates from 2.6.39 with cayman + fixes for lots of things including Fusion.

vblank fix for core drm
This commit is contained in:
Dave Airlie 2011-05-03 16:57:58 -04:00
parent 50ffc6fec5
commit 3bcf43a573
3 changed files with 4879 additions and 1 deletions

4807
drm-radeon-update.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,60 @@
From 498548ec69c6897fe4376b2ca90758762fa0b817 Mon Sep 17 00:00:00 2001
From: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Date: Wed, 27 Apr 2011 16:10:57 +1000
Subject: [PATCH 3/4] drm: Send pending vblank events before disabling vblank.
This is the least-bad behaviour. It means that we signal the
vblank event before it actually happens, but since we're disabling
vblanks there's no guarantee that it will *ever* happen otherwise.
This prevents GL applications which use WaitMSC from hanging
indefinitely.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/drm_irq.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 741457b..a1f12cb 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -932,11 +932,34 @@ EXPORT_SYMBOL(drm_vblank_put);
void drm_vblank_off(struct drm_device *dev, int crtc)
{
+ struct drm_pending_vblank_event *e, *t;
+ struct timeval now;
unsigned long irqflags;
+ unsigned int seq;
spin_lock_irqsave(&dev->vbl_lock, irqflags);
vblank_disable_and_save(dev, crtc);
DRM_WAKEUP(&dev->vbl_queue[crtc]);
+
+ /* Send any queued vblank events, lest the natives grow disquiet */
+ seq = drm_vblank_count_and_time(dev, crtc, &now);
+ list_for_each_entry_safe(e, t, &dev->vblank_event_list, base.link) {
+ if (e->pipe != crtc)
+ continue;
+ DRM_DEBUG("Sending premature vblank event on disable: \
+ wanted %d, current %d\n",
+ e->event.sequence, seq);
+
+ e->event.sequence = seq;
+ e->event.tv_sec = now.tv_sec;
+ e->event.tv_usec = now.tv_usec;
+ drm_vblank_put(dev, e->pipe);
+ list_move_tail(&e->base.link, &e->base.file_priv->event_list);
+ wake_up_interruptible(&e->base.file_priv->event_wait);
+ trace_drm_vblank_event_delivered(e->base.pid, e->pipe,
+ e->event.sequence);
+ }
+
spin_unlock_irqrestore(&dev->vbl_lock, irqflags);
}
EXPORT_SYMBOL(drm_vblank_off);
--
1.7.1

View File

@ -51,7 +51,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 22
%global baserelease 23
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -668,6 +668,7 @@ Patch800: linux-2.6-crash-driver.patch
Patch1555: fix_xen_guest_on_old_EC2.patch
# DRM
Patch1800: drm-vblank-events-fix-hangs.patch
# nouveau + drm fixes
Patch1809: drm-nouveau-fixes.patch
@ -682,6 +683,8 @@ Patch1824: drm-intel-next.patch
Patch1825: drm-intel-make-lvds-work.patch
Patch1826: drm-intel-edp-fixes.patch
Patch1828: drm-intel-eeebox-eb1007-quirk.patch
# radeon - new hw + fixes for fusion and t500 regression
Patch1840: drm-radeon-update.patch
Patch1900: linux-2.6-intel-iommu-igfx.patch
@ -1301,6 +1304,7 @@ ApplyPatch linux-2.6-e1000-ich9-montevina.patch
ApplyPatch fix_xen_guest_on_old_EC2.patch
# DRM core
ApplyPatch drm-vblank-events-fix-hangs.patch
# Nouveau DRM
ApplyPatch drm-ttm-move-notify.patch
@ -1316,6 +1320,9 @@ ApplyPatch drm-intel-edp-fixes.patch
ApplyPatch drm-i915-fix-pipelined-fencing.patch
ApplyPatch drm-intel-eeebox-eb1007-quirk.patch
# radeon DRM (add cayman support)
ApplyPatch drm-radeon-update.patch
# linux1394 git patches
#ApplyPatch linux-2.6-firewire-git-update.patch
#ApplyOptionalPatch linux-2.6-firewire-git-pending.patch
@ -1972,6 +1979,10 @@ fi
# and build.
%changelog
* Tue May 03 2011 Dave Airlie <airlied@redhat.com> 2.6.38.5-23
- radeon updates from 2.6.39 with cayman + fixes for lots of things including Fusion.
- vblank fix for core drm
* Mon May 02 2011 Chuck Ebbert <cebbert@redhat.com>
- [SCSI] mpt2sas: prevent heap overflows and unchecked reads
(CVE-2011-1494, CVE-2011-1495)