+ i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     i915: make vbl interrupts work properly on i965g/gm
has been added to the -mm tree.  Its filename is
     i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: i915: make vbl interrupts work properly on i965g/gm
From: Dave Airlie <airlied@xxxxxxxx>

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@xxxxxxxx>
Acked-by:  Jesse Barnes <jesse.barnes@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN drivers/char/drm/i915_drv.h~i915-make-vbl-interrupts-work-properly-on-i965g-gm drivers/char/drm/i915_drv.h
--- a/drivers/char/drm/i915_drv.h~i915-make-vbl-interrupts-work-properly-on-i965g-gm
+++ a/drivers/char/drm/i915_drv.h
@@ -210,6 +210,12 @@ extern int i915_wait_ring(struct drm_dev
 #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 -puN drivers/char/drm/i915_irq.c~i915-make-vbl-interrupts-work-properly-on-i965g-gm drivers/char/drm/i915_irq.c
--- a/drivers/char/drm/i915_irq.c~i915-make-vbl-interrupts-work-properly-on-i965g-gm
+++ a/drivers/char/drm/i915_irq.c
@@ -214,6 +214,10 @@ irqreturn_t i915_driver_irq_handler(DRM_
 	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_
 		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_
 
 		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;
_

Patches currently in -mm which might be from airlied@xxxxxxxx are

i915-make-vbl-interrupts-work-properly-on-i965g-gm.patch
working-3d-dri-intel-agpko-resume-for-i815-chip.patch
fix-use-after-free--double-free-bug-in-amd_create_gatt_pages--amd_free_gatt_pages.patch
git-drm.patch
drm-via-invalid-device-ids-removal.patch
agp-fix-race-condition-between-unmapping-and-freeing-pages.patch
convert-ill-defined-log2-to-ilog2.patch
use-helpers-to-obtain-task-pid-in-printks-drm-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux