xf86-video-intel: 5 commits - configure.ac src/i830_driver.c src/i830.h src/i830_memory.c src/i830_sdvo_regs.h

Eric Anholt anholt at kemper.freedesktop.org
Mon Dec 29 11:38:26 PST 2008


 configure.ac         |    8 ++-----
 src/i830.h           |    8 -------
 src/i830_driver.c    |   17 +++++----------
 src/i830_memory.c    |    9 --------
 src/i830_sdvo_regs.h |   55 +++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 64 insertions(+), 33 deletions(-)

New commits:
commit 45f45c73469f1bd46a1b6fb206f2e9e5e4fd66b3
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Dec 29 11:26:11 2008 -0800

    Remove logical context setup.
    
    This should be a noop.  If it wasn't a noop, it means that on pre-g33 chipsets
    we were spamming some data into a page of system memory because we used a
    virtual instead of a physical address.  It was also supposed to not work when
    we submit it from a batchbuffer, as we have been doing for some time now.
    This code has existed since about the beginning of the driver's existence,
    with no justification.

diff --git a/src/i830.h b/src/i830.h
index 80d6d7b..3381c3c 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -452,8 +452,6 @@ typedef struct _I830Rec {
    void (*PointerMoved)(int, int, int);
    CreateScreenResourcesProcPtr    CreateScreenResources;
 
-   i830_memory *logical_context;
-
    i830_memory *power_context;
 
 #ifdef XF86DRI
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 90fa507..16ddc41 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2604,17 +2604,6 @@ IntelEmitInvarientState(ScrnInfoPtr pScrn)
    if (*pI830->last_3d != LAST_3D_OTHER)
       return;
 
-   ctx_addr = pI830->logical_context->offset;
-   assert((pI830->logical_context->offset & 2047) == 0);
-   {
-      BEGIN_BATCH(2);
-      OUT_BATCH(MI_SET_CONTEXT);
-      OUT_BATCH(pI830->logical_context->offset |
-		CTXT_NO_RESTORE |
-		CTXT_PALETTE_SAVE_DISABLE | CTXT_PALETTE_RESTORE_DISABLE);
-      ADVANCE_BATCH();
-   }
-
    if (!IS_I965G(pI830))
    {
       if (IS_I9XX(pI830))
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 2053d06..fa22782 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1434,15 +1434,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
 	pI830->SWCursor = TRUE;
     }
 
-    /* Space for the X Server's 3D context.  32k is fine for right now. */
-    pI830->logical_context = i830_allocate_memory(pScrn, "logical 3D context",
-						  KB(32), GTT_PAGE_SIZE, 0);
-    if (pI830->logical_context == NULL) {
-	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-		   "Failed to allocate logical context space.\n");
-	return FALSE;
-    }
-
     if (pI830->memory_manager == NULL) {
 	pI830->fake_bufmgr_mem = i830_allocate_memory(pScrn, "fake bufmgr",
 						      MB(1), GTT_PAGE_SIZE, 0);
commit 3544bbe22d8cf2640289e1e4febe755a47f26631
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.

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 7b67914b23b54d4d9566190440a3430e40615aa8
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Mar 28 15:51:50 2008 -0700

    Add SDVO LVDS register definitions.

diff --git a/src/i830_sdvo_regs.h b/src/i830_sdvo_regs.h
index 5d5bf98..6988d49 100644
--- a/src/i830_sdvo_regs.h
+++ b/src/i830_sdvo_regs.h
@@ -530,6 +530,52 @@ struct i830_sdvo_hdtv_resolution_reply {
 # define SDVO_MONITOR_STATE_SUSPEND				(1 << 6)
 # define SDVO_MONITOR_STATE_OFF					(1 << 7)
 
+#define SDVO_CMD_GET_MAX_PANEL_POWER_SEQUENCING		0x2d
+#define SDVO_CMD_GET_PANEL_POWER_SEQUENCING		0x2e
+#define SDVO_CMD_SET_PANEL_POWER_SEQUENCING		0x2f
+/**
+ * The panel power sequencing parameters are in units of milliseconds.
+ * The high fields are bits 8:9 of the 10-bit values.
+ */
+struct sdvo_panel_power_sequencing {
+    uint8_t t0;
+    uint8_t t1;
+    uint8_t t2;
+    uint8_t t3;
+    uint8_t t4;
+
+    unsigned int t0_high:2;
+    unsigned int t1_high:2;
+    unsigned int t2_high:2;
+    unsigned int t3_high:2;
+
+    unsigned int t4_high:2;
+    unsigned int pad:6;
+} __attribute__((packed));
+
+#define SDVO_CMD_GET_MAX_BACKLIGHT_LEVEL		0x30
+struct sdvo_max_backlight_reply {
+    uint8_t max_value;
+    uint8_t default_value;
+} __attribute__((packed));
+
+#define SDVO_CMD_GET_BACKLIGHT_LEVEL			0x31
+#define SDVO_CMD_SET_BACKLIGHT_LEVEL			0x32
+
+#define SDVO_CMD_GET_AMBIENT_LIGHT			0x33
+struct sdvo_get_ambient_light_reply {
+    uint16_t trip_low;
+    uint16_t trip_high;
+    uint16_t value;
+} __attribute__((packed));
+#define SDVO_CMD_SET_AMBIENT_LIGHT			0x34
+struct sdvo_set_ambient_light_reply {
+    uint16_t trip_low;
+    uint16_t trip_high;
+    unsigned int enable:1;
+    unsigned int pad:7;
+} __attribute__((packed));
+
 /* Set display power state */
 #define SDVO_CMD_SET_DISPLAY_POWER_STATE		0x7d
 # define SDVO_DISPLAY_STATE_ON				(1 << 0)
@@ -580,6 +626,15 @@ struct i830_sdvo_enhancement_limits_reply {
     uint16_t default_value;
 } __attribute__((packed));
 
+#define SDVO_CMD_GET_LVDS_PANEL_INFORMATION		0x7f
+#define SDVO_CMD_SET_LVDS_PANEL_INFORMATION		0x80
+# define SDVO_LVDS_COLOR_DEPTH_18			(0 << 0)
+# define SDVO_LVDS_COLOR_DEPTH_24			(1 << 0)
+# define SDVO_LVDS_CONNECTOR_SPWG			(0 << 2)
+# define SDVO_LVDS_CONNECTOR_OPENLDI			(1 << 2)
+# define SDVO_LVDS_SINGLE_CHANNEL			(0 << 4)
+# define SDVO_LVDS_DUAL_CHANNEL				(1 << 4)
+
 #define SDVO_CMD_GET_FLICKER_FILTER			0x4e
 #define SDVO_CMD_SET_FLICKER_FILTER			0x4f
 #define SDVO_CMD_GET_ADAPTIVE_FLICKER_FITER		0x50
commit 8464fc285d7b22fd45b7af616fd52aa15e16638a
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.

diff --git a/configure.ac b/configure.ac
index 7dbcd47..ca13eab 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 c1dde7ac06ce6470c74198b2560ee67d28fb0aea
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.

diff --git a/src/i830.h b/src/i830.h
index 5e50753..80d6d7b 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>.


More information about the xorg-commit mailing list