[Mesa-dev] [PATCH 2/4] panfrost: Expose perfcounters through the pipe_query interface

Alyssa Rosenzweig alyssa at rosenzweig.io
Thu Apr 4 15:49:28 UTC 2019


> +	if (!screen->driver->create_perfcnt_query)
> +		return NULL;

Redundant -- it'll always be set since there's only DRM driver now. We
should probably drop the indirection wholesale, too, but that's for a
different patch. I guess if the DRM implementation isn't until next
patch, it's still probably cleanest to just squash the two and hope for
the best.

> +	    screen->driver->destroy_perfcnt_query)

"""
>          /* We need to flush out the jobs to actually run the counter, TODO
>           * check wait, TODO wallpaper after if needed */
>  
>          panfrost_flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);

Does this flush apply to performance counters too?

> +static int panfrost_get_query_group_info(struct pipe_screen *screen,
> +					 unsigned index,
> +					 struct pipe_driver_query_group_info *info)
> +{
> +	struct panfrost_screen *pscreen = pan_screen(screen);
> +
> +	if (!info)
> +		return 1;

Erm, semantically, what does this mean?


More information about the mesa-dev mailing list