summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/ltc_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/ltc_gv11b.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
index df2b0f68..c0e46be3 100644
--- a/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/ltc_gv11b.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GV11B LTC 2 * GV11B LTC
3 * 3 *
4 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -20,7 +20,26 @@
20#include "gv11b/ltc_gv11b.h" 20#include "gv11b/ltc_gv11b.h"
21#include "hw_ltc_gv11b.h" 21#include "hw_ltc_gv11b.h"
22 22
23/*
24 * Sets the ZBC stencil for the passed index.
25 */
26static void gv11b_ltc_set_zbc_stencil_entry(struct gk20a *g,
27 struct zbc_entry *stencil_val,
28 u32 index)
29{
30 u32 real_index = index + GK20A_STARTOF_ZBC_TABLE;
31
32 gk20a_writel(g, ltc_ltcs_ltss_dstg_zbc_index_r(),
33 ltc_ltcs_ltss_dstg_zbc_index_address_f(real_index));
34
35 gk20a_writel(g, ltc_ltcs_ltss_dstg_zbc_stencil_clear_value_r(),
36 stencil_val->depth);
37
38 gk20a_readl(g, ltc_ltcs_ltss_dstg_zbc_index_r());
39}
40
23void gv11b_init_ltc(struct gpu_ops *gops) 41void gv11b_init_ltc(struct gpu_ops *gops)
24{ 42{
25 gp10b_init_ltc(gops); 43 gp10b_init_ltc(gops);
44 gops->ltc.set_zbc_s_entry = gv11b_ltc_set_zbc_stencil_entry;
26} 45}