linux/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2#ifndef __NVKM_PMU_PRIV_H__
   3#define __NVKM_PMU_PRIV_H__
   4#define nvkm_pmu(p) container_of((p), struct nvkm_pmu, subdev)
   5#include <subdev/pmu.h>
   6#include <subdev/pmu/fuc/os.h>
   7
   8int nvkm_pmu_ctor(const struct nvkm_pmu_func *, struct nvkm_device *,
   9                  int index, struct nvkm_pmu *);
  10int nvkm_pmu_new_(const struct nvkm_pmu_func *, struct nvkm_device *,
  11                  int index, struct nvkm_pmu **);
  12
  13struct nvkm_pmu_func {
  14        struct {
  15                u32 *data;
  16                u32  size;
  17        } code;
  18
  19        struct {
  20                u32 *data;
  21                u32  size;
  22        } data;
  23
  24        bool (*enabled)(struct nvkm_pmu *);
  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 *);
  32        void (*pgob)(struct nvkm_pmu *, bool);
  33};
  34
  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
  41bool gf100_pmu_enabled(struct nvkm_pmu *);
  42void gf100_pmu_reset(struct nvkm_pmu *);
  43
  44void gk110_pmu_pgob(struct nvkm_pmu *, bool);
  45#endif
  46