xf86-video-intel: Branch 'xf86-video-intel-2.3-branch' - 2 commits - src/i830_driver.c src/i830.h

Zhenyu Wang zhen at kemper.freedesktop.org
Wed May 7 18:24:42 PDT 2008


 src/i830.h        |   10 ++++++++--
 src/i830_driver.c |   21 +++++++++++++++++++++
 2 files changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 3b8804d82266ffc01ac1573624387b0d1f9dfb94
Author: Jesse Barnes <jbarnes at hobbes.lan>
Date:   Wed May 7 14:46:52 2008 -0700

    Save/restore cursor registers
    
    There are lots of good reasons for doing this, one of them is fdo bug #11305.
    (cherry picked from commit 33f033cbf346c13a687e469e8879579fcd5bb2fb)

diff --git a/src/i830.h b/src/i830.h
index 431abb5..28831e4 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -621,6 +621,12 @@ typedef struct _I830Rec {
    uint32_t saveVCLK_DIVISOR_VGA1;
    uint32_t saveVCLK_POST_DIV;
    uint32_t saveVGACNTRL;
+   uint32_t saveCURSOR_A_CONTROL;
+   uint32_t saveCURSOR_A_BASE;
+   uint32_t saveCURSOR_A_POSITION;
+   uint32_t saveCURSOR_B_CONTROL;
+   uint32_t saveCURSOR_B_BASE;
+   uint32_t saveCURSOR_B_POSITION;
    uint32_t saveADPA;
    uint32_t saveLVDS;
    uint32_t saveDVOA;
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 0112e1d..ef898dc 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2033,6 +2033,13 @@ SaveHWState(ScrnInfoPtr pScrn)
    pI830->saveVCLK_POST_DIV = INREG(VCLK_POST_DIV);
    pI830->saveVGACNTRL = INREG(VGACNTRL);
 
+   pI830->saveCURSOR_A_CONTROL = INREG(CURSOR_A_CONTROL);
+   pI830->saveCURSOR_A_POSITION = INREG(CURSOR_A_POSITION);
+   pI830->saveCURSOR_A_BASE = INREG(CURSOR_A_BASE);
+   pI830->saveCURSOR_B_CONTROL = INREG(CURSOR_B_CONTROL);
+   pI830->saveCURSOR_B_POSITION = INREG(CURSOR_B_POSITION);
+   pI830->saveCURSOR_B_BASE = INREG(CURSOR_B_BASE);
+
    for(i = 0; i < 7; i++) {
       pI830->saveSWF[i] = INREG(SWF0 + (i << 2));
       pI830->saveSWF[i+7] = INREG(SWF00 + (i << 2));
@@ -2234,6 +2241,20 @@ RestoreHWState(ScrnInfoPtr pScrn)
 
    OUTREG(VGACNTRL, pI830->saveVGACNTRL);
 
+   /*
+    * Restore cursors
+    * Even though the X cursor is hidden before we restore the hw state,
+    * we probably only disabled one cursor plane.  If we're going from
+    * e.g. plane b to plane a here in RestoreHWState, we need to restore
+    * both cursor plane settings.
+    */
+   OUTREG(CURSOR_A_POSITION, pI830->saveCURSOR_A_POSITION);
+   OUTREG(CURSOR_A_BASE, pI830->saveCURSOR_A_BASE);
+   OUTREG(CURSOR_A_CONTROL, pI830->saveCURSOR_A_CONTROL);
+   OUTREG(CURSOR_B_POSITION, pI830->saveCURSOR_B_POSITION);
+   OUTREG(CURSOR_B_BASE, pI830->saveCURSOR_B_BASE);
+   OUTREG(CURSOR_B_CONTROL, pI830->saveCURSOR_B_CONTROL);
+
    /* Restore outputs */
    for (i = 0; i < xf86_config->num_output; i++) {
       xf86OutputPtr   output = xf86_config->output[i];
commit 0ab5cbc5310c2a60c10fd611fcf9a4791379f42b
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed May 7 14:21:59 2008 +0800

    Use I830FALLBACK when check pitch for debug
    (cherry picked from commit a7188b1f2dd9a69fa7daefe478d283735226f9f3)

diff --git a/src/i830.h b/src/i830.h
index 8508f82..431abb5 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -859,13 +859,13 @@ Bool i830_pixmap_tiled(PixmapPtr p);
 
 #define i830_exa_check_pitch_2d(p) do {\
     uint32_t pitch = intel_get_pixmap_pitch(p);\
-    if (pitch > KB(32)) return FALSE;\
+    if (pitch > KB(32)) I830FALLBACK("pitch exceeds 2d limit 32K\n");\
 } while(0)
 
 /* For pre-965 chip only, as they have 8KB limit for 3D */
 #define i830_exa_check_pitch_3d(p) do {\
     uint32_t pitch = intel_get_pixmap_pitch(p);\
-    if (pitch > KB(8)) return FALSE;\
+    if (pitch > KB(8)) I830FALLBACK("pitch exceeds 3d limit 8K\n");\
 } while(0)
 
 /* Batchbuffer compatibility handling */


More information about the xorg-commit mailing list