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

xserver-xorg-video-intel: Changes to 'debian-unstable'



Rebased ref, commits from common ancestor:
commit b740eb76bfba2238fc41c908229b27d1f8fbf359
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Jan 22 00:18:28 2009 +0100

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 4d67124..98d6f4d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-video-intel (2:2.6.1-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.6.1-1) experimental; urgency=low
 
   * New upstream release.
   * Build against xserver 1.6 rc1.
 
- -- Julien Cristau <jcristau@debian.org>  Thu, 22 Jan 2009 00:16:57 +0100
+ -- Julien Cristau <jcristau@debian.org>  Thu, 22 Jan 2009 00:18:25 +0100
 
 xserver-xorg-video-intel (2:2.6.0-1) experimental; urgency=low
 

commit 964e54acab67d6540a3d8509142b26d7c926b079
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Jan 22 00:18:23 2009 +0100

    Build against xserver 1.6 rc1.

diff --git a/debian/changelog b/debian/changelog
index 0ea424f..4d67124 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-intel (2:2.6.1-1) UNRELEASED; urgency=low
 
   * New upstream release.
+  * Build against xserver 1.6 rc1.
 
  -- Julien Cristau <jcristau@debian.org>  Thu, 22 Jan 2009 00:16:57 +0100
 
diff --git a/debian/control b/debian/control
index d185802..49dd92d 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends:
  debhelper (>= 5),
  quilt,
  pkg-config,
- xserver-xorg-dev (>= 2:1.5),
+ xserver-xorg-dev (>= 2:1.5.99.901),
  x11proto-gl-dev,
  x11proto-video-dev,
  libgl1-mesa-dev | libgl-dev,

commit 2cef2b9af63ec1ef89f96b58d06694c21f22592c
Author: Julien Cristau <jcristau@debian.org>
Date:   Thu Jan 22 00:17:12 2009 +0100

    Update changelogs

