xf86-video-intel: Branch 'xf86-video-intel-2.6-branch' - 10 commits - configure.ac src/drmmode_display.c src/i830_driver.c src/i830_exa.c src/i830.h src/i830_memory.c src/i830_quirks.c src/i965_render.c

Zhenyu Wang zhen at kemper.freedesktop.org
Mon Dec 29 18:48:56 PST 2008


 configure.ac          |    8 +++-----
 src/drmmode_display.c |   12 ++++++++++--
 src/i830.h            |    6 ------
 src/i830_driver.c     |   10 ++++++++--
 src/i830_exa.c        |    2 +-
 src/i830_memory.c     |    5 ++++-
 src/i830_quirks.c     |    1 +
 src/i965_render.c     |   11 +++++------
 8 files changed, 32 insertions(+), 23 deletions(-)

New commits:
commit 6371dbbee3051d7ac614f5d7a794519a4c04deeb
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 10:41:02 2008 -0800

    Add PCI write posting to LeaveVT path when we're about to wait on write results.
    (cherry picked from commit 3544bbe22d8cf2640289e1e4febe755a47f26631)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 6fed32d..90fa507 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2339,6 +2339,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
       OUTREG(DPLL_A_MD, pI830->saveDPLL_A_MD);
    else
       OUTREG(DPLL_A, pI830->saveDPLL_A);
+   POSTING_READ(DPLL_A);
    i830_dpll_settle();
 
    /* Restore mode config */
@@ -2362,6 +2363,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
    }
 
    OUTREG(PIPEACONF, pI830->savePIPEACONF);
+   POSTING_READ(PIPEACONF);
    i830WaitForVblank(pScrn);
 
    /*
@@ -2374,12 +2376,14 @@ RestoreHWState(ScrnInfoPtr pScrn)
        DISPPLANE_SEL_PIPE_A) {
        OUTREG(DSPACNTR, pI830->saveDSPACNTR);
        OUTREG(DSPABASE, INREG(DSPABASE));
+       POSTING_READ(DSPABASE);
        i830WaitForVblank(pScrn);
    }
    if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) ==
        DISPPLANE_SEL_PIPE_A) {
        OUTREG(DSPBCNTR, pI830->saveDSPBCNTR);
        OUTREG(DSPBBASE, INREG(DSPBBASE));
+       POSTING_READ(DSPBBASE);
        i830WaitForVblank(pScrn);
    }
 
@@ -2403,6 +2407,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
 	 OUTREG(DPLL_B_MD, pI830->saveDPLL_B_MD);
       else
 	 OUTREG(DPLL_B, pI830->saveDPLL_B);
+      POSTING_READ(DPLL_B);
       i830_dpll_settle();
    
       /* Restore mode config */
@@ -2425,6 +2430,7 @@ RestoreHWState(ScrnInfoPtr pScrn)
       }
 
       OUTREG(PIPEBCONF, pI830->savePIPEBCONF);
