[Intel-gfx] [PATCH i-g-t 04/10] intel_reg_checker: switch to INREG

Jani Nikula jani.nikula at intel.com
Tue Apr 28 05:04:29 PDT 2015


Use INREG instead of using mmio directly.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tools/intel_reg_checker.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/tools/intel_reg_checker.c b/tools/intel_reg_checker.c
index 22d979613ea1..2d6da70c3afa 100644
--- a/tools/intel_reg_checker.c
+++ b/tools/intel_reg_checker.c
@@ -32,16 +32,10 @@
 static uint32_t devid;
 static int gen;
 
-static inline uint32_t
-read_reg(uint32_t reg)
-{
-	return *(volatile uint32_t *)((volatile char *)mmio + reg);
-}
-
 static uint32_t
 read_and_print_reg(const char *name, uint32_t reg)
 {
-	uint32_t val = read_reg(reg);
+	uint32_t val = INREG(reg);
 
 	printf("%s (0x%x): 0x%08x\n", name, reg, val);
 
-- 
2.1.4



More information about the Intel-gfx mailing list