xf86-video-intel: 2 commits - src/drmmode_display.c src/i830.h src/i830_memory.c src/i830_uxa.c

Chris Wilson ickle at kemper.freedesktop.org
Mon May 10 14:39:50 PDT 2010


 src/drmmode_display.c |    8 +++++---
 src/i830.h            |    2 --
 src/i830_memory.c     |   10 ++++------
 src/i830_uxa.c        |    1 +
 4 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit a8761585ef0b37736d302299d6b03e0957ad3e16
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 10 19:38:24 2010 +0100

    i830: Minor cleanup
    
    Remove some extraneous prototypes and unused variables.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d8b158e..cd0787e 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1255,6 +1255,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	drm_intel_bo *old_front = NULL;
 	Bool	    ret;
 	ScreenPtr   screen = screenInfo.screens[scrn->scrnIndex];
+	PixmapPtr   pixmap;
 	uint32_t    old_fb_id;
 	int	    i, w, pitch, old_width, old_height, old_pitch;
 
@@ -1288,10 +1289,11 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 	if (ret)
 		goto fail;
 
-	i830_set_pixmap_bo(screen->GetScreenPixmap(screen), intel->front_buffer);
+	pixmap = screen->GetScreenPixmap(screen);
+	i830_set_pixmap_bo(pixmap, intel->front_buffer);
+	assert (i830_get_pixmap_intel(pixmap)->stride == pitch);
 
-	screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
-				   width, height, -1, -1, pitch, NULL);
+	screen->ModifyPixmapHeader(pixmap, width, height, -1, -1, pitch, NULL);
 
 	for (i = 0; i < xf86_config->num_crtc; i++) {
 		xf86CrtcPtr crtc = xf86_config->crtc[i];
diff --git a/src/i830.h b/src/i830.h
index fc26f3a..aa7fedc 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -510,8 +510,6 @@ intel_debug_fallback(ScrnInfoPtr scrn, char *format, ...)
 	va_end(ap);
 }
 
-Bool i830_pixmap_tiled(PixmapPtr p);
-
 static inline Bool
 intel_check_pitch_2d(PixmapPtr pixmap)
 {
diff --git a/src/i830_memory.c b/src/i830_memory.c
index a21f29b..6a73bf6 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -219,19 +219,18 @@ static Bool IsTileable(ScrnInfoPtr scrn, int pitch)
 drm_intel_bo *i830_allocate_framebuffer(ScrnInfoPtr scrn)
 {
 	intel_screen_private *intel = intel_get_screen_private(scrn);
-	unsigned int pitch = scrn->displayWidth * intel->cpp;
+	drm_intel_bo *front_buffer;
 	long size, fb_height;
-	int flags, ret;
-	drm_intel_bo *front_buffer = NULL;
+	unsigned int pitch;
 	uint32_t tiling_mode, requested_tiling_mode;
-
-	flags = ALLOW_SHARING | DISABLE_REUSE;
+	int ret;
 
 	/* We'll allocate the fb such that the root window will fit regardless of
 	 * rotation.
 	 */
 	fb_height = scrn->virtualY;
 
+	pitch = scrn->displayWidth * intel->cpp;
 	size = ROUND_TO_PAGE(pitch * fb_height);
 
 	if (intel->tiling && IsTileable(scrn, pitch))
@@ -254,7 +253,6 @@ drm_intel_bo *i830_allocate_framebuffer(ScrnInfoPtr scrn)
 
 	front_buffer = drm_intel_bo_alloc(intel->bufmgr, "front buffer",
 					  size, GTT_PAGE_SIZE);
-
 	if (front_buffer == NULL) {
 		xf86DrvMsg(scrn->scrnIndex, X_ERROR,
 			   "Failed to allocate framebuffer.\n");
commit 9e9b0d85da801f1f95c7bc7e99566fe7056f5813
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon May 10 18:37:02 2010 +0100

    i830: Update stride when swapping bo for PutImage
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/i830_uxa.c b/src/i830_uxa.c
index 8b81e0c..94a9fa9 100644
--- a/src/i830_uxa.c
+++ b/src/i830_uxa.c
@@ -737,6 +737,7 @@ i830_uxa_pixmap_swap_bo_with_image(PixmapPtr pixmap,
 		dri_bo_unreference(priv->bo);
 		priv->bo = bo;
 		priv->tiling = tiling;
+		priv->stride = stride;
 		priv->batch_read_domains = priv->batch_write_domain = 0;
 		priv->flush_read_domains = priv->flush_write_domain = 0;
 		list_del(&priv->batch);


More information about the xorg-commit mailing list