[PATCH v2 24/43] drm/xe/query: Convert register access to use xe_mmio
Rodrigo Vivi
rodrigo.vivi at intel.com
Tue Sep 10 18:44:21 UTC 2024
On Fri, Sep 06, 2024 at 05:08:13PM -0700, Matt Roper wrote:
> Stop using GT pointers for register access.
>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
> drivers/gpu/drm/xe/xe_query.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index 28d9bb3b825d..5246a4a2740e 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -91,16 +91,17 @@ __read_timestamps(struct xe_gt *gt,
> u64 *cpu_delta,
> __ktime_func_t cpu_clock)
> {
> + struct xe_mmio *mmio = >->mmio;
> u32 upper, lower, old_upper, loop = 0;
>
> - upper = xe_mmio_read32(gt, upper_reg);
> + upper = xe_mmio_read32(mmio, upper_reg);
> do {
> *cpu_delta = local_clock();
> *cpu_ts = cpu_clock();
> - lower = xe_mmio_read32(gt, lower_reg);
> + lower = xe_mmio_read32(mmio, lower_reg);
> *cpu_delta = local_clock() - *cpu_delta;
> old_upper = upper;
> - upper = xe_mmio_read32(gt, upper_reg);
> + upper = xe_mmio_read32(mmio, upper_reg);
> } while (upper != old_upper && loop++ < 2);
>
> *engine_ts = (u64)upper << 32 | lower;
> --
> 2.45.2
>
More information about the Intel-xe
mailing list