xf86-video-intel: 3 commits - src/sna/gen5_render.c src/sna/kgem.c src/sna/sna_display.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Jun 25 14:54:57 PDT 2012


 src/sna/gen5_render.c |    8 ++++----
 src/sna/kgem.c        |    5 -----
 src/sna/sna_display.c |   31 +++++++++++++++++++++++++++----
 3 files changed, 31 insertions(+), 13 deletions(-)

New commits:
commit a505015a254d6c6e24f0542bc141cde873dc6f34
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 25 22:50:47 2012 +0100

    sna: Force DPMS to be on following a modeset
    
    Similarly to UXA, this papers over inconsistent behaviour in the kernel
    in handling the DPMS upon a modeswitch.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 0896af4..4a63cff 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -413,6 +413,29 @@ bool sna_crtc_is_bound(struct sna *sna, xf86CrtcPtr crtc)
 	return mode.mode_valid && fb_id(sna_crtc->bo) == mode.fb_id;
 }
 
+static void
+sna_crtc_force_outputs_on(xf86CrtcPtr crtc)
+{
+	xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+	int i;
+
+	/* DPMS handling by the kernel is inconsistent, so after setting a
+	 * mode on an output presume that we intend for it to be on, or that
+	 * the kernel will force it on.
+	 *
+	 * So force DPMS to be on for all connected outputs, and restore
+	 * the backlight.
+	 */
+	for (i = 0; i < xf86_config->num_output; i++) {
+		xf86OutputPtr output = xf86_config->output[i];
+
+		if (output->crtc != crtc)
+			continue;
+
+		output->funcs->dpms(output, DPMSModeOn);
+	}
+}
+
 static Bool
 sna_crtc_apply(xf86CrtcPtr crtc)
 {
@@ -478,14 +501,14 @@ sna_crtc_apply(xf86CrtcPtr crtc)
 	if (ret) {
 		xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR,
 			   "failed to set mode: %s\n", strerror(errno));
-		ret = FALSE;
-	} else
-		ret = TRUE;
+		return FALSE;
+	}
 
 	if (crtc->scrn->pScreen)
 		xf86_reload_cursors(crtc->scrn->pScreen);
 
-	return ret;
+	sna_crtc_force_outputs_on(crtc);
+	return TRUE;
 }
 
 static bool sna_mode_enable_shadow(struct sna *sna)
commit b7a8c94cdb9cf42a31f8ce128d70e23458ba2042
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jun 25 20:49:59 2012 +0100

    sna: remove the assert(0)s along error paths
    
    This were there as a debugging aide to see if we ever hit unreachable
    code paths - mainly along corruption inducing GPU wedged recovery paths.
    They are superfluous and just scare the reader.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 5b58e0e..c79903b 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -217,7 +217,6 @@ retry_gtt:
 		if (kgem_expire_cache(kgem))
 			goto retry_gtt;
 
-		assert(0);
 		return NULL;
 	}
 
@@ -230,7 +229,6 @@ retry_mmap:
 		if (__kgem_throttle_retire(kgem, 0))
 			goto retry_mmap;
 
-		assert(0);
 		ptr = NULL;
 	}
 
@@ -295,7 +293,6 @@ static int gem_read(int fd, uint32_t handle, const void *dst,
 	ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_PREAD, &pread);
 	if (ret) {
 		DBG(("%s: failed, errno=%d\n", __FUNCTION__, errno));
-		assert(0);
 		return ret;
 	}
 
@@ -3523,14 +3520,12 @@ struct kgem_bo *kgem_create_map(struct kgem *kgem,
 #else
 static uint32_t gem_vmap(int fd, void *ptr, int size, int read_only)
 {
-	assert(0);
 	return 0;
 }
 struct kgem_bo *kgem_create_map(struct kgem *kgem,
 				void *ptr, uint32_t size,
 				bool read_only)
 {
-	assert(0);
 	return 0;
 }
 #endif
commit 15c0ee445f603033c82f357fedfc7737d198d7b3
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jun 24 19:28:03 2012 +0100

    sna/gen5: Tweak thread allocations
    
    Bump the alloted number of threads to their max. Using more threads than
    cores helps hide the stalls due to sampler fetch, math functions and urb
    write. Specifying too many threads seems to not incur a performance
    regression, suggesting that the hardware scheduler is sane enough not to
    overpopulate the EU.
    
    A small but significant boost, peak x11perf -aa10text on an i3-330m is
    raised from 1.93Mglyphs/s to 2.35Mglyphs/s.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/gen5_render.c b/src/sna/gen5_render.c
index 27ba04d..0fd51d0 100644
--- a/src/sna/gen5_render.c
+++ b/src/sna/gen5_render.c
@@ -65,7 +65,7 @@
 #define URB_CS_ENTRIES	      0
 
 #define URB_VS_ENTRY_SIZE     1
-#define URB_VS_ENTRIES	      128 /* minimum of 8 */
+#define URB_VS_ENTRIES	      256 /* minimum of 8 */
 
 #define URB_GS_ENTRY_SIZE     0
 #define URB_GS_ENTRIES	      0
@@ -74,7 +74,7 @@
 #define URB_CLIP_ENTRIES      0
 
 #define URB_SF_ENTRY_SIZE     2
-#define URB_SF_ENTRIES	      32
+#define URB_SF_ENTRIES	      64
 
 /*
  * this program computes dA/dx and dA/dy for the texture coordinates along
@@ -82,10 +82,10 @@
  */
 
 #define SF_KERNEL_NUM_GRF  16
-#define SF_MAX_THREADS	   2
+#define SF_MAX_THREADS	   48
 
 #define PS_KERNEL_NUM_GRF   32
-#define PS_MAX_THREADS	    48
+#define PS_MAX_THREADS	    72
 
 static const uint32_t sf_kernel[][4] = {
 #include "exa_sf.g5b"


More information about the xorg-commit mailing list