[igt-dev] [PATCH i-g-t v10 2/3] lib/intel_mmio: add funtions for read/write register funtions
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 28 16:28:37 UTC 2019
Quoting Daniel Mrzyglod (2019-08-28 17:16:15)
> -uint32_t INREG(uint32_t reg)
> +uint32_t INREG_DEV(void *mmio, uint32_t reg)
> {
> - return *(volatile uint32_t *)((volatile char *)igt_global_mmio + reg);
> + return *((volatile uint32_t *)mmio + reg);
(uint32_t *)mmio + reg != (uint32_t *)(mmio + reg)
Oops. Same problem repeated for INRE16_DEV, for INREG8_DEV it's a wash.
I would err on the side of consistency though.
-Chris
More information about the igt-dev
mailing list