2014-08-09 18:10:28 +00:00
|
|
|
#ifndef __NVKM_LTC_PRIV_H__
|
|
|
|
#define __NVKM_LTC_PRIV_H__
|
|
|
|
#include <subdev/ltc.h>
|
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
#include <core/mm.h>
|
|
|
|
struct nvkm_fb;
|
2014-08-12 00:22:31 +00:00
|
|
|
|
2014-08-09 18:10:28 +00:00
|
|
|
struct nvkm_ltc_priv {
|
2015-01-14 05:06:26 +00:00
|
|
|
struct nvkm_ltc base;
|
2014-08-09 18:10:28 +00:00
|
|
|
u32 ltc_nr;
|
|
|
|
u32 lts_nr;
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2014-08-09 18:10:28 +00:00
|
|
|
u32 num_tags;
|
|
|
|
u32 tag_base;
|
2015-01-14 05:06:26 +00:00
|
|
|
struct nvkm_mm tags;
|
|
|
|
struct nvkm_mm_node *tag_ram;
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
u32 zbc_color[NVKM_LTC_MAX_ZBC_CNT][4];
|
|
|
|
u32 zbc_depth[NVKM_LTC_MAX_ZBC_CNT];
|
2014-08-09 18:10:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#define nvkm_ltc_create(p,e,o,d) \
|
|
|
|
nvkm_ltc_create_((p), (e), (o), sizeof(**d), (void **)d)
|
|
|
|
#define nvkm_ltc_destroy(p) ({ \
|
|
|
|
struct nvkm_ltc_priv *_priv = (p); \
|
|
|
|
_nvkm_ltc_dtor(nv_object(_priv)); \
|
|
|
|
})
|
|
|
|
#define nvkm_ltc_init(p) ({ \
|
|
|
|
struct nvkm_ltc_priv *_priv = (p); \
|
|
|
|
_nvkm_ltc_init(nv_object(_priv)); \
|
|
|
|
})
|
|
|
|
#define nvkm_ltc_fini(p,s) ({ \
|
|
|
|
struct nvkm_ltc_priv *_priv = (p); \
|
|
|
|
_nvkm_ltc_fini(nv_object(_priv), (s)); \
|
|
|
|
})
|
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
int nvkm_ltc_create_(struct nvkm_object *, struct nvkm_object *,
|
|
|
|
struct nvkm_oclass *, int, void **);
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
#define _nvkm_ltc_dtor _nvkm_subdev_dtor
|
|
|
|
int _nvkm_ltc_init(struct nvkm_object *);
|
|
|
|
#define _nvkm_ltc_fini _nvkm_subdev_fini
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
int gf100_ltc_ctor(struct nvkm_object *, struct nvkm_object *,
|
|
|
|
struct nvkm_oclass *, void *, u32,
|
|
|
|
struct nvkm_object **);
|
|
|
|
void gf100_ltc_dtor(struct nvkm_object *);
|
2015-08-20 04:54:14 +00:00
|
|
|
int gf100_ltc_init_tag_ram(struct nvkm_ltc_priv *);
|
2015-01-14 05:06:26 +00:00
|
|
|
int gf100_ltc_tags_alloc(struct nvkm_ltc *, u32, struct nvkm_mm_node **);
|
|
|
|
void gf100_ltc_tags_free(struct nvkm_ltc *, struct nvkm_mm_node **);
|
2014-08-09 18:10:28 +00:00
|
|
|
|
|
|
|
struct nvkm_ltc_impl {
|
2015-01-14 05:06:26 +00:00
|
|
|
struct nvkm_oclass base;
|
|
|
|
void (*intr)(struct nvkm_subdev *);
|
2014-08-09 18:10:28 +00:00
|
|
|
|
2014-08-09 18:10:28 +00:00
|
|
|
void (*cbc_clear)(struct nvkm_ltc_priv *, u32 start, u32 limit);
|
|
|
|
void (*cbc_wait)(struct nvkm_ltc_priv *);
|
2014-08-09 18:10:28 +00:00
|
|
|
|
|
|
|
int zbc;
|
|
|
|
void (*zbc_clear_color)(struct nvkm_ltc_priv *, int, const u32[4]);
|
|
|
|
void (*zbc_clear_depth)(struct nvkm_ltc_priv *, int, const u32);
|
2014-08-09 18:10:28 +00:00
|
|
|
};
|
|
|
|
|
2015-01-14 05:06:26 +00:00
|
|
|
void gf100_ltc_intr(struct nvkm_subdev *);
|
2014-08-09 18:10:28 +00:00
|
|
|
void gf100_ltc_cbc_clear(struct nvkm_ltc_priv *, u32, u32);
|
|
|
|
void gf100_ltc_cbc_wait(struct nvkm_ltc_priv *);
|
2014-08-09 18:10:28 +00:00
|
|
|
void gf100_ltc_zbc_clear_color(struct nvkm_ltc_priv *, int, const u32[4]);
|
|
|
|
void gf100_ltc_zbc_clear_depth(struct nvkm_ltc_priv *, int, const u32);
|
2014-08-09 18:10:28 +00:00
|
|
|
#endif
|