* this context.
*/
atomic64_t ctx_mem;
+
+ /**
+ * @perfcntrs: Per-context reserved perfcntrs state
+ */
+ struct msm_perfcntr_context_state *perfctx;
};
struct drm_gpuvm *msm_context_vm(struct drm_device *dev, struct msm_context *ctx);
const struct msm_perfcntr_counter *counters;
};
+/**
+ * struct msm_perfcntr_context_state - per-msm_context counter state
+ *
+ * A given counter can either be unused, reserved for global counter
+ * collection exclusively, or reserved for local per-context counter
+ * collection inclusively. Multiple contexts can reserve the same
+ * counter, since SEL reg programming and counter begin/end sampling
+ * happen locally (within a single GEM_SUBMIT ioctl).
+ */
+struct msm_perfcntr_context_state {
+ /** @dummy: Some compilers dislike structs with only a flex array */
+ unsigned dummy;
+
+ /**
+ * @reserved_counters:
+ *
+ * The number of reserved counters indexed by perfcntr group.
+ */
+ unsigned reserved_counters[];
+};
+
extern const struct msm_perfcntr_group a6xx_perfcntr_groups[];
extern const unsigned a6xx_num_perfcntr_groups;