]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: add support for perf configuration queries
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Mon, 14 Oct 2019 20:14:02 +0000 (21:14 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Oct 2019 20:30:26 +0000 (21:30 +0100)
commit4f6ccc74a85cbb4cdd373c374dc76398dc7603a1
treed73db28db48067b9e6b7a2eac94a153934716a24
parentb8d49f28aa03e4678e450e588b10c0faf96e4118
drm/i915: add support for perf configuration queries

Listing configurations at the moment is supported only through sysfs.
This might cause issues for applications wanting to list
configurations from a container where sysfs isn't available.

This change adds a way to query the number of configurations and their
content through the i915 query uAPI.

v2: Fix sparse warnings (Lionel)
    Add support to query configuration using uuid (Lionel)

v3: Fix some inconsistency in uapi header (Lionel)
    Fix unlocking when not locked issue (Lionel)
    Add debug messages (Lionel)

v4: Fix missing unlock (Dan)

v5: Drop lock when copying config content to userspace (Chris)

v6: Drop lock when copying config list to userspace (Chris)
    Fix deadlock when calling i915_perf_get_oa_config() under
    perf.metrics_lock (Lionel)
    Add i915_oa_config_get() (Chris)

Link: https://gitlab.freedesktop.org/mesa/mesa/merge_requests/932
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20191014201404.22468-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_query.c
include/uapi/drm/i915_drm.h