2019-06-20 00:13:43 +00:00
|
|
|
/* SPDX-License-Identifier: MIT */
|
2015-01-14 05:06:26 +00:00
|
|
|
#ifndef __NVKM_LTC_H__
|
|
|
|
#define __NVKM_LTC_H__
|
2014-08-09 18:10:28 +00:00
|
|
|
#include <core/subdev.h>
|
2015-08-20 04:54:21 +00:00
|
|
|
#include <core/mm.h>
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
#define NVKM_LTC_MAX_ZBC_CNT 16
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
struct nvkm_ltc {
|
2015-08-20 04:54:21 +00:00
|
|
|
const struct nvkm_ltc_func *func;
|
2015-08-20 04:54:07 +00:00
|
|
|
struct nvkm_subdev subdev;
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-08-20 04:54:21 +00:00
|
|
|
u32 ltc_nr;
|
|
|
|
u32 lts_nr;
|
|
|
|
|
|
|
|
u32 num_tags;
|
|
|
|
u32 tag_base;
|
2017-10-31 17:56:19 +00:00
|
|
|
struct nvkm_memory *tag_ram;
|
2014-08-09 18:10:28 +00:00
|
|
|
|
|
|
|
int zbc_min;
|
|
|
|
int zbc_max;
|
2015-08-20 04:54:21 +00:00
|
|
|
u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
|
|
|
|
u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
|
2018-05-08 10:39:47 +00:00
|
|
|
u32 zbc_stencil[NVKM_LTC_MAX_ZBC_CNT];
|
2014-08-09 18:10:28 +00:00
|
|
|
};
|
|
|
|
|
2017-10-31 17:56:19 +00:00
|
|
|
void nvkm_ltc_tags_clear(struct nvkm_device *, u32 first, u32 count);
|
2015-08-20 04:54:21 +00:00
|
|
|
|
|
|
|
int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
|
|
|
|
int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
|
2018-05-08 10:39:47 +00:00
|
|
|
int nvkm_ltc_zbc_stencil_get(struct nvkm_ltc *, int index, const u32);
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-09-03 08:48:14 +00:00
|
|
|
void nvkm_ltc_invalidate(struct nvkm_ltc *);
|
|
|
|
void nvkm_ltc_flush(struct nvkm_ltc *);
|
|
|
|
|
2015-08-20 04:54:21 +00:00
|
|
|
int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
|
|
|
int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2015-09-03 08:48:15 +00:00
|
|
|
int gk20a_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2015-08-20 04:54:21 +00:00
|
|
|
int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2016-02-10 22:35:32 +00:00
|
|
|
int gm200_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2016-07-09 00:41:01 +00:00
|
|
|
int gp100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2018-05-08 10:39:47 +00:00
|
|
|
int gp102_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
2014-08-09 18:10:28 +00:00
|
|
|
#endif
|