rpms/xorg-x11-drv-i810/devel intel-2.0-vblank-power-savings.patch, NONE, 1.1 xorg-x11-drv-i810.spec, 1.56, 1.57
Adam Jackson (ajax)
fedora-extras-commits at redhat.com
Mon May 14 21:50:04 UTC 2007
Author: ajax
Update of /cvs/pkgs/rpms/xorg-x11-drv-i810/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29423
Modified Files:
xorg-x11-drv-i810.spec
Added Files:
intel-2.0-vblank-power-savings.patch
Log Message:
* Mon May 14 2007 Adam Jackson <ajax at redhat.com> 2.0.0-3
- intel-2.0-vblank-power-savings.patch: Disable vblank interrupts when no
DRI clients are active, for better battery life.
intel-2.0-vblank-power-savings.patch:
--- NEW FILE intel-2.0-vblank-power-savings.patch ---
From: Eric Anholt <eric at anholt.net>
Date: Thu, 3 May 2007 20:44:12 +0000 (-0700)
Subject: Disable vblank interrupts when no DRI clients are running.
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-intel.git;a=commitdiff;h=3b769af53e0ef6ef9b56afd679446c73a0e63ea5
Disable vblank interrupts when no DRI clients are running.
---
--- a/src/i830.h
+++ b/src/i830.h
@@ -326,6 +326,7 @@ typedef struct _I830Rec {
unsigned int third_tiled;
unsigned int depth_tiled;
+ Bool want_vblank_interrupts;
#ifdef DAMAGE
DamagePtr pDamage;
RegionRec driRegion;
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -590,13 +590,13 @@ I830DRIScreenInit(ScreenPtr pScreen)
}
pDRIInfo->TransitionTo2d = I830DRITransitionTo2d;
+ pDRIInfo->TransitionTo3d = I830DRITransitionTo3d;
#if DRIINFO_MAJOR_VERSION > 5 || \
(DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 1)
if (!pDRIInfo->ClipNotify)
#endif
{
- pDRIInfo->TransitionTo3d = I830DRITransitionTo3d;
pDRIInfo->TransitionSingleToMulti3D = I830DRITransitionSingleToMulti3d;
pDRIInfo->TransitionMultiToSingle3D = I830DRITransitionMultiToSingle3d;
}
@@ -1543,16 +1543,24 @@ I830DRITransitionTo3d(ScreenPtr pScreen)
I830Ptr pI830 = I830PTR(pScrn);
I830DRISetPfMask(pScreen, pI830->allowPageFlip ? 0x3 : 0);
+
+ pI830->want_vblank_interrupts = TRUE;
+ I830DRISetVBlankInterrupt(pScrn, TRUE);
}
static void
I830DRITransitionTo2d(ScreenPtr pScreen)
{
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ I830Ptr pI830 = I830PTR(pScrn);
drmI830Sarea *sPriv = (drmI830Sarea *) DRIGetSAREAPrivate(pScreen);
I830DRISetPfMask(pScreen, 0);
sPriv->pf_enabled = 0;
+
+ pI830->want_vblank_interrupts = FALSE;
+ I830DRISetVBlankInterrupt(pScrn, FALSE);
}
#if DRI_SUPPORTS_CLIP_NOTIFY
@@ -1684,6 +1692,12 @@ I830DRISetVBlankInterrupt (ScrnInfoPtr p
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
drmI830VBlankPipe pipe;
+ /* If we have no 3d running, then don't bother enabling the vblank
+ * interrupt.
+ */
+ if (!pI830->want_vblank_interrupts)
+ on = FALSE;
+
if (pI830->directRenderingEnabled && pI830->drmMinor >= 5) {
if (on) {
if (xf86_config->num_crtc > 1 && xf86_config->crtc[1]->enabled)
Index: xorg-x11-drv-i810.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-i810/devel/xorg-x11-drv-i810.spec,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- xorg-x11-drv-i810.spec 1 May 2007 18:25:18 -0000 1.56
+++ xorg-x11-drv-i810.spec 14 May 2007 21:49:30 -0000 1.57
@@ -7,7 +7,7 @@
Summary: Xorg X11 i810 video driver(s)
Name: xorg-x11-drv-i810
Version: 2.0.0
-Release: 2%{?dist}
+Release: 3%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -18,6 +18,7 @@
Source2: i810.xinf
# new school intel driver patches
+Patch0: intel-2.0-vblank-power-savings.patch
# legacy i810 driver patches
Patch100: i810-1.6.5-to-git-20060911.patch
@@ -59,6 +60,8 @@
cd ..
rm -rf xf86-video-intel-%{version}
tar jxf %{SOURCE1}
+cd xf86-video-intel-%{version}
+%patch0 -p1 -b .vblank-interrupt
%build
OPTS="--disable-static --libdir=%{_libdir} --mandir=%{_mandir} --enable-dri"
@@ -100,6 +103,10 @@
%{_libdir}/libI810XvMC.so
%changelog
+* Mon May 14 2007 Adam Jackson <ajax at redhat.com> 2.0.0-3
+- intel-2.0-vblank-power-savings.patch: Disable vblank interrupts when no
+ DRI clients are active, for better battery life.
+
* Tue May 01 2007 Adam Jackson <ajax at redhat.com> 2.0.0-2
- Rebuild for final RANDR 1.2 ABI. Fixes segfault at startup. (#238575)
More information about the fedora-extras-commits
mailing list