]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/gpu/drm/nouveau/include/nvkm/subdev/ltc.h
drm/nouveau/ltc/gf100-: allocate tagram with nvkm_ram_get()
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / ltc.h
CommitLineData
2799bba6
BS
1#ifndef __NVKM_LTC_H__
2#define __NVKM_LTC_H__
95484b57 3#include <core/subdev.h>
70bc7182 4#include <core/mm.h>
f38fdb6a 5
2799bba6 6#define NVKM_LTC_MAX_ZBC_CNT 16
95484b57 7
2799bba6 8struct nvkm_ltc {
70bc7182 9 const struct nvkm_ltc_func *func;
c7750cfb 10 struct nvkm_subdev subdev;
95484b57 11
70bc7182
BS
12 u32 ltc_nr;
13 u32 lts_nr;
14
15 u32 num_tags;
16 u32 tag_base;
bd447053 17 struct nvkm_memory *tag_ram;
f38fdb6a
BS
18
19 int zbc_min;
20 int zbc_max;
70bc7182
BS
21 u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
22 u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
95484b57
BS
23};
24
70bc7182
BS
25int nvkm_ltc_tags_alloc(struct nvkm_ltc *, u32 count, struct nvkm_mm_node **);
26void nvkm_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **);
b1e839f3 27void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
70bc7182
BS
28
29int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
30int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
95484b57 31
38a8fc78
AC
32void nvkm_ltc_invalidate(struct nvkm_ltc *);
33void nvkm_ltc_flush(struct nvkm_ltc *);
34
70bc7182
BS
35int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
36int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
a0a49bac 37int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
70bc7182 38int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
db1eb528 39int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
a96def39 40int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
95484b57 41#endif