linux/drivers/gpu/drm/i915/i915_pmu.c

/*
 * SPDX-License-Identifier: MIT
 *
 * Copyright © 2017-2018 Intel Corporation
 */

#include <linux/pm_runtime.h>

#include "gt/intel_engine.h"
#include "gt/intel_engine_pm.h"
#include "gt/intel_engine_regs.h"
#include "gt/intel_engine_user.h"
#include "gt/intel_gt.h"
#include "gt/intel_gt_pm.h"
#include "gt/intel_gt_regs.h"
#include "gt/intel_rc6.h"
#include "gt/intel_rps.h"

#include "i915_drv.h"
#include "i915_pmu.h"

/* Frequency for the sampling timer for events which need it. */
#define FREQUENCY
#define PERIOD

#define ENGINE_SAMPLE_MASK

static cpumask_t i915_pmu_cpumask;
static unsigned int i915_pmu_target_cpu =;

static struct i915_pmu *event_to_pmu(struct perf_event *event)
{}

static struct drm_i915_private *pmu_to_i915(struct i915_pmu *pmu)
{}

static u8 engine_config_sample(u64 config)
{}

static u8 engine_event_sample(struct perf_event *event)
{}

static u8 engine_event_class(struct perf_event *event)
{}

static u8 engine_event_instance(struct perf_event *event)
{}

static bool is_engine_config(const u64 config)
{}

static unsigned int config_gt_id(const u64 config)
{}

static u64 config_counter(const u64 config)
{}

static unsigned int other_bit(const u64 config)
{}

static unsigned int config_bit(const u64 config)
{}

static u32 config_mask(const u64 config)
{}

static bool is_engine_event(struct perf_event *event)
{}

static unsigned int event_bit(struct perf_event *event)
{}

static u32 frequency_enabled_mask(void)
{}

static bool pmu_needs_timer(struct i915_pmu *pmu)
{}

static u64 __get_rc6(struct intel_gt *gt)
{}

static inline s64 ktime_since_raw(const ktime_t kt)
{}

static u64 read_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample)
{}

static void
store_sample(struct i915_pmu *pmu, unsigned int gt_id, int sample, u64 val)
{}

static void
add_sample_mult(struct i915_pmu *pmu, unsigned int gt_id, int sample, u32 val, u32 mul)
{}

static u64 get_rc6(struct intel_gt *gt)
{}

static void init_rc6(struct i915_pmu *pmu)
{}

static void park_rc6(struct intel_gt *gt)
{}

static void __i915_pmu_maybe_start_timer(struct i915_pmu *pmu)
{}

void i915_pmu_gt_parked(struct intel_gt *gt)
{}

void i915_pmu_gt_unparked(struct intel_gt *gt)
{}

static void
add_sample(struct i915_pmu_sample *sample, u32 val)
{}

static bool exclusive_mmio_access(const struct drm_i915_private *i915)
{}

static void engine_sample(struct intel_engine_cs *engine, unsigned int period_ns)
{}

static void
engines_sample(struct intel_gt *gt, unsigned int period_ns)
{}

static bool
frequency_sampling_enabled(struct i915_pmu *pmu, unsigned int gt)
{}

static void
frequency_sample(struct intel_gt *gt, unsigned int period_ns)
{}

static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
{}

static void i915_pmu_event_destroy(struct perf_event *event)
{}

static int
engine_event_status(struct intel_engine_cs *engine,
		    enum drm_i915_pmu_engine_sample sample)
{}

static int
config_status(struct drm_i915_private *i915, u64 config)
{}

static int engine_event_init(struct perf_event *event)
{}

static int i915_pmu_event_init(struct perf_event *event)
{}

static u64 __i915_pmu_event_read(struct perf_event *event)
{}

static void i915_pmu_event_read(struct perf_event *event)
{}

static void i915_pmu_enable(struct perf_event *event)
{}

static void i915_pmu_disable(struct perf_event *event)
{}

static void i915_pmu_event_start(struct perf_event *event, int flags)
{}

static void i915_pmu_event_stop(struct perf_event *event, int flags)
{}

static int i915_pmu_event_add(struct perf_event *event, int flags)
{}

static void i915_pmu_event_del(struct perf_event *event, int flags)
{}

static int i915_pmu_event_event_idx(struct perf_event *event)
{}

struct i915_str_attribute {};

static ssize_t i915_pmu_format_show(struct device *dev,
				    struct device_attribute *attr, char *buf)
{}

#define I915_PMU_FORMAT_ATTR(_name, _config)

static struct attribute *i915_pmu_format_attrs[] =;

static const struct attribute_group i915_pmu_format_attr_group =;

struct i915_ext_attribute {};

static ssize_t i915_pmu_event_show(struct device *dev,
				   struct device_attribute *attr, char *buf)
{}

static ssize_t cpumask_show(struct device *dev,
			    struct device_attribute *attr, char *buf)
{}

static DEVICE_ATTR_RO(cpumask);

static struct attribute *i915_cpumask_attrs[] =;

static const struct attribute_group i915_pmu_cpumask_attr_group =;

#define __event(__counter, __name, __unit)

#define __global_event(__counter, __name, __unit)

#define __engine_event(__sample, __name)

static struct i915_ext_attribute *
add_i915_attr(struct i915_ext_attribute *attr, const char *name, u64 config)
{}

static struct perf_pmu_events_attr *
add_pmu_attr(struct perf_pmu_events_attr *attr, const char *name,
	     const char *str)
{}

static struct attribute **
create_event_attributes(struct i915_pmu *pmu)
{}

static void free_event_attributes(struct i915_pmu *pmu)
{}

static int i915_pmu_cpu_online(unsigned int cpu, struct hlist_node *node)
{}

static int i915_pmu_cpu_offline(unsigned int cpu, struct hlist_node *node)
{}

static enum cpuhp_state cpuhp_slot =;

int i915_pmu_init(void)
{}

void i915_pmu_exit(void)
{}

static int i915_pmu_register_cpuhp_state(struct i915_pmu *pmu)
{}

static void i915_pmu_unregister_cpuhp_state(struct i915_pmu *pmu)
{}

static bool is_igp(struct drm_i915_private *i915)
{}

void i915_pmu_register(struct drm_i915_private *i915)
{}

void i915_pmu_unregister(struct drm_i915_private *i915)
{}