Mesa (radeon-rewrite): radeon: reading back to scratch reg through status map doesn't work

Jerome Glisse glisse at kemper.freedesktop.org
Fri May 22 21:46:59 UTC 2009


Module: Mesa
Branch: radeon-rewrite
Commit: 434f9200422a9e937277ca592ef14a63781dec16
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=434f9200422a9e937277ca592ef14a63781dec16

Author: Jerome Glisse <glisse at freedesktop.org>
Date:   Fri May 22 23:44:44 2009 +0200

radeon: reading back to scratch reg through status map doesn't work

For some unknown reasons the scratch reg value doesn't endup in the status
map at the scratch reg offset, this is a temporary work around until we
figure out why it doesn't work.

---

 src/mesa/drivers/dri/radeon/radeon_bo_legacy.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
index 03a6299..6a8da40 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c
@@ -48,6 +48,7 @@
 #include "radeon_drm.h"
 #include "radeon_common.h"
 #include "radeon_bocs_wrapper.h"
+#include "radeon_macros.h"
 
 /* no seriously texmem.c is this screwed up */
 struct bo_legacy_texture_object {
@@ -164,6 +165,7 @@ static int legacy_free_handle(struct bo_manager_legacy *bom, uint32_t handle)
 static void legacy_get_current_age(struct bo_manager_legacy *boml)
 {
     drm_radeon_getparam_t gp;
+    unsigned char *RADEONMMIO = NULL;
     int r;
 
     if (IS_R300_CLASS(boml->screen)) {
@@ -175,8 +177,11 @@ static void legacy_get_current_age(struct bo_manager_legacy *boml)
        	 fprintf(stderr, "%s: drmRadeonGetParam: %d\n", __FUNCTION__, r);
          exit(1);
        }
-    } else
-	boml->current_age = boml->screen->scratch[3];
+    } else {
+        RADEONMMIO = boml->screen->mmio.map;
+        boml->current_age = boml->screen->scratch[3];
+        boml->current_age = INREG(RADEON_GUI_SCRATCH_REG3);
+    }
 }
 
 static int legacy_is_pending(struct radeon_bo *bo)




More information about the mesa-commit mailing list