drm/nouveau/ltc: add hooks for invalidate and flush
These are useful for systems without a coherent CPU/GPU bus. For such systems we may need to maintain the L2 ourselves. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
542f60dc84
commit
38a8fc78d0
3 changed files with 20 additions and 0 deletions
|
@ -30,6 +30,9 @@ void nvkm_ltc_tags_clear(struct nvkm_ltc *, u32 first, u32 count);
|
||||||
int nvkm_ltc_zbc_color_get(struct nvkm_ltc *, int index, const u32[4]);
|
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);
|
int nvkm_ltc_zbc_depth_get(struct nvkm_ltc *, int index, const u32);
|
||||||
|
|
||||||
|
void nvkm_ltc_invalidate(struct nvkm_ltc *);
|
||||||
|
void nvkm_ltc_flush(struct nvkm_ltc *);
|
||||||
|
|
||||||
int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
int gf100_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
||||||
int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
int gk104_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
||||||
int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
int gm107_ltc_new(struct nvkm_device *, int, struct nvkm_ltc **);
|
||||||
|
|
|
@ -67,6 +67,20 @@ nvkm_ltc_zbc_depth_get(struct nvkm_ltc *ltc, int index, const u32 depth)
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nvkm_ltc_invalidate(struct nvkm_ltc *ltc)
|
||||||
|
{
|
||||||
|
if (ltc->func->invalidate)
|
||||||
|
ltc->func->invalidate(ltc);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nvkm_ltc_flush(struct nvkm_ltc *ltc)
|
||||||
|
{
|
||||||
|
if (ltc->func->flush)
|
||||||
|
ltc->func->flush(ltc);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nvkm_ltc_intr(struct nvkm_subdev *subdev)
|
nvkm_ltc_intr(struct nvkm_subdev *subdev)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,6 +17,9 @@ struct nvkm_ltc_func {
|
||||||
int zbc;
|
int zbc;
|
||||||
void (*zbc_clear_color)(struct nvkm_ltc *, int, const u32[4]);
|
void (*zbc_clear_color)(struct nvkm_ltc *, int, const u32[4]);
|
||||||
void (*zbc_clear_depth)(struct nvkm_ltc *, int, const u32);
|
void (*zbc_clear_depth)(struct nvkm_ltc *, int, const u32);
|
||||||
|
|
||||||
|
void (*invalidate)(struct nvkm_ltc *);
|
||||||
|
void (*flush)(struct nvkm_ltc *);
|
||||||
};
|
};
|
||||||
|
|
||||||
int gf100_ltc_oneinit(struct nvkm_ltc *);
|
int gf100_ltc_oneinit(struct nvkm_ltc *);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue