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

ltc.h (1570B)


      1/* SPDX-License-Identifier: MIT */
      2#ifndef __NVKM_LTC_H__
      3#define __NVKM_LTC_H__
      4#include <core/subdev.h>
      5#include <core/mm.h>
      6
      7#define NVKM_LTC_MAX_ZBC_CNT 16
      8
      9struct nvkm_ltc {
     10	const struct nvkm_ltc_func *func;
     11	struct nvkm_subdev subdev;
     12
     13	u32 ltc_nr;
     14	u32 lts_nr;
     15
     16	struct mutex mutex; /* serialises CBC operations */
     17	u32 num_tags;
     18	u32 tag_base;
     19	struct nvkm_memory *tag_ram;
     20
     21	int zbc_min;
     22	int zbc_max;
     23	u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
     24	u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
     25	u32 zbc_stencil[NVKM_LTC_MAX_ZBC_CNT];
     26};
     27
     28void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
     29
     30int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
     31int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
     32int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32);
     33
     34void nvkm_ltc_invalidate(struct nvkm_ltc *);
     35void nvkm_ltc_flush(struct nvkm_ltc *);
     36
     37int gf100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     38int gk104_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     39int gm107_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     40int gm200_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     41int gp100_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     42int gp102_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     43int gp10b_ltc_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_ltc **);
     44#endif