+      POSTING_READ(PIPEBCONF);
       i830WaitForVblank(pScrn);
 
       /*
commit c40fdef11420fadc1a6d7a3d63dea8b85ce402f2
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 09:51:45 2008 -0800

    Rely on libdrm 2.4.3 and stop checking for xf86drmMode.h.
    (cherry picked from commit 8464fc285d7b22fd45b7af616fd52aa15e16638a)

diff --git a/configure.ac b/configure.ac
index 3f0c6d1..0bb0f22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -113,11 +113,9 @@ if test x$DRI != xno; then
 	AC_CHECK_FILE([${sdkdir}/damage.h],
                       [have_damage_h="yes"], [have_damage_h="no"])
 	if test x$KMS != xno; then
-		AC_CHECK_HEADER(xf86drmMode.h,
-				[DRM_MODE=yes],[DRM_MODE=no]
-				[#include "stdint.h"])
 		dnl exaGetPixmapDriverPrivate required for DRM_MODE.
-		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5], [], [DRM_MODE=no])
+		PKG_CHECK_MODULES(DRM_MODE, [xorg-server >= 1.5],
+					    [DRM_MODE=yes], [DRM_MODE=no])
 		if test "x$DRM_MODE" = xyes; then
 	   		AC_DEFINE(XF86DRM_MODE,1,[DRM kernel modesetting])
 		fi
@@ -224,7 +222,7 @@ if test "x$GCC" = "xyes"; then
 	-Wnested-externs -fno-strict-aliasing"
 fi
 
-PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.2])
+PKG_CHECK_MODULES(DRM, [libdrm >= 2.4.3])
 AM_CONDITIONAL(DRI, test x$DRI = xyes)
 if test "$DRI" = yes; then
         PKG_CHECK_MODULES(DRI, [xf86driproto glproto])
commit 785d20d93f66310880f8cea0bf6c2ccf544a0e29
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 22 16:49:57 2008 -0800

    Remove old mergedfb includes and defines, which bother spatch.
    (cherry picked from commit c1dde7ac06ce6470c74198b2560ee67d28fb0aea)

diff --git a/src/i830.h b/src/i830.h
index 8ad5c69..dd5555d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -107,12 +107,6 @@ typedef struct _I830OutputRec I830OutputRec, *I830OutputPtr;
 #include "i830_sdvo.h"
 #include "i2c_vid.h"
 
-/* I830 Video support */
-#define NEED_REPLIES				/* ? */
-#define EXTENSION_PROC_ARGS void *
-#include "extnsionst.h" 			/* required */
-#include <X11/extensions/panoramiXproto.h> 	/* required */
-
 /*
  * The mode handling is based upon the VESA driver written by
  * Paulo César Pereira de Andrade <pcpa at conectiva.com.br>.
commit 2c23c0c39b06669c68f8fefda90b033715a803cf
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 30 00:55:30 2008 +0800

    Bug #18004: Add Aopen 915GM LVDS quirk
    (cherry picked from commit 75799d2834be84b016391ec95b221df32380e3e7)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 68e39ee..9d02210 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -230,6 +230,7 @@ static void quirk_ivch_dvob (I830Ptr pI830)
 /* keep this list sorted by OEM, then by chip ID */
 static i830_quirk i830_quirk_list[] = {
     /* Aopen mini pc */
+    { PCI_CHIP_I915_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I945_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
commit 94a77b62510d8db5cd21ef40b8d03a36cd0c0af2
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Mon Dec 29 21:17:44 2008 +0800

    Don't count vertex buffer in second aperture size check
    
    With batch flush notify vertex buffer will be unreferenced,
    so don't count it in later aperture check. Also adding
    uninitialized vertex buffer check in batch flush notify.
    (cherry picked from commit cfaaf6af777ad8e56da5a077bdc01f4f2d7bc4d6)

diff --git a/src/i965_render.c b/src/i965_render.c
index df3814f..3b0ee35 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1015,11 +1015,8 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	    /* If the command still won't fit in an empty batch, then it's
 	     * just plain too big for the hardware---fallback to software.
 	     */
-	    if (dri_bufmgr_check_aperture_space (bo_table, NUM_BO) < 0) {
-		dri_bo_unreference (render_state->vertex_buffer_bo);
-		render_state->vertex_buffer_bo = NULL;
+	    if (dri_bufmgr_check_aperture_space (bo_table, 1) < 0)
 		return FALSE;
-	    }
 	}
     }
 
@@ -1588,8 +1585,10 @@ i965_batch_flush_notify(ScrnInfoPtr pScrn)
     /* Once a batch is emitted, we never want to map again any buffer
      * object being referenced by that batch, (which would be very
      * expensive). */
-    dri_bo_unreference (render_state->vertex_buffer_bo);
-    render_state->vertex_buffer_bo = NULL;
+    if (render_state->vertex_buffer_bo) {
+	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
 }
 
 /**
commit 1b897abd6c8500dc6dcaac548ab7d531f37522c8
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:50:25 2008 +1000

    intel/kms: disable overlay when it needs physical address
    
    We can't do phy address allocations, need kernel support for this.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>
    (cherry picked from commit b710a688a7383df320f9d4e765b48331310a4d1d)

diff --git a/src/i830_memory.c b/src/i830_memory.c
index ca15964..2053d06 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1074,8 +1074,11 @@ i830_allocate_overlay(ScrnInfoPtr pScrn)
     if (OVERLAY_NOEXIST(pI830))
 	return TRUE;
 
-    if (!OVERLAY_NOPHYSICAL(pI830))
+    if (!OVERLAY_NOPHYSICAL(pI830)) {
+	if (pI830->use_drm_mode)
+            return TRUE;
 	flags |= NEED_PHYSICAL_ADDR;
+    }
 
     pI830->overlay_regs = i830_allocate_memory(pScrn, "overlay registers",
 					       OVERLAY_SIZE, GTT_PAGE_SIZE,
commit f0e9e54c96ac58cab9ea9d6b83739c84d1ae13d7
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:48:11 2008 +1000

    intel: don't call enter/leave VT for KMS enabled systems
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>
    (cherry picked from commit 649374b88b330838133d78be1953ce8b18ddd2c6)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index d3b539a..6fed32d 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3587,7 +3587,7 @@ I830LeaveVT(int scrnIndex, int flags)
       i830_unbind_all_memory(pScrn);
 
 #ifdef XF86DRI
-   if (pI830->memory_manager) {
+   if (pI830->memory_manager && !pI830->use_drm_mode) {
       int ret;
 
       /* Tell the kernel to evict all buffer objects and block GTT usage while
@@ -3630,7 +3630,7 @@ I830EnterVT(int scrnIndex, int flags)
    pI830->leaving = FALSE;
 
 #ifdef XF86DRI
-   if (pI830->memory_manager) {
+   if (pI830->memory_manager && !pI830->use_drm_mode) {
       int ret;
 
       /* Tell the kernel that we're back in control and ready for GTT
commit 59358ecbbeceb9a2ce5a33787941c2e67fee4218
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 12:47:30 2008 +1000

    exa: fix map gtt call to use current API
    (cherry picked from commit 408f7139354a942f29334795b5480a0b6bb6142a)

diff --git a/src/i830_exa.c b/src/i830_exa.c
index 3e3487e..4a04644 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -540,7 +540,7 @@ static Bool I830EXAPrepareAccess(PixmapPtr pPix, int index)
 	I830Sync(scrn);
 	i830->need_sync = FALSE;
     }
-    if (dri_gem_bo_map_gtt(driver_priv->bo)) {
+    if (drm_intel_gem_bo_map_gtt(driver_priv->bo)) {
 	xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: bo map failed\n",
 		   __FUNCTION__);
 	return FALSE;
commit 649b32a5dc941a688f4671b903774ea2ea97d2f2
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 11:51:58 2008 +1000

    modeset: transformPresent is a new API member
    (cherry picked from commit 6b9f421b792c701e909d81ae2b6e6a47fb069b0b)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 47a1dbc..87b5821 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -148,7 +148,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 	crtc->x = x;
 	crtc->y = y;
 	crtc->rotation = rotation;
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,5,99,0,0)
 	crtc->transformPresent = FALSE;
+#endif
 
 	output_ids = xcalloc(sizeof(uint32_t), xf86_config->num_output);
 	if (!output_ids) {
commit b076d399344e5b6495e069342f7f862c810c8ece
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Dec 29 11:34:51 2008 +1000

    modeset: fix xf86CrtcRotate API change across server versions
    (cherry picked from commit a320541e51818833a6a445707835fbf70e9babd4)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 186ff2d..47a1dbc 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -29,6 +29,8 @@
 #include "config.h"
 #endif
 
+#include "xorgVersion.h"
+
 #ifdef XF86DRM_MODE
 #include "i830.h"
 #include "sarea.h"
@@ -167,9 +169,13 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		output_count++;
 	}
 
-	if (!xf86CrtcRotate(crtc)) {
+#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,5,99,0,0)
+	if (!xf86CrtcRotate(crtc, mode, rotation))
 		goto done;
-	}
+#else
+	if (!xf86CrtcRotate(crtc))
+		goto done;
+#endif
 
 	drmmode_ConvertToKMode(crtc->scrn, &kmode, mode);
 


More information about the xorg-commit mailing list