mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
intel/perf: Allocate sseu in heap memory
This is a i915 specific struct and Xe KMD will not need anything like that so lets allocate it in heap memory. This will help us remove the i915_drm.h includes from common code. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29421>
This commit is contained in:
parent
e1c2847b81
commit
da43bf3f2e
2 changed files with 10 additions and 4 deletions
|
|
@ -73,7 +73,7 @@ i915_perf_stream_open(struct intel_perf_config *perf_config, int drm_fd,
|
|||
if (intel_perf_has_global_sseu(perf_config) &&
|
||||
perf_config->devinfo->verx10 < 125) {
|
||||
properties[p++] = DRM_I915_PERF_PROP_GLOBAL_SSEU;
|
||||
properties[p++] = (uintptr_t) &perf_config->sseu;
|
||||
properties[p++] = (uintptr_t) perf_config->sseu;
|
||||
}
|
||||
|
||||
assert(p <= ARRAY_SIZE(properties));
|
||||
|
|
@ -182,7 +182,11 @@ i915_oa_metrics_available(struct intel_perf_config *perf, int fd, bool use_regis
|
|||
perf->i915_perf_version = i915_perf_version(fd);
|
||||
|
||||
/* Record the default SSEU configuration. */
|
||||
i915_get_sseu(fd, &perf->sseu);
|
||||
perf->sseu = rzalloc(perf, struct drm_i915_gem_context_param_sseu);
|
||||
if (!perf->sseu)
|
||||
return false;
|
||||
|
||||
i915_get_sseu(fd, perf->sseu);
|
||||
|
||||
/* The existence of this sysctl parameter implies the kernel supports
|
||||
* the i915 perf interface.
|
||||
|
|
|
|||
|
|
@ -345,8 +345,10 @@ struct intel_perf_config {
|
|||
*/
|
||||
uint64_t oa_timestamp_mask;
|
||||
|
||||
/* Powergating configuration for the running the query. */
|
||||
struct drm_i915_gem_context_param_sseu sseu;
|
||||
/* Powergating configuration for the running the query.
|
||||
* Only used in i915, struct drm_i915_gem_context_param_sseu.
|
||||
*/
|
||||
void *sseu;
|
||||
|
||||
struct intel_perf_query_info *queries;
|
||||
int n_queries;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue