linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* i915 vsync interrupt fix
@ 2006-06-24  0:36 Jeremy Fitzhardinge
  2006-06-24  5:25 ` Keith Packard
  0 siblings, 1 reply; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2006-06-24  0:36 UTC (permalink / raw)
  To: airlied; +Cc: Linux Kernel Mailing List, Alan Hourihane, dri-devel

I need this patch from Alan Hourihane 
<mailto:alanh@fairlite.demon.co.uk> to make direct rendering work 
properly on my 945GM-based laptop. It comes from 
https://bugs.freedesktop.org/show_bug.cgi?id=7233.  This change is 
immediately useful to me now, but I don't know if the development DRM is 
going to be merged with the kernel any time soon (I notice CVS has a 
variant of this patch).

    J
/

/

From: Alan Hourihane <alanh@fairlite.demon.co.uk>

Look at vsync interrupts from pipe B as well as A.
https://bugs.freedesktop.org/show_bug.cgi?id=7233


diff -r 91a715ea44db drivers/char/drm/i915_irq.c
--- a/drivers/char/drm/i915_irq.c	Thu Jun 22 19:09:11 2006 -0700
+++ b/drivers/char/drm/i915_irq.c	Fri Jun 23 14:08:08 2006 -0700
@@ -44,7 +44,7 @@ irqreturn_t i915_driver_irq_handler(DRM_
 	u16 temp;
 
 	temp = I915_READ16(I915REG_INT_IDENTITY_R);
-	temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG);
+	temp &= (USER_INT_FLAG | VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG);
 
 	DRM_DEBUG("%s flag=%08x\n", __FUNCTION__, temp);
 
@@ -58,7 +58,7 @@ irqreturn_t i915_driver_irq_handler(DRM_
 	if (temp & USER_INT_FLAG)
 		DRM_WAKEUP(&dev_priv->irq_queue);
 
-	if (temp & VSYNC_PIPEA_FLAG) {
+	if (temp & (VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG)) {
 		atomic_inc(&dev->vbl_received);
 		DRM_WAKEUP(&dev->vbl_queue);
 		drm_vbl_send_signals(dev);
@@ -197,7 +197,7 @@ void i915_driver_irq_postinstall(drm_dev
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
 
-	I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | VSYNC_PIPEA_FLAG);
+	I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | VSYNC_PIPEA_FLAG | VSYNC_PIPEB_FLAG);
 	DRM_INIT_WAITQUEUE(&dev_priv->irq_queue);
 }
 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: i915 vsync interrupt fix
  2006-06-24  0:36 i915 vsync interrupt fix Jeremy Fitzhardinge
@ 2006-06-24  5:25 ` Keith Packard
  0 siblings, 0 replies; 2+ messages in thread
From: Keith Packard @ 2006-06-24  5:25 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: keithp, airlied, Alan Hourihane, Linux Kernel Mailing List, dri-devel

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

On Fri, 2006-06-23 at 17:36 -0700, Jeremy Fitzhardinge wrote:
> I need this patch from Alan Hourihane 
> <mailto:alanh@fairlite.demon.co.uk> to make direct rendering work 
> properly on my 945GM-based laptop. It comes from 
> https://bugs.freedesktop.org/show_bug.cgi?id=7233.  This change is 
> immediately useful to me now, but I don't know if the development DRM is 
> going to be merged with the kernel any time soon (I notice CVS has a 
> variant of this patch).

CVS has a more comprehensive patch where the X server tells the DRI
module which pipe it should use to signal vblank. With the patch posted,
a dual-head environment will generate interrupts on *both* pipes, which
will reduce performance while negating the desired synchronized
behaviour.

The more complete fix requires updated DRI bits and an updated
xf86-video-intel 2D driver, but no changes are needed in the Mesa GL
driver. This bumps the i915 DRM version to 1.5.

When we start looking at mergedfb environments, we may want to consider
an even more sophisticated fix where the vblank used depends on the
dominant monitor displaying the window. The patch I made won't help with
that, unfortunately.

-- 
keith.packard@intel.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-24  5:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-24  0:36 i915 vsync interrupt fix Jeremy Fitzhardinge
2006-06-24  5:25 ` Keith Packard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).