xf86-video-intel: Branch 'xf86-video-intel-2.6-branch' - 9 commits - src/i830_batchbuffer.c src/i830_bios.c src/i830_crt.c src/i830_display.c src/i830_driver.c src/i830.h src/i830_quirks.c src/i965_render.c

Zhenyu Wang zhen at kemper.freedesktop.org
Wed Dec 10 17:53:40 PST 2008


 src/i830.h             |    6 ++++++
 src/i830_batchbuffer.c |    3 +++
 src/i830_bios.c        |    3 +++
 src/i830_crt.c         |    3 +++
 src/i830_display.c     |   10 ++++++++++
 src/i830_driver.c      |    9 ++++++++-
 src/i830_quirks.c      |   15 ++++++++++++---
 src/i965_render.c      |   29 ++++++++++++++++++++++++++---
 8 files changed, 71 insertions(+), 7 deletions(-)

New commits:
commit 005127b5825993d2fe3c36e3a01a37ea6904739e
Author: Bryce Harrington <bryce at canonical.com>
Date:   Thu Dec 11 09:38:27 2008 +0800

    Pipe-A quirk for HP 2730p (bug #18852)
    (cherry picked from commit 83377b543defdca7226d7c1a7794e4ff3d8b4c84)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 9c00e62..68e39ee 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -287,6 +287,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I915_GM, 0x103c, 0x099c, quirk_ignore_tv },
     /* HP Compaq 6730s has no TV output */
     { PCI_CHIP_GM45_GM, 0x103c, 0x30e8, quirk_ignore_tv },
+    /* HP Compaq 2730p needs pipe A force quirk (LP: #291555) */
+    { PCI_CHIP_GM45_GM, 0x103c, 0x30eb, quirk_pipea_force },
 
     /* Thinkpad R31 needs pipe A force quirk */
     { PCI_CHIP_I830_M, 0x1014, 0x0505, quirk_pipea_force },
