[Mesa-dev] [PATCH] etnaviv: fix some pm query issues

Christian Gmeiner christian.gmeiner at gmail.com
Sun Jun 2 11:22:41 UTC 2019


Am Fr., 31. Mai 2019 um 18:05 Uhr schrieb Lucas Stach <l.stach at pengutronix.de>:
>
> The offsets to read the query results were off-by-one, which causes the
> counters to report bogus increasing values.
>
> Also the counter result is u32, so we need to initialize the query type
> to reflect that.
>
> Signed-off-by: Lucas Stach <l.stach at pengutronix.de>

Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>

> ---
> This only fixes the obvious issues. I still believe there are some
> GPU/CPU synchronization issues in this code, that need to be fixed
> separately.

What is your current test for synchronization correctness?

> ---
>  src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
> index ade0b9790c28..c63ed8304919 100644
> --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
> +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c
> @@ -485,9 +485,9 @@ etna_pm_query_get(struct etna_cmd_stream *stream, struct etna_query *q,
>     assert(flags);
>
>     if (flags == ETNA_PM_PROCESS_PRE)
> -      offset = 2;
> +      offset = 1;
>     else
> -      offset = 3;
> +      offset = 2;
>
>     struct etna_perf p = {
>        .flags = flags,
> @@ -639,6 +639,10 @@ etna_pm_get_driver_query_info(struct pipe_screen *pscreen, unsigned index,
>     info->name = query_config[i].name;
>     info->query_type = query_config[i].type;
>     info->group_id = query_config[i].group_id;
> +   info->type = PIPE_DRIVER_QUERY_TYPE_UINT;
> +   info->result_type = PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE;
> +   info->max_value.u32 = 0;
> +   info->flags = 0;
>
>     return 1;
>  }
> --
> 2.20.1
>
> _______________________________________________
> etnaviv mailing list
> etnaviv at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv



-- 
greets
--
Christian Gmeiner, MSc

https://christian-gmeiner.info


More information about the mesa-dev mailing list