xf86-video-ati: Branch 'master' - 3 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Wed Oct 27 03:52:51 PDT 2010


 src/drmmode_display.c |    6 +++---
 src/evergreen_exa.c   |    2 +-
 src/radeon_dri2.c     |   14 ++++++++++----
 3 files changed, 14 insertions(+), 8 deletions(-)

New commits:
commit d31046ba6c8eee9b7decc3875697d37c38bc38f3
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Oct 27 12:12:04 2010 +0200

    Re-use result of GetScreenPixmap call.
    
    Fixes compile warning due to local variable ppix being unused when building
    against current xserver Git.

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 37010cd..cbbfa50 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1134,8 +1134,8 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 		goto fail;
 
 	if (!info->r600_shadow_fb) {
-		radeon_set_pixmap_bo(screen->GetScreenPixmap(screen), info->front_bo);
-		screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
+		radeon_set_pixmap_bo(ppix, info->front_bo);
+		screen->ModifyPixmapHeader(ppix,
 					   width, height, -1, -1, pitch * cpp, NULL);
 	} else {
 		if (radeon_bo_map(info->front_bo, 1))
@@ -1145,7 +1145,7 @@ drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
 			goto fail;
 		free(info->fb_shadow);
 		info->fb_shadow = fb_shadow;
-		screen->ModifyPixmapHeader(screen->GetScreenPixmap(screen),
+		screen->ModifyPixmapHeader(ppix,
 					   width, height, -1, -1, pitch * cpp,
 					   info->fb_shadow);
 	}
commit 4dd7f835c17b00707f1d8d4e36a24380ba52761e
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Oct 27 12:09:03 2010 +0200

    Fix another stray xfree() call.

diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 19cc5bd..72e3a5d 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -1916,7 +1916,7 @@ EVERGREENDrawInit(ScreenPtr pScreen)
 	info->accel_state->vsync = FALSE;
 
     if (!exaDriverInit(pScreen, info->accel_state->exa)) {
-	xfree(info->accel_state->exa);
+	free(info->accel_state->exa);
 	return FALSE;
     }
 
commit f815e9c3c61b1ed73e7dd9383587efcdd8dfc07f
Author: Michel Dänzer <daenzer at vmware.com>
Date:   Wed Oct 27 11:29:12 2010 +0200

    Don't try to delete DRI2 event list entries that were never added. (Bug #31086)
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31086 .

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 2668812..1428216 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -704,6 +704,8 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
     if (ListAddDRI2ClientEvents(client, &wait_info->link)) {
         xf86DrvMsg(scrn->scrnIndex, X_WARNING,
                 "add events to client private failed.\n");
+        free(wait_info);
+        wait_info = NULL;
         goto out_complete;
     }
 
@@ -825,7 +827,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     RADEONInfoPtr info = RADEONPTR(scrn);
     drmVBlank vbl;
     int ret, crtc= radeon_dri2_drawable_crtc(draw), flip = 0;
-    DRI2FrameEventPtr swap_info;
+    DRI2FrameEventPtr swap_info = NULL;
     enum DRI2FrameEventType swap_type = DRI2_SWAP;
     CARD64 current_msc;
     BoxRec box;
@@ -837,8 +839,6 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     divisor &= 0xffffffff;
     remainder &= 0xffffffff;
 
-    swap_info = calloc(1, sizeof(DRI2FrameEventRec));
-
     /* radeon_dri2_frame_event_handler will get called some unknown time in the
      * future with these buffers.  Take a reference to ensure that they won't
      * get destroyed before then. 
@@ -847,7 +847,11 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     radeon_dri2_ref_buffer(back);
 
     /* Drawable not displayed... just complete the swap */
-    if (crtc == -1 || !swap_info)
+    if (crtc == -1)
+        goto blit_fallback;
+
+    swap_info = calloc(1, sizeof(DRI2FrameEventRec));
+    if (!swap_info)
         goto blit_fallback;
 
     swap_info->drawable_id = draw->id;
@@ -860,6 +864,8 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
     if (ListAddDRI2ClientEvents(client, &swap_info->link)) {
         xf86DrvMsg(scrn->scrnIndex, X_WARNING,
                 "add events to client private failed.\n");
+        free(swap_info);
+        swap_info = NULL;
         goto blit_fallback;
     }
 


More information about the xorg-commit mailing list