Commit 2c3631fb authored by Lucas De Marchi's avatar Lucas De Marchi
Browse files

drm/i915/pmu: Use event_to_pmu()



i915 pointer is not needed in this function and all the others simply
calculate the i915_pmu container based on the event->pmu. Follow the
same logic as in other functions.

Reviewed-by: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240909204340.3646458-2-lucas.demarchi@intel.com


Signed-off-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
parent 10a7210d
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -834,15 +834,14 @@ static void i915_pmu_event_start(struct perf_event *event, int flags)

static void i915_pmu_event_stop(struct perf_event *event, int flags)
{
	struct drm_i915_private *i915 =
		container_of(event->pmu, typeof(*i915), pmu.base);
	struct i915_pmu *pmu = &i915->pmu;
	struct i915_pmu *pmu = event_to_pmu(event);

	if (pmu->closed)
		goto out;

	if (flags & PERF_EF_UPDATE)
		i915_pmu_event_read(event);

	i915_pmu_disable(event);

out: