[PATCH i-g-t 07/10] intel_display_poller: use INREG and OUTREG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use INREG and OUTREG instead of using mmio directly.

Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>
---
 tools/intel_display_poller.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c
index 2eab6c494f68..6d6ea21ca974 100644
--- a/tools/intel_display_poller.c
+++ b/tools/intel_display_poller.c
@@ -67,22 +67,22 @@ static void sighandler(int x)
 
 static uint16_t read_reg_16(uint32_t reg)
 {
-	return *(volatile uint16_t *)((volatile char*)mmio + vlv_offset + reg);
+	return INREG16(vlv_offset + reg);
 }
 
 static uint32_t read_reg(uint32_t reg)
 {
-	return *(volatile uint32_t *)((volatile char*)mmio + vlv_offset + reg);
+	return INREG(vlv_offset + reg);
 }
 
 static void write_reg_16(uint32_t reg, uint16_t val)
 {
-	*(volatile uint16_t *)((volatile char*)mmio + vlv_offset + reg) = val;
+	OUTREG16(vlv_offset + reg, val);
 }
 
 static void write_reg(uint32_t reg, uint32_t val)
 {
-	*(volatile uint32_t *)((volatile char*)mmio + vlv_offset + reg) = val;
+	OUTREG(vlv_offset + reg, val);
 }
 
 static int pipe_to_plane(uint32_t devid, int pipe)
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux