linux/drivers/gpu/drm/i915/gt/selftest_rps.c

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

#include <linux/pm_qos.h>
#include <linux/sort.h>

#include "gem/i915_gem_internal.h"

#include "i915_reg.h"
#include "intel_engine_heartbeat.h"
#include "intel_engine_pm.h"
#include "intel_engine_regs.h"
#include "intel_gpu_commands.h"
#include "intel_gt_clock_utils.h"
#include "intel_gt_pm.h"
#include "intel_rc6.h"
#include "selftest_engine_heartbeat.h"
#include "selftest_rps.h"
#include "selftests/igt_flush_test.h"
#include "selftests/igt_spinner.h"
#include "selftests/librapl.h"

/* Try to isolate the impact of cstates from determing frequency response */
#define CPU_LATENCY

static void dummy_rps_work(struct work_struct *wrk)
{}

static int cmp_u64(const void *A, const void *B)
{}

static int cmp_u32(const void *A, const void *B)
{}

static struct i915_vma *
create_spin_counter(struct intel_engine_cs *engine,
		    struct i915_address_space *vm,
		    bool srm,
		    u32 **cancel,
		    u32 **counter)
{}

static u8 wait_for_freq(struct intel_rps *rps, u8 freq, int timeout_ms)
{}

static u8 rps_set_check(struct intel_rps *rps, u8 freq)
{}

static void show_pstate_limits(struct intel_rps *rps)
{}

int live_rps_clock_interval(void *arg)
{}

int live_rps_control(void *arg)
{}

static void show_pcu_config(struct intel_rps *rps)
{}

static u64 __measure_frequency(u32 *cntr, int duration_ms)
{}

static u64 measure_frequency_at(struct intel_rps *rps, u32 *cntr, int *freq)
{}

static u64 __measure_cs_frequency(struct intel_engine_cs *engine,
				  int duration_ms)
{}

static u64 measure_cs_frequency_at(struct intel_rps *rps,
				   struct intel_engine_cs *engine,
				   int *freq)
{}

static bool scaled_within(u64 x, u64 y, u32 f_n, u32 f_d)
{}

int live_rps_frequency_cs(void *arg)
{}

int live_rps_frequency_srm(void *arg)
{}

static void sleep_for_ei(struct intel_rps *rps, int timeout_us)
{}

static int __rps_up_interrupt(struct intel_rps *rps,
			      struct intel_engine_cs *engine,
			      struct igt_spinner *spin)
{}

static int __rps_down_interrupt(struct intel_rps *rps,
				struct intel_engine_cs *engine)
{}

int live_rps_interrupt(void *arg)
{}

static u64 __measure_power(int duration_ms)
{}

static u64 measure_power(struct intel_rps *rps, int *freq)
{}

static u64 measure_power_at(struct intel_rps *rps, int *freq)
{}

int live_rps_power(void *arg)
{}

int live_rps_dynamic(void *arg)
{}