diff --git a/ChangeLog b/ChangeLog
index 84d9414..dabd57d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,189 @@
+commit 08683d1d053875bcacd7c358d66ef2bfad458a56
+Author: Eric Anholt <eric@anholt.net>
+Date:   Wed Jan 21 14:10:04 2009 -0800
+
+    Bump version to 2.6.1.
+
+commit 52d3c64f2b896966b934d647765674303a8dfa29
+Author: Jesse Barnes <jbarnes@virtuousgeek.org>
+Date:   Wed Jan 21 09:02:13 2009 -0800
+
+    Don't run in KD_TEXT mode even with KMS
+    
+    Leaving the VT in KD_TEXT mode keeps the kernel's blanking code active,
+    so when a DPMS event happens, the fb console is restored rather than X's
+    configuration.  On the downside it means the kernel won't print messages
+    in the background, which would be visible if a panic or emergency switch
+    occurred.  The proper fix here is a new kernel mode, which we can move
+    to when ready.
+    (cherry picked from commit 253b8db298f38676e47dc902534465054f7b58b8)
+
+commit 11c23dd22a737aaa52ef18cd65164da9c5115d3f
+Author: Jesse Barnes <jbarnes@virtuousgeek.org>
+Date:   Wed Jan 21 09:01:05 2009 -0800
+
+    Tear down batchbuffers unconditionally on LeaveVT
+    
+    Even if KMS is enabled we should do this, to avoid running batches that
+    depend on other state we tear down in LeaveVT.
+    (cherry picked from commit 131b414feb2ecabe31b538d65725ac4427a4387a)
+
+commit f519da8ba21ef27b4a2ed4516336b25c6feb824e
+Author: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
+Date:   Tue Jan 20 11:35:36 2009 +0800
+
+    Support sysfs backlight control for Sony laptops in xf86-video-intel
+    
+    The sony_laptop kernel module (since v2.6.23) supports backlight control
+    via the sysfs interface:
+    /sys/class/backlight/sony
+    
+    This patch will enable xf86-video-intel to use this backlight control method
+    for Sony VAIO Laptops with Intel integrated video.
+    (cherry picked from commit ada44c1c0edcd3ea9e41ed6b6fdb2bf0e87c9c67)
+
+commit e1c2f5d7afbd29dfb6f1e24589e13729ac71a2a7
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Jan 15 09:31:55 2009 -0800
+
+    Fix invarient state emits for DRI2 (do it per batch, since there's no lock).
+    (cherry picked from commit cab5b7a7b0e17414f98b2363b0961c87f32f9c05)
+
+commit 12ad7f650a01916fd05e0aee9a72f70b112e50a0
+Author: Eric Anholt <eric@anholt.net>
+Date:   Fri Jan 16 16:59:17 2009 -0800
+
+    Protect i915 textured video against batchbuffer wrapping.
+    (cherry picked from commit d89de6d60a86105a198d904821853e6ed7de3305)
+
+commit 6b299ffac73e7f2069f8207bda677a82e6a60c81
+Author: Eric Anholt <eric@anholt.net>
+Date:   Thu Jan 15 19:05:52 2009 -0800
+
+    Re-emit i915 composite setup when the batchbuffer wraps.
+    
+    This also introduces tests to make sure that we asked for enough reserved space
+    and that we don't allow wrapping at the wrong time.
+    
+    This fixes a hang during text rendering with DRI2 and a GL client running,
+    but could potentially affect text rendering with GEM in general with an
+    exceptional batchbuffer setup.
+    (cherry picked from commit db43b7870a37ea273941302096a6f00120dfae71)
+    (cherry picked from commit 15780c53f5717936ea10ac87aff8a881c172f1dc)
+
+commit 5cd65d965c8ed388275fe2084553302aad601d4a
+Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date:   Thu Jan 15 13:45:14 2009 +0800
+
+    Bump version 2.6.0
+
+commit ff67517db91a572a640e7a0ba247b8b71bfa2335
+Author: Owain G. Ainsworth <oga@openbsd.org>
+Date:   Tue Jan 13 18:42:44 2009 +0000
+
+    Fix ioctl type.
+    
+    I915_EMIT_IRQ is a read/write ioctl, not a write only. Found by OpenBSd's
+    kernel code which checks these things a long more strongly than Linux.
+    (cherry picked from commit 9f306193c4b128ec72c5b4db16d07302cee50ab5)
+
+commit e84f21db824b2e9e7fe660927ecfbbf04b068f7a
+Author: Owain G. Ainsworth <oga@openbsd.org>
+Date:   Tue Jan 13 17:02:59 2009 +0000
+
+    use ifdef __linux__ where needed.
+    
+    since modesetting is compiled by default now, ifdef __linux__ the linux
+    only includes and ioctls.
+    (cherry picked from commit 1e8588ad5087c69eb77399cfaab8e4ec15eb4da9)
+
+commit 70ba6d45c9a00756e0ad36a58136281adba138f9
+Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
+Date:   Wed Jan 14 16:39:08 2009 +0800
+
+    Revert "Assign rotation memory dri_bo to rotation pixmap."
+    
+    This reverts commit d994978488648a68ade0d518e5dd40d100e953ed.
+    This requires i830_set_pixmap_bo() on master that is not in
+    2.6 branch.
+
+commit 3743747dbcf538ddd6db882bde7243656d0c5596
+Author: Ma Ling <ling.ma@intel.com>
+Date:   Wed Jan 14 14:46:52 2009 +0800
+
+    Disable VGA plane reliably
+    
+    This fixes #17235, VGA random hang on recent G45/43 board.
+    From spec, SR01 bit 5 should be set before VGA plane disable through
+    control register, otherwise we might get random crash and lockups.
+    (cherry picked from commit db9f5915ce812144ffd9d2aa42e8ba856129c35e)
+
+commit d994978488648a68ade0d518e5dd40d100e953ed
+Author: Keith Packard <keithp@keithp.com>
+Date:   Tue Jan 13 20:01:49 2009 -0800
+
+    Assign rotation memory dri_bo to rotation pixmap.
+    
+    As the rotation memory and rotation pixmap are allocated separately (to make
+    rotation at startup work), the allocate dri_bo needs to be set in the pixmap
+    for acceleration to work. This restores the performance in rotated modes.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit a4b023c17b9c3bd65fb9466ddb8a953f60244402)
+
+commit 7c5afbbd3e7570224ceb4fa793fe230fd3a383fe
+Author: Bernhard Rosenkraenzer <bero@arklinux.org>
+Date:   Tue Jan 13 10:35:19 2009 -0800
+
+    UXA: Declare glyph cache picture as component-alpha when necessary.
+    
+    Without this, rendering component-alpha glyphs may break without a mask.
+    
+    Bug #19534.  Ported from fix by Michel Dänzer <daenzer@vmware.com> in
+    xserver commit 639f289dcdbe00a516820f573c01a8339e120ed4
+    (cherry picked from commit c80f1a9c5131721eaf87d12a7a67e603cdfed63b)
+
+commit c0bc3cf128d8e9e1ed643be1586593d42c8f5b49
+Author: Ma Ling <ling.ma@intel.com>
+Date:   Tue Jan 13 10:26:40 2009 +0800
+
+    set continuous-frequency flag in get modes function
+    
+    http://bugs.freedesktop.org/show_bug.cgi?id=19247
+    Because latest xorg will check whether the display is continuous frequency through one flag in monitor info structure,
+    if not it doesn't touch default modes. When laptop failed to fetch edid, We don't set the flag. In i830_lvds.c,
+    so currently we can not get default modes except only one mode line from bios.
+    In order to achieve default modes from xserver successfully,I set the flag and other EDID features.
+    (cherry picked from commit 3d206f9e46b5237bda7ca3c0f92d64c45ee8bdf5)
+
+commit 335d6bbdfd882eb98dc6ebd785ad2963abc6566d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Wed Nov 26 16:32:12 2008 +0800
+
+    Fix LVDS EDID to match all possible default modes
+    
+    If the EDID data from the LVDS doesn't indicate support for a wide range of
+    continuous frequencies, it will not match any of the default modes although
+    our LVDS scaler logic ignores refresh rates when programming LVDS modes. Fix
+    this by smashing the compute EDID data to open up the sync rates.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    (cherry picked from commit 3354e660b0744976871683ce226f17e873f26b50)
+
+commit 28a44ad59eec9a6421f4ed0de5614599ac17b0d6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Jan 9 16:30:15 2009 -0800
+
+    Remove xorgconfig & xorgcfg from See Also list in man page
+    (cherry picked from commit f1e9ca4e4fb3ddb083252aea79c67c5e5e71f29c)
+
+commit f42015d570733aaa0eb56da5ca63d72a5b2772f7
+Author: Ian Romanick <ian.d.romanick@intel.com>
+Date:   Wed Jan 7 21:45:54 2009 -0800
+
+    Prevent redefinitions of CARD8 and friends.  Fixes build.
+    (cherry picked from commit 91c49067abab262edce54d33af8bfc03eee20f2e)
+
 commit 4447973345a2a7af20ba1d6cb18c5f1ed8949d00
 Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
 Date:   Thu Jan 8 14:34:11 2009 +0800
