]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/perf: add a parameter to control the size of OA buffer
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 23 Oct 2018 10:07:07 +0000 (11:07 +0100)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Tue, 23 Oct 2018 14:09:25 +0000 (15:09 +0100)
commit4f1275a26d49f62a809d3f343b184bc370cdbb59
treec6f59c052017d7526a414b388d13327b427e412b
parentd9c377b05b0dd4771ed1fbf2565c74218025228a
drm/i915/perf: add a parameter to control the size of OA buffer

The way our hardware is designed doesn't seem to let us use the
MI_RECORD_PERF_COUNT command without setting up a circular buffer.

In the case where the user didn't request OA reports to be available
through the i915 perf stream, we can set the OA buffer to the minimum
size to avoid consuming memory which won't be used by the driver.

v2: Simplify oa buffer size exponent selection (Chris)
    Reuse vma size field (Lionel)

v3: Restrict size opening parameter to values supported by HW (Chris)

v4: Drop out of date comment (Matt)
    Add debug message when buffer size is rejected (Matt)

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181023100707.31738-5-lionel.g.landwerlin@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_perf.c
drivers/gpu/drm/i915/i915_reg.h
include/uapi/drm/i915_drm.h