rpms/kernel/devel linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch, NONE, 1.1 kernel.spec, 1.195, 1.196
Dave Airlie (airlied)
fedora-extras-commits at redhat.com
Fri Sep 28 02:36:39 UTC 2007
Author: airlied
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23990
Modified Files:
kernel.spec
Added Files:
linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch
Log Message:
* Fri Sep 28 2007 Dave Airlie <airlied at redhat.com>
- Add i965 drm patch to fix vblank interrupts - should be upstream soon
linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch:
--- NEW FILE linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch ---
>From f1bc762616ca9c2922d39372e95cd37e0742bca0 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied at linux.ie>
Date: Fri, 28 Sep 2007 11:46:28 +1000
Subject: [PATCH] i915: make vbl interrupts work properly on i965g/gm hw.
This code is ported from the DRM git tree and allows the vblank interrupts
to function on the i965 hw. It also requires a change in Mesa's 965 driver
to actually use them.
Signed-off-by: Dave Airlie <airlied at linux.ie>
---
drivers/char/drm/i915_drv.h | 6 ++++++
drivers/char/drm/i915_irq.c | 12 ++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/drivers/char/drm/i915_drv.h b/drivers/char/drm/i915_drv.h
index bc04dfa..e064292 100644
--- a/drivers/char/drm/i915_drv.h
+++ b/drivers/char/drm/i915_drv.h
@@ -220,6 +220,12 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
#define I915REG_INT_MASK_R 0x020a8
#define I915REG_INT_ENABLE_R 0x020a0
+#define I915REG_PIPEASTAT 0x70024
+#define I915REG_PIPEBSTAT 0x71024
+
+#define I915_VBLANK_INTERRUPT_ENABLE (1UL<<17)
+#define I915_VBLANK_CLEAR (1UL<<1)
+
#define SRX_INDEX 0x3c4
#define SRX_DATA 0x3c5
#define SR01 1
diff --git a/drivers/char/drm/i915_irq.c b/drivers/char/drm/i915_irq.c
index 8fccbd6..2c97fe0 100644
--- a/drivers/char/drm/i915_irq.c
+++ b/drivers/char/drm/i915_irq.c
@@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
struct drm_device *dev = (struct drm_device *) arg;
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
u16 temp;
+ u32 pipea_stats, pipeb_stats;
+
+ pipea_stats = I915_READ(I915REG_PIPEASTAT);
+ pipeb_stats = I915_READ(I915REG_PIPEBSTAT);
temp = I915_READ16(I915REG_INT_IDENTITY_R);
@@ -225,6 +229,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
return IRQ_NONE;
I915_WRITE16(I915REG_INT_IDENTITY_R, temp);
+ (void) I915_READ16(I915REG_INT_IDENTITY_R);
+ DRM_READMEMORYBARRIER();
dev_priv->sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
@@ -252,6 +258,12 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
if (dev_priv->swaps_pending > 0)
drm_locked_tasklet(dev, i915_vblank_tasklet);
+ I915_WRITE(I915REG_PIPEASTAT,
+ pipea_stats|I915_VBLANK_INTERRUPT_ENABLE|
+ I915_VBLANK_CLEAR);
+ I915_WRITE(I915REG_PIPEBSTAT,
+ pipeb_stats|I915_VBLANK_INTERRUPT_ENABLE|
+ I915_VBLANK_CLEAR);
}
return IRQ_HANDLED;
--
1.5.3.1
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -r1.195 -r1.196
--- kernel.spec 27 Sep 2007 23:49:10 -0000 1.195
+++ kernel.spec 28 Sep 2007 02:36:06 -0000 1.196
@@ -676,9 +676,10 @@
Patch1512: linux-2.6-firewire-multi-lun.patch
Patch1515: linux-2.6-lirc.patch
-#nouveau
+#nouveau + drm fixes
Patch1800: drm-mm-git.patch
Patch1801: nouveau-drm.patch
+Patch1802: linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch
%endif
@@ -1001,9 +1002,10 @@
# setuid /proc/self/maps fix. (dependent on utrace)
ApplyPatch linux-2.6-proc-self-maps-fix.patch
-# Nouveau DRM
+# Nouveau DRM + drm fixes
ApplyPatch drm-mm-git.patch
ApplyPatch nouveau-drm.patch
+ApplyPatch linux-2.6-i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch
# enable sysrq-c on all kernels, not only kexec
ApplyPatch linux-2.6-sysrq-c.patch
@@ -1812,6 +1814,9 @@
%changelog
+* Fri Sep 28 2007 Dave Airlie <airlied at redhat.com>
+- Add i965 drm patch to fix vblank interrupts - should be upstream soon
+
* Thu Sep 27 2007 John W. Linville <linville at redhat.com>
- A few iwlwifi and ath5k fixes
More information about the fedora-extras-commits
mailing list