]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blame - drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-eoan-kernel.git] / drivers / gpu / drm / nouveau / nvkm / subdev / pmu / priv.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
ebb58dc2
BS
2#ifndef __NVKM_PMU_PRIV_H__
3#define __NVKM_PMU_PRIV_H__
e2ca4e7d 4#define nvkm_pmu(p) container_of((p), struct nvkm_pmu, subdev)
ebb58dc2
BS
5#include <subdev/pmu.h>
6#include <subdev/pmu/fuc/os.h>
7
e72da6e0
AC
8int nvkm_pmu_ctor(const struct nvkm_pmu_func *, struct nvkm_device *,
9 int index, struct nvkm_pmu *);
e2ca4e7d
BS
10int nvkm_pmu_new_(const struct nvkm_pmu_func *, struct nvkm_device *,
11 int index, struct nvkm_pmu **);
ebb58dc2 12
e2ca4e7d 13struct nvkm_pmu_func {
ebb58dc2
BS
14 struct {
15 u32 *data;
16 u32 size;
17 } code;
e2ca4e7d 18
ebb58dc2
BS
19 struct {
20 u32 *data;
21 u32 size;
22 } data;
23
6b1277c8 24 bool (*enabled)(struct nvkm_pmu *);
da7d2062
BS
25 void (*reset)(struct nvkm_pmu *);
26 int (*init)(struct nvkm_pmu *);
27 void (*fini)(struct nvkm_pmu *);
28 void (*intr)(struct nvkm_pmu *);
29 int (*send)(struct nvkm_pmu *, u32 reply[2], u32 process,
30 u32 message, u32 data0, u32 data1);
31 void (*recv)(struct nvkm_pmu *);
21b13791 32 void (*pgob)(struct nvkm_pmu *, bool);
ebb58dc2 33};
f02a0e84 34
da7d2062
BS
35int gt215_pmu_init(struct nvkm_pmu *);
36void gt215_pmu_fini(struct nvkm_pmu *);
37void gt215_pmu_intr(struct nvkm_pmu *);
38void gt215_pmu_recv(struct nvkm_pmu *);
39int gt215_pmu_send(struct nvkm_pmu *, u32[2], u32, u32, u32, u32);
40
6b1277c8 41bool gf100_pmu_enabled(struct nvkm_pmu *);
715e7d26
BS
42void gf100_pmu_reset(struct nvkm_pmu *);
43
f02a0e84 44void gk110_pmu_pgob(struct nvkm_pmu *, bool);
ebb58dc2 45#endif