[Intel-gfx] [PATCH i-g-t 06/10] intel_watermark: switch to INREG

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


Use INREG instead of using mmio directly.

Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 tools/intel_watermark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/intel_watermark.c b/tools/intel_watermark.c
index e5dee46db78f..0b7c5e5193ef 100644
--- a/tools/intel_watermark.c
+++ b/tools/intel_watermark.c
@@ -38,7 +38,7 @@ static uint32_t devid;
 
 static uint32_t read_reg(uint32_t addr)
 {
-	return *(volatile uint32_t *)((volatile char*)mmio + display_base + addr);
+	return INREG(display_base + addr);
 }
 
 struct gmch_wm {
-- 
2.1.4



More information about the Intel-gfx mailing list