1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright �� 2019 Intel Corporation
4 */
5
6#ifndef INTEL_RC6_TYPES_H
7#define INTEL_RC6_TYPES_H
8
9#include <linux/spinlock.h>
10#include <linux/types.h>
11
12#include "intel_engine_types.h"
13
14struct drm_i915_gem_object;
15
16/* RC6 residency types */
17enum intel_rc6_res_type {
18	INTEL_RC6_RES_RC6_LOCKED,
19	INTEL_RC6_RES_RC6,
20	INTEL_RC6_RES_RC6p,
21	INTEL_RC6_RES_RC6pp,
22	INTEL_RC6_RES_MAX,
23	INTEL_RC6_RES_VLV_MEDIA = INTEL_RC6_RES_RC6p,
24};
25
26struct intel_rc6 {
27	i915_reg_t res_reg[INTEL_RC6_RES_MAX];
28	u64 prev_hw_residency[INTEL_RC6_RES_MAX];
29	u64 cur_residency[INTEL_RC6_RES_MAX];
30
31	u32 ctl_enable;
32	u32 bios_rc_state;
33
34	struct drm_i915_gem_object *pctx;
35
36	bool supported : 1;
37	bool enabled : 1;
38	bool manual : 1;
39	bool wakeref : 1;
40	bool bios_state_captured : 1;
41};
42
43#endif /* INTEL_RC6_TYPES_H */
44