commit d5ed8674127c5612df35510ce560dd2938558601
Author: Bryce Harrington <bryce at canonical.com>
Date:   Thu Dec 11 09:34:15 2008 +0800

    PipeA quirk for Quanta/W251U (launchpad bug #244242)
    (cherry picked from commit 6c4e134a1a30785c2e5c6d57b21fde54a2dd3413)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 1604294..9c00e62 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -326,6 +326,9 @@ static i830_quirk i830_quirk_list[] = {
     /* Sony VGC-LT71DB has no VGA output (bug #17395) */
     { PCI_CHIP_I965_GM, 0x104d, 0x9018, quirk_ignore_crt },
 
+    /* Quanta Gigabyte W251U (See LP: #244242) */
+    { PCI_CHIP_I945_GM, 0x152d, 0x0755, quirk_pipea_force },
+
     /* Ordi Enduro UW31 (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
 
commit dd284392ce4792d20c2fcd09bbb6b8e168978d30
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Dec 10 10:54:31 2008 +0800

    Try to always probe SDVOC on 965G/965GM
    
    Detect bit of SDVOC is reserved on 965G/965GM, instead of ignore SDVOC
    this trys to always probe it on these chipsets.
    (cherry picked from commit 1e974ff6b8446ecd64677b3c9aba60ca850923cc)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4f87efb..7590257 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -919,7 +919,9 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
 	    i830_hdmi_init(pScrn, SDVOB);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
+      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
+	      /* SDVOC detect bit is reserved on 965G/965GM */
+	      (IS_I965G(pI830) && !IS_G4X(pI830))) {
 	 Bool found = i830_sdvo_init(pScrn, SDVOC);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
commit 5c659cbcf33f56878d14d5e74747870ce29d76bf
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Wed Dec 10 10:36:07 2008 +0800

    bug #17395: Quirk CRT for Sony VGC-LT71DB
    (cherry picked from commit f5f67e1b54e67b4bfc3db3482b2693211be81d63)

diff --git a/src/i830.h b/src/i830.h
index db35c1d..8ad5c69 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -1034,6 +1034,7 @@ extern const int I830CopyROP[16];
 #define QUIRK_IVCH_NEED_DVOB		0x00000010
 #define QUIRK_RESET_MODES		0x00000020
 #define QUIRK_PFIT_SAFE			0x00000040
+#define QUIRK_IGNORE_CRT		0x00000080
 extern void i830_fixup_devices(ScrnInfoPtr);
 
 #endif /* _I830_H_ */
diff --git a/src/i830_crt.c b/src/i830_crt.c
index ad81fbb..605ecf9 100644
--- a/src/i830_crt.c
+++ b/src/i830_crt.c
@@ -517,6 +517,9 @@ i830_crt_init(ScrnInfoPtr pScrn)
     I830OutputPrivatePtr    i830_output;
     I830Ptr		    pI830 = I830PTR(pScrn);
 
+    if (pI830->quirk_flag & QUIRK_IGNORE_CRT)
+	return;
+
     output = xf86OutputCreate (pScrn, &i830_crt_output_funcs, "VGA");
     if (!output)
 	return;
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 54e3af6..1604294 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -194,6 +194,11 @@ static void quirk_ignore_lvds (I830Ptr pI830)
     pI830->quirk_flag |= QUIRK_IGNORE_LVDS;
 }
 
+static void quirk_ignore_crt (I830Ptr pI830)
+{
+    pI830->quirk_flag |= QUIRK_IGNORE_CRT;
+}
+
 static void quirk_mac_mini (I830Ptr pI830)
 {
     pI830->quirk_flag |= QUIRK_IGNORE_MACMINI_LVDS;
@@ -318,6 +323,8 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I830_M, 0x104d, 0x8100, quirk_ivch_dvob },
     /* Sony vaio VGN-SZ4MN (See LP: #212163) */
     { PCI_CHIP_I830_M, 0x104d, 0x81e6, quirk_pipea_force },
+    /* Sony VGC-LT71DB has no VGA output (bug #17395) */
+    { PCI_CHIP_I965_GM, 0x104d, 0x9018, quirk_ignore_crt },
 
     /* Ordi Enduro UW31 (See LP: #152416) */
     { PCI_CHIP_I945_GM, 0x1584, 0x9900, quirk_ignore_tv },
commit dbb84f166b00d288fa81dcf86cab011177690a11
Author: Keith Packard <keithp at keithp.com>
Date:   Tue Dec 9 21:51:14 2008 -0800

    Add RandR 1.3 panning support by supporting the crtc set_origin function
    
    RandR 1.3 panning support can use the regular mode setting interface, but
    that's really slow. Providing set_origin makes it nice and snappy.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>
    (cherry picked from commit d8b764fbd27dc9c8b28386093931b8d38855bd19)

diff --git a/src/i830_display.c b/src/i830_display.c
index 2626612..2e5d55a 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1638,6 +1638,13 @@ i830_crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
     }
 }
 
+#if RANDR_13_INTERFACE
+static void
+i830_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
+{
+    i830PipeSetBase(crtc, x, y);
+}
+#endif
 
 void
 i830DescribeOutputConfiguration(ScrnInfoPtr pScrn)
@@ -1959,6 +1966,9 @@ static const xf86CrtcFuncsRec i830_crtc_funcs = {
 /*    .load_cursor_image = i830_crtc_load_cursor_image, */
     .load_cursor_argb = i830_crtc_load_cursor_argb,
     .destroy = NULL, /* XXX */
+#if RANDR_13_INTERFACE
+    .set_origin = i830_crtc_set_origin,
+#endif
 };
 
 void
commit e807834863d6d3c3779fc3513e13c6a99f645d96
Author: Zhenyu Wang <zhenyu.z.wang at intel.com>
Date:   Tue Dec 9 19:19:58 2008 +0800

    Remove Cappuccino SlimPRO SP625F 855GM LVDS quirk
    
    It breaks bug #18462 on IBM 855GM with same subdevice ids.
    (cherry picked from commit 0fe61b0b7e3bbe8ced1b0ad2be72c438d200c64b)

diff --git a/src/i830_quirks.c b/src/i830_quirks.c
index 155cb44..54e3af6 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -229,9 +229,6 @@ static i830_quirk i830_quirk_list[] = {
     { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
     { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
 
-    /* Cappuccino SlimPRO SP625F, bz #11368 */
-    { PCI_CHIP_I855_GM, 0x8086, 0x3582, quirk_ignore_lvds },
-
     /* Apple Mac mini has no lvds, but macbook pro does */
     { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini },
 
commit 46249d548f581aafa06a5188cba7a9b94cf2916d
Author: Carl Worth <cworth at cworth.org>
Date:   Fri Dec 5 15:42:53 2008 -0800

    Set vertex_buffer_bo to NULL after unreference.
    
    Which is just being tidy. We initially were looking at this code
    path due to a report of a crash on server shutdown which started
    after this unreference call was added. Setting this to NULL
    apparently didn't avoid the crash, but it's a good thing to do
    regardless.
    (cherry picked from commit bea98cdfd93fc1181a06c51e57fcab227ff4827e)

diff --git a/src/i965_render.c b/src/i965_render.c
index a92c964..df3814f 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1635,8 +1635,10 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn)
     I830Ptr pI830 = I830PTR(pScrn);
     struct gen4_render_state *render_state= pI830->gen4_render_state;
 
-    if (render_state->vertex_buffer_bo)
+    if (render_state->vertex_buffer_bo) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
+	render_state->vertex_buffer_bo = NULL;
+    }
 
     if (pI830->use_drm_mode) {
 	dri_bo_unmap(pI830->gen4_render_state_mem->bo);
commit 178a1629a89ed35b94cd25408063eeaa38f7e59b
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Dec 4 11:41:02 2008 -0800

    Don't smash fixed_mode if skip_panel_detect is set.
    
    Without this change, setting LVDSFixedMode to false is not effective
    as i830_bios_init calls i830_parse_panel_data which in turns sets
    a fixed_mode. To fix this we still call parse_panel_data to set
    the various lvds_options but we return before setting fixed_mode.
    (cherry picked from commit ce7efc2e3676c8f80206415480dda91e5e021396)

diff --git a/src/i830_bios.c b/src/i830_bios.c
index 007530d..72408f0 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -109,6 +109,9 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb)
 	lvds_lfp_data_ptrs->ptr[lvds_options->panel_type].dvo_timing_offset;
     timing_ptr = (unsigned char *)bdb + timing_offset;
 
+    if (pI830->skip_panel_detect)
+	return;
+
     fixed_mode = xnfalloc(sizeof(DisplayModeRec));
     memset(fixed_mode, 0, sizeof(*fixed_mode));
 
commit a13bb74af9d0dcfa5a6c9991711f46d258b962e1
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Dec 3 13:49:52 2008 -0800

    i965: Add batch_flush_notify hook to create new vertex-buffer bo
    
    This avoids mapping a buffer object which is being referenced
    by a batch that has already been flushed, (which is a terribly
    expensive operation).
    
    On my machine this brings the performance of x11perf -aa10text
    from 85k back to 150k, (where it was before a recent kernel
    upgrade). Also, before this patch, when I used my X server
    actively performance would drop as low as 15k---hopefully that
    bug is gone with this change.
    (cherry picked from commit e8b95efbf5d9c3a5b75b2bb8b5b51844b5fcdfbc)

diff --git a/src/i830.h b/src/i830.h
index c2e043a..db35c1d 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -538,6 +538,8 @@ typedef struct _I830Rec {
 #endif
    CloseScreenProcPtr CloseScreen;
 
+   void (*batch_flush_notify)(ScrnInfoPtr pScrn);
+
 #ifdef I830_USE_EXA
    ExaDriverPtr	EXADriverPtr;
 #endif
@@ -944,6 +946,9 @@ Bool i965_prepare_composite(int op, PicturePtr pSrc, PicturePtr pMask,
 void i965_composite(PixmapPtr pDst, int srcX, int srcY,
 		    int maskX, int maskY, int dstX, int dstY, int w, int h);
 
+void
+i965_batch_flush_notify(ScrnInfoPtr pScrn);
+
 Bool
 i830_get_transformed_coordinates(int x, int y, PictTransformPtr transform,
 				 float *x_out, float *y_out);
diff --git a/src/i830_batchbuffer.c b/src/i830_batchbuffer.c
index 9aa99ed..13d939e 100644
--- a/src/i830_batchbuffer.c
+++ b/src/i830_batchbuffer.c
@@ -201,4 +201,7 @@ intel_batch_flush(ScrnInfoPtr pScrn, Bool flushed)
      */
     if (pI830->memory_manager != NULL)
 	pI830->need_mi_flush = TRUE;
+
+    if (pI830->batch_flush_notify)
+	pI830->batch_flush_notify (pScrn);
 }
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 3327fbf..4f87efb 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -3364,6 +3364,11 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
       }
    }
 
