cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

changk104.h (1950B)


      1/* SPDX-License-Identifier: MIT */
      2#ifndef __GK104_FIFO_CHAN_H__
      3#define __GK104_FIFO_CHAN_H__
      4#define gk104_fifo_chan(p) container_of((p), struct gk104_fifo_chan, base)
      5#include "chan.h"
      6#include "gk104.h"
      7
      8struct gk104_fifo_chan {
      9	struct nvkm_fifo_chan base;
     10	struct gk104_fifo *fifo;
     11	int runl;
     12
     13	struct nvkm_fifo_cgrp *cgrp;
     14	struct list_head head;
     15	bool killed;
     16
     17	struct nvkm_memory *mthd;
     18
     19#define GK104_FIFO_ENGN_SW 15
     20	struct gk104_fifo_engn {
     21		struct nvkm_gpuobj *inst;
     22		struct nvkm_vma *vma;
     23	} engn[NVKM_FIFO_ENGN_NR];
     24};
     25
     26extern const struct nvkm_fifo_chan_func gk104_fifo_gpfifo_func;
     27
     28int gk104_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *,
     29			  void *data, u32 size, struct nvkm_object **);
     30void *gk104_fifo_gpfifo_dtor(struct nvkm_fifo_chan *);
     31void gk104_fifo_gpfifo_init(struct nvkm_fifo_chan *);
     32void gk104_fifo_gpfifo_fini(struct nvkm_fifo_chan *);
     33struct gk104_fifo_engn *gk104_fifo_gpfifo_engine(struct gk104_fifo_chan *, struct nvkm_engine *);
     34int gk104_fifo_gpfifo_engine_ctor(struct nvkm_fifo_chan *, struct nvkm_engine *,
     35				  struct nvkm_object *);
     36void gk104_fifo_gpfifo_engine_dtor(struct nvkm_fifo_chan *,
     37				   struct nvkm_engine *);
     38int gk104_fifo_gpfifo_kick(struct gk104_fifo_chan *);
     39int gk104_fifo_gpfifo_kick_locked(struct gk104_fifo_chan *);
     40
     41int gv100_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *,
     42			  void *data, u32 size, struct nvkm_object **);
     43int gv100_fifo_gpfifo_new_(const struct nvkm_fifo_chan_func *,
     44			   struct gk104_fifo *, u64 *, u16 *, u64, u64, u64,
     45			   u64 *, bool, u32 *, const struct nvkm_oclass *,
     46			   struct nvkm_object **);
     47int gv100_fifo_gpfifo_engine_init(struct nvkm_fifo_chan *,
     48				  struct nvkm_engine *);
     49int gv100_fifo_gpfifo_engine_fini(struct nvkm_fifo_chan *,
     50				  struct nvkm_engine *, bool);
     51
     52int tu102_fifo_gpfifo_new(struct gk104_fifo *, const struct nvkm_oclass *,
     53			  void *data, u32 size, struct nvkm_object **);
     54#endif