diff --git a/debian/changelog b/debian/changelog
index b3048a5..0ea424f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.6.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Julien Cristau <jcristau@debian.org>  Thu, 22 Jan 2009 00:16:57 +0100
+
 xserver-xorg-video-intel (2:2.6.0-1) experimental; urgency=low
 
   * New upstream release.

commit 08683d1d053875bcacd7c358d66ef2bfad458a56
Author: Eric Anholt <eric@anholt.net>
Date:   Wed Jan 21 14:10:04 2009 -0800

    Bump version to 2.6.1.

diff --git a/configure.ac b/configure.ac
index 249e9a9..2958a0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.6.0,
+        2.6.1,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit 52d3c64f2b896966b934d647765674303a8dfa29
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Jan 21 09:02:13 2009 -0800

    Don't run in KD_TEXT mode even with KMS
    
    Leaving the VT in KD_TEXT mode keeps the kernel's blanking code active,
    so when a DPMS event happens, the fb console is restored rather than X's
    configuration.  On the downside it means the kernel won't print messages
    in the background, which would be visible if a panic or emergency switch
    occurred.  The proper fix here is a new kernel mode, which we can move
    to when ready.
    (cherry picked from commit 253b8db298f38676e47dc902534465054f7b58b8)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 247425c..92f1554 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1131,10 +1131,6 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.
  */
-#ifdef __linux__
-#include <linux/kd.h>
-#endif
-
 static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
 {
 #if XSERVER_LIBPCIACCESS
@@ -1159,10 +1155,6 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
     if (ret)
 	return FALSE;
 
-#ifdef __linux__
-    ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
-#endif
-
     return TRUE;
 }
 #else

commit 11c23dd22a737aaa52ef18cd65164da9c5115d3f
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Wed Jan 21 09:01:05 2009 -0800

    Tear down batchbuffers unconditionally on LeaveVT
    
    Even if KMS is enabled we should do this, to avoid running batches that
    depend on other state we tear down in LeaveVT.
    (cherry picked from commit 131b414feb2ecabe31b538d65725ac4427a4387a)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 70d660a..247425c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3559,7 +3559,6 @@ I830LeaveVT(int scrnIndex, int flags)
 	*/
        if (!pI830->memory_manager)
 	   intel_bufmgr_fake_evict_all(pI830->bufmgr);
-       intel_batch_teardown(pScrn);
 
        if (!pI830->memory_manager)
 	   i830_stop_ring(pScrn, TRUE);
@@ -3570,6 +3569,8 @@ I830LeaveVT(int scrnIndex, int flags)
        }
    }
 
+   intel_batch_teardown(pScrn);
+
    if (I830IsPrimary(pScrn))
       i830_unbind_all_memory(pScrn);
 

commit f519da8ba21ef27b4a2ed4516336b25c6feb824e
Author: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
Date:   Tue Jan 20 11:35:36 2009 +0800

    Support sysfs backlight control for Sony laptops in xf86-video-intel
    
    The sony_laptop kernel module (since v2.6.23) supports backlight control
    via the sysfs interface:
    /sys/class/backlight/sony
    
    This patch will enable xf86-video-intel to use this backlight control method
    for Sony VAIO Laptops with Intel integrated video.
    (cherry picked from commit ada44c1c0edcd3ea9e41ed6b6fdb2bf0e87c9c67)

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 639450a..1bb9bb9 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -83,6 +83,7 @@ static char *backlight_interfaces[] = {
     "acpi_video1",
     "acpi_video0",
     "fujitsu-laptop",
+    "sony",
     NULL,
 };
 

commit e1c2f5d7afbd29dfb6f1e24589e13729ac71a2a7
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jan 15 09:31:55 2009 -0800

    Fix invarient state emits for DRI2 (do it per batch, since there's no lock).
    (cherry picked from commit cab5b7a7b0e17414f98b2363b0961c87f32f9c05)

diff --git a/configure.ac b/configure.ac
index bb69f72..249e9a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -209,7 +209,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.0])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index b1c8a8d..671e8c8 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -117,6 +117,12 @@ intel_next_batch(ScrnInfoPtr pScrn)
 
     pI830->batch_used = 0;
     pI830->batch_ptr = pI830->batch_bo->virtual;
+
+    /* If we are using DRI2, we don't know when another client has executed,
+     * so we have to reinitialize our 3D state per batch.
+     */
+    if (pI830->directRenderingType == DRI_DRI2)
+	*pI830->last_3d = LAST_3D_OTHER;
 }
 
 void

commit 12ad7f650a01916fd05e0aee9a72f70b112e50a0
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Jan 16 16:59:17 2009 -0800

    Protect i915 textured video against batchbuffer wrapping.
    (cherry picked from commit d89de6d60a86105a198d904821853e6ed7de3305)

diff --git a/src/i915_video.c b/src/i915_video.c
index 7761a45..b903b5e 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -49,8 +49,9 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
 {
    I830Ptr pI830 = I830PTR(pScrn);
    uint32_t format, ms3, s5;
-   BoxPtr pbox;
-   int nbox, dxo, dyo, pix_xoff, pix_yoff;
+   BoxPtr pbox = REGION_RECTS(dstRegion);
+   int nbox = REGION_NUM_RECTS(dstRegion);
+   int dxo, dyo, pix_xoff, pix_yoff;
    Bool planar;
 
 #if 0
@@ -72,6 +73,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       return;
    }
 
+   intel_batch_start_atomic(pScrn, 200 + 20 * nbox);
+
    IntelEmitInvarientState(pScrn);
    *pI830->last_3d = LAST_3D_VIDEO;
 
@@ -362,8 +365,6 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
    dxo = dstRegion->extents.x1;
    dyo = dstRegion->extents.y1;
 
-   pbox = REGION_RECTS(dstRegion);
-   nbox = REGION_NUM_RECTS(dstRegion);
    while (nbox--)
    {
       int box_x1 = pbox->x1;
@@ -412,6 +413,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
       ADVANCE_BATCH();
    }
 
+   intel_batch_end_atomic(pScrn);
+
    i830MarkSync(pScrn);
 }
 

commit 6b299ffac73e7f2069f8207bda677a82e6a60c81
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jan 15 19:05:52 2009 -0800

    Re-emit i915 composite setup when the batchbuffer wraps.
    
    This also introduces tests to make sure that we asked for enough reserved space
    and that we don't allow wrapping at the wrong time.
    
    This fixes a hang during text rendering with DRI2 and a GL client running,
    but could potentially affect text rendering with GEM in general with an
    exceptional batchbuffer setup.
    (cherry picked from commit db43b7870a37ea273941302096a6f00120dfae71)
    (cherry picked from commit 15780c53f5717936ea10ac87aff8a881c172f1dc)