+   if (IS_I965G(pI830))
+       pI830->batch_flush_notify = i965_batch_flush_notify;
+   else
+       pI830->batch_flush_notify = NULL;
+
    miInitializeBackingStore(pScreen);
    xf86SetBackingStore(pScreen);
    xf86SetSilkenMouse(pScreen);
diff --git a/src/i965_render.c b/src/i965_render.c
index da6ded6..a92c964 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1000,6 +1000,7 @@ _emit_batch_header_for_composite_internal (ScrnInfoPtr pScrn, Bool check_twice)
 	render_state->vertex_buffer_bo = dri_bo_alloc (pI830->bufmgr, "vb",
 						       sizeof (gen4_vertex_buffer),
 						       4096);
+	render_state->vb_offset = 0;
     }
 
     bo_table[0] = pI830->batch_bo;
@@ -1480,15 +1481,22 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 	}
     }
 
+    /* We're about to do a BEGIN_BATCH(12) for the vertex setup. And
+     * we first need to ensure that that's not going to cause a flush
+     * since we need to not flush between setting up our vertices in
+     * the VB and emitting them into the batch. */
+    intel_batch_require_space(pScrn, pI830, 12 * 4);
+
     /* If the vertex buffer is too full, then we flush and re-emit all
      * necessary state into the batch for the composite operation. */
     if (render_state->vb_offset + VERTEX_FLOATS_PER_COMPOSITE > VERTEX_BUFFER_SIZE) {
 	dri_bo_unreference (render_state->vertex_buffer_bo);
 	render_state->vertex_buffer_bo = NULL;
-	render_state->vb_offset = 0;
-	_emit_batch_header_for_composite (pScrn);
     }
 
+    if (render_state->vertex_buffer_bo == NULL)
+	_emit_batch_header_for_composite (pScrn);
+
     /* Map the vertex_buffer buffer object so we can write to it. */
     dri_bo_map (render_state->vertex_buffer_bo, 1);
     vb = render_state->vertex_buffer_bo->virtual;
@@ -1571,6 +1579,19 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
 #endif
 }
 
+void
+i965_batch_flush_notify(ScrnInfoPtr pScrn)
+{
+    I830Ptr pI830 = I830PTR(pScrn);
+    struct gen4_render_state *render_state = pI830->gen4_render_state;
+
+    /* 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;
+}
+
 /**
  * Called at EnterVT so we can set up our offsets into the state buffer.
  */


More information about the xorg-commit mailing list