[Intel-gfx] [PATCH i-g-t 07/10] intel_display_poller: use INREG and OUTREG
Jani Nikula
jani.nikula at intel.com
Tue Apr 28 05:04:32 PDT 2015
Use INREG and OUTREG instead of using mmio directly.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
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
More information about the Intel-gfx
mailing list