diff --git a/src/i830.h b/src/i830.h
index dd5555d..e88cced 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -437,6 +437,10 @@ typedef struct _I830Rec {
    /** Number of bytes to be emitted in the current BEGIN_BATCH. */
    uint32_t batch_emitting;
    dri_bo *batch_bo;
+   /** Whether we're in a section of code that can't tolerate flushing */
+   Bool in_batch_atomic;
+   /** Ending batch_used that was verified by i830_start_batch_atomic() */
+   int batch_atomic_limit;
 
 #ifdef I830_XV
    /* For Xvideo */
@@ -586,6 +590,15 @@ typedef struct _I830Rec {
    uint32_t mapstate[6];
    uint32_t samplerstate[6];
 
+   struct {
+      int op;
+      PicturePtr pSrcPicture, pMaskPicture, pDstPicture;
+      PixmapPtr pSrc, pMask, pDst;
+      uint32_t dst_format;
+      Bool is_nearest;
+      Bool needs_emit;
+   } i915_render_state;
+
    /* 965 render acceleration state */
    struct gen4_render_state *gen4_render_state;
 
@@ -928,6 +941,9 @@ Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 Bool i915_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 			    PicturePtr pDst, PixmapPtr pSrcPixmap,
 			    PixmapPtr pMaskPixmap, PixmapPtr pDstPixmap);
+void i915_composite(PixmapPtr pDst, int srcX, int srcY,
+		    int maskX, int maskY, int dstX, int dstY, int w, int h);
+void i915_batch_flush_notify(ScrnInfoPtr pScrn);
 /* i965_render.c */
 unsigned int gen4_render_state_size(ScrnInfoPtr pScrn);
 void gen4_render_state_init(ScrnInfoPtr pScrn);
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h
index 0511493..a72786e 100644
--- a/src/i830_batchbuffer.h
+++ b/src/i830_batchbuffer.h
@@ -51,6 +51,28 @@ intel_batch_require_space(ScrnInfoPtr pScrn, I830Ptr pI830, GLuint sz)
 }
 
 static inline void
+intel_batch_start_atomic(ScrnInfoPtr pScrn, unsigned int sz)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    assert(!pI830->in_batch_atomic);
+    intel_batch_require_space(pScrn, pI830, sz);
+
+    pI830->in_batch_atomic = TRUE;
+    pI830->batch_atomic_limit = pI830->batch_used + sz * 4;
+}
+
+static inline void
+intel_batch_end_atomic(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    assert(pI830->in_batch_atomic);
+    assert(pI830->batch_used <= pI830->batch_atomic_limit);
+    pI830->in_batch_atomic = FALSE;
+}
+
+static inline void
 intel_batch_emit_dword(I830Ptr pI830, uint32_t dword)
 {
     assert(pI830->batch_ptr != NULL);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4c40d40..70d660a 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3345,6 +3345,8 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
 
    if (IS_I965G(pI830))
        pI830->batch_flush_notify = i965_batch_flush_notify;
+   else if (IS_I9XX(pI830))
+       pI830->batch_flush_notify = i915_batch_flush_notify;
    else
        pI830->batch_flush_notify = NULL;
 
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 29445ac..24ebc37 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -702,7 +702,7 @@ I830EXAInit(ScreenPtr pScreen)
     {
 	pI830->EXADriverPtr->CheckComposite = i915_check_composite;
    	pI830->EXADriverPtr->PrepareComposite = i915_prepare_composite;
-    	pI830->EXADriverPtr->Composite = i830_composite;
+	pI830->EXADriverPtr->Composite = i915_composite;
     	pI830->EXADriverPtr->DoneComposite = i830_done_composite;
     } else {
  	pI830->EXADriverPtr->CheckComposite = i965_check_composite;
@@ -940,7 +940,7 @@ i830_uxa_init (ScreenPtr pScreen)
     {
 	i830->uxa_driver->check_composite = i915_check_composite;
    	i830->uxa_driver->prepare_composite = i915_prepare_composite;
-    	i830->uxa_driver->composite = i830_composite;
+	i830->uxa_driver->composite = i915_composite;
     	i830->uxa_driver->done_composite = i830_done_composite;
     } else {
  	i830->uxa_driver->check_composite = i965_check_composite;
diff --git a/src/i915_render.c b/src/i915_render.c
index ab288e1..5dd97e6 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -315,39 +315,69 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 {
     ScrnInfoPtr pScrn = xf86Screens[pSrcPicture->pDrawable->pScreen->myNum];
     I830Ptr pI830 = I830PTR(pScrn);
-    uint32_t dst_format, dst_pitch;
-    uint32_t blendctl;
-    int out_reg = FS_OC;
-    FS_LOCALS(20);
-    Bool is_affine_src, is_affine_mask;
-    Bool is_nearest = FALSE;
 
     i830_exa_check_pitch_3d(pSrc);
     if (pMask)
 	i830_exa_check_pitch_3d(pMask);
     i830_exa_check_pitch_3d(pDst);
 
-    IntelEmitInvarientState(pScrn);
-    *pI830->last_3d = LAST_3D_RENDER;
-
-    if (!i915_get_dest_format(pDstPicture, &dst_format))
+    if (!i915_get_dest_format(pDstPicture,
+			      &pI830->i915_render_state.dst_format))
 	return FALSE;
-    dst_pitch = intel_get_pixmap_pitch(pDst);
 
+    pI830->i915_render_state.is_nearest = FALSE;
     if (!i915_texture_setup(pSrcPicture, pSrc, 0))
 	I830FALLBACK("fail to setup src texture\n");
     if (pSrcPicture->filter == PictFilterNearest)
-	is_nearest = TRUE;
+	pI830->i915_render_state.is_nearest = TRUE;
     if (pMask != NULL) {
 	if (!i915_texture_setup(pMaskPicture, pMask, 1))
 	    I830FALLBACK("fail to setup mask texture\n");
 	if (pMaskPicture->filter == PictFilterNearest)
-	    is_nearest = TRUE;
+	    pI830->i915_render_state.is_nearest = TRUE;
     } else {
 	pI830->transform[1] = NULL;
 	pI830->scale_units[1][0] = -1;
 	pI830->scale_units[1][1] = -1;
     }
+
+    pI830->i915_render_state.op = op;
+    pI830->i915_render_state.pSrcPicture = pSrcPicture;
+    pI830->i915_render_state.pMaskPicture = pMaskPicture;
+    pI830->i915_render_state.pDstPicture = pDstPicture;
+    pI830->i915_render_state.pSrc = pSrc;
+    pI830->i915_render_state.pMask = pMask;
+    pI830->i915_render_state.pDst = pDst;
+    pI830->i915_render_state.needs_emit = TRUE;
+
+    return TRUE;
+}
+
+static void
+i915_emit_composite_setup(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    int op = pI830->i915_render_state.op;
+    PicturePtr pSrcPicture = pI830->i915_render_state.pSrcPicture;
+    PicturePtr pMaskPicture = pI830->i915_render_state.pMaskPicture;
+    PicturePtr pDstPicture = pI830->i915_render_state.pDstPicture;
+    PixmapPtr pSrc = pI830->i915_render_state.pSrc;
+    PixmapPtr pMask = pI830->i915_render_state.pMask;
+    PixmapPtr pDst = pI830->i915_render_state.pDst;
+    uint32_t dst_format = pI830->i915_render_state.dst_format, dst_pitch;
+    uint32_t blendctl;
+    int out_reg = FS_OC;
+    FS_LOCALS(20);
+    Bool is_affine_src, is_affine_mask;
+    Bool is_nearest = pI830->i915_render_state.is_nearest;
+
+    pI830->i915_render_state.needs_emit = FALSE;
+
+    IntelEmitInvarientState(pScrn);
+    *pI830->last_3d = LAST_3D_RENDER;
+
+    dst_pitch = intel_get_pixmap_pitch(pDst);
+
     is_affine_src = i830_transform_is_affine (pI830->transform[0]);
     is_affine_mask = i830_transform_is_affine (pI830->transform[1]);
 
@@ -503,6 +533,29 @@ i915_prepare_composite(int op, PicturePtr pSrcPicture,
 	i915_fs_mov(FS_OC, i915_fs_operand(out_reg, W, W, W, W));
 
     FS_END();
+}
 
-    return TRUE;
+void
+i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
+	       int dstX, int dstY, int w, int h)
+{
+    ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    intel_batch_start_atomic(pScrn, 150);
+
+    if (pI830->i915_render_state.needs_emit)
+	i915_emit_composite_setup(pScrn);
+
+    i830_composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, w, h);
+
+    intel_batch_end_atomic(pScrn);
+}
+
+void
+i915_batch_flush_notify(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+
+    pI830->i915_render_state.needs_emit = TRUE;
 }

commit 0856c81e9cd907803e3de851b24b9baa104b1b00
Author: Brice Goglin <bgoglin@loulous.org>
Date:   Thu Jan 15 10:54:29 2009 +0100

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index a8ecfd0..b3048a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,8 @@
-xserver-xorg-video-intel (2:2.6.0-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.6.0-1) experimental; urgency=low
 
   * New upstream release.
 
- -- Brice Goglin <bgoglin@debian.org>  Thu, 15 Jan 2009 10:53:48 +0100
+ -- Brice Goglin <bgoglin@debian.org>  Thu, 15 Jan 2009 10:54:17 +0100
 
 xserver-xorg-video-intel (2:2.5.99.2-1) experimental; urgency=low
 

commit 02ab5d882a8cc143d41460a27c1a27bc173bb2fc
Author: Brice Goglin <bgoglin@loulous.org>
Date:   Thu Jan 15 10:16:40 2009 +0100

    New upstream release

diff --git a/debian/changelog b/debian/changelog
index 7c895d7..a8ecfd0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-intel (2:2.6.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Brice Goglin <bgoglin@debian.org>  Thu, 15 Jan 2009 10:53:48 +0100
+
 xserver-xorg-video-intel (2:2.5.99.2-1) experimental; urgency=low
 
   * New upstream release.

commit 5cd65d965c8ed388275fe2084553302aad601d4a
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Thu Jan 15 13:45:14 2009 +0800

    Bump version 2.6.0

diff --git a/configure.ac b/configure.ac
index d0f47ab..bb69f72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 
 AC_PREREQ(2.57)
 AC_INIT([xf86-video-intel],
-        2.5.99.2,
+        2.6.0,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         xf86-video-intel)
 

commit ff67517db91a572a640e7a0ba247b8b71bfa2335
Author: Owain G. Ainsworth <oga@openbsd.org>
Date:   Tue Jan 13 18:42:44 2009 +0000

    Fix ioctl type.
    
    I915_EMIT_IRQ is a read/write ioctl, not a write only. Found by OpenBSd's
    kernel code which checks these things a long more strongly than Linux.
    (cherry picked from commit 9f306193c4b128ec72c5b4db16d07302cee50ab5)

diff --git a/src/i830_accel.c b/src/i830_accel.c
index 7dff714..5ee53bb 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -205,7 +205,7 @@ I830Sync(ScrnInfoPtr pScrn)
 	* register reads for idle.
 	*/
        emit.irq_seq = &wait.irq_seq;
-       ret = drmCommandWrite(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit,
+       ret = drmCommandWriteRead(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit,
 			    sizeof(emit));
        if (ret != 0)
 	   FatalError("Failure to emit IRQ: %s\n", strerror(-ret));

commit e84f21db824b2e9e7fe660927ecfbbf04b068f7a
Author: Owain G. Ainsworth <oga@openbsd.org>
Date:   Tue Jan 13 17:02:59 2009 +0000

    use ifdef __linux__ where needed.
    
    since modesetting is compiled by default now, ifdef __linux__ the linux
    only includes and ioctls.
    (cherry picked from commit 1e8588ad5087c69eb77399cfaab8e4ec15eb4da9)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index beb134d..4c40d40 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1131,7 +1131,9 @@ i830SetHotkeyControl(ScrnInfoPtr pScrn, int mode)
  * DRM mode setting Linux only at this point... later on we could
  * add a wrapper here.
  */
+#ifdef __linux__
 #include <linux/kd.h>
+#endif
 
 static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
 {
@@ -1157,7 +1159,9 @@ static Bool i830_kernel_mode_enabled(ScrnInfoPtr pScrn)
     if (ret)
 	return FALSE;
 
+#ifdef __linux__
     ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT);
+#endif
 
     return TRUE;
 }

commit 70ba6d45c9a00756e0ad36a58136281adba138f9
Author: Zhenyu Wang <zhenyu.z.wang@intel.com>
Date:   Wed Jan 14 16:39:08 2009 +0800

    Revert "Assign rotation memory dri_bo to rotation pixmap."
    
    This reverts commit d994978488648a68ade0d518e5dd40d100e953ed.
    This requires i830_set_pixmap_bo() on master that is not in
    2.6 branch.

diff --git a/src/i830_display.c b/src/i830_display.c
index e1ba661..022d519 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1624,7 +1624,6 @@ static PixmapPtr
 i830_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 {
     ScrnInfoPtr pScrn = crtc->scrn;
-    I830CrtcPrivatePtr intel_crtc = crtc->driver_private;
     I830Ptr pI830 = I830PTR(pScrn);
     unsigned long rotate_pitch;
     PixmapPtr rotate_pixmap;
@@ -1645,8 +1644,6 @@ i830_crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		   "Couldn't allocate shadow pixmap for rotated CRTC\n");
     }
-    if (intel_crtc->rotate_mem && intel_crtc->rotate_mem->bo)
-	i830_set_pixmap_bo(rotate_pixmap, intel_crtc->rotate_mem->bo);
     return rotate_pixmap;
 }
 

commit 0d928a729af1866bd4dca2f87e3ac654e0907ce9
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Jan 14 08:08:36 2009 +0100

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 8fb9b36..7c895d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-xserver-xorg-video-intel (2:2.5.99.2-1) UNRELEASED; urgency=low
+xserver-xorg-video-intel (2:2.5.99.2-1) experimental; urgency=low
 
   * New upstream release.
     + doesn't crash on EnterVT with libdrm 2.4.3 (closes: #511263)
   * Update libdrm-dev build-dep to 2.4.3.
 
- -- Julien Cristau <jcristau@debian.org>  Fri, 09 Jan 2009 02:56:44 +0100
+ -- Julien Cristau <jcristau@debian.org>  Wed, 14 Jan 2009 08:08:20 +0100
 
 xserver-xorg-video-intel (2:2.5.1-1) experimental; urgency=low
 

commit e6f0534d6da36982a0790b95ea9cdaf632c51fb6
Author: Julien Cristau <jcristau@debian.org>
Date:   Wed Jan 14 08:08:04 2009 +0100

    add bug closer

diff --git a/debian/changelog b/debian/changelog
index f06a042..8fb9b36 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-intel (2:2.5.99.2-1) UNRELEASED; urgency=low
 
   * New upstream release.
+    + doesn't crash on EnterVT with libdrm 2.4.3 (closes: #511263)
   * Update libdrm-dev build-dep to 2.4.3.
 
  -- Julien Cristau <jcristau@debian.org>  Fri, 09 Jan 2009 02:56:44 +0100

commit 3743747dbcf538ddd6db882bde7243656d0c5596
Author: Ma Ling <ling.ma@intel.com>
Date:   Wed Jan 14 14:46:52 2009 +0800

    Disable VGA plane reliably
    
    This fixes #17235, VGA random hang on recent G45/43 board.
    From spec, SR01 bit 5 should be set before VGA plane disable through
    control register, otherwise we might get random crash and lockups.
    (cherry picked from commit db9f5915ce812144ffd9d2aa42e8ba856129c35e)

diff --git a/src/i830_display.c b/src/i830_display.c
index 82a068c..e1ba661 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -779,6 +779,37 @@ static void i830_modeset_ctl(xf86CrtcPtr crtc, int dpms_state)
 }
 #endif /* DRM_IOCTL_MODESET_CTL && (XF86DRI || DRI2) */
 
+static void
+i830_disable_vga_plane (xf86CrtcPtr crtc)
+{
+    ScrnInfoPtr pScrn = crtc->scrn;
+    I830Ptr pI830 = I830PTR(pScrn);
+    uint32_t vgacntrl = INREG(VGACNTRL);
+    uint8_t sr01;
+
+    if (vgacntrl & VGA_DISP_DISABLE)
+	return;
+
+    /*
+       Set bit 5 of SR01;
+       Wait 30us;
+       */
+    OUTREG8(SRX, 1);
+    sr01 = INREG8(SRX + 1);
+    OUTREG8(SRX + 1, sr01 | (1 << 5));
+    usleep(30);
+
+    vgacntrl |= VGA_DISP_DISABLE;
+
+    /* disable center mode */
+    if (IS_I9XX(pI830))
+	vgacntrl &= ~(3 << 24);
+
+    OUTREG(VGACNTRL, vgacntrl);
+    i830WaitForVblank(pScrn);
+
+}
+
 /**
  * Sets the power management mode of the pipe and plane.
  *
@@ -903,8 +934,7 @@ i830_crtc_dpms(xf86CrtcPtr crtc, int mode)
 	}
 
 	/* Disable the VGA plane that we never use. */
-	OUTREG(VGACNTRL, VGA_DISP_DISABLE);
-	i830WaitForVblank(pScrn);
+	i830_disable_vga_plane (crtc);
 
 	break;
     }

commit d994978488648a68ade0d518e5dd40d100e953ed
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Jan 13 20:01:49 2009 -0800

    Assign rotation memory dri_bo to rotation pixmap.
    
    As the rotation memory and rotation pixmap are allocated separately (to make
    rotation at startup work), the allocate dri_bo needs to be set in the pixmap
    for acceleration to work. This restores the performance in rotated modes.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit a4b023c17b9c3bd65fb9466ddb8a953f60244402)

diff --git a/src/i830_display.c b/src/i830_display.c
index 7a9999a..82a068c 100644
--- a/src/i830_display.c


Reply to: