[PATCH v7 04/11] drm/i915: don't whitelist oacontrol in cmd parser

Matthew Auld matthew.william.auld at gmail.com
Tue Oct 25 22:02:16 UTC 2016


On 25 October 2016 at 00:19, Robert Bragg <robert at sixbynine.org> wrote:
> Being able to program OACONTROL from a non-privileged batch buffer is
> not sufficient to be able to configure the OA unit. This was originally
> allowed to help enable Mesa to expose OA counters via the
> INTEL_performance_query extension, but the current implementation based
> on programming OACONTROL via a batch buffer isn't able to report useable
> data without a more complete OA unit configuration. Mesa handles the
> possibility that writes to OACONTROL may not be allowed and so only
> advertises the extension after explicitly testing that a write to
> OACONTROL succeeds. Based on this; removing OACONTROL from the whitelist
> should be ok for userspace.
>
> Removing this simplifies adding a new kernel api for configuring the OA
> unit without needing to consider the possibility that userspace might
> trample on OACONTROL state which we'd like to start managing within
> the kernel instead. In particular running any Mesa based GL application
> currently results in clearing OACONTROL when initializing which would
> disable the capturing of metrics.
>
> Signed-off-by: Robert Bragg <robert at sixbynine.org>
Okay, seems reasonable.

Reviewed-by: Matthew Auld <matthew.auld at intel.com>


More information about the dri-devel mailing list