diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 22 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_gv11b.h | 4 |
2 files changed, 26 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 3ae09058..52e442f3 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c | |||
@@ -1202,6 +1202,25 @@ static void gv11b_gr_set_shader_exceptions(struct gk20a *g, u32 data) | |||
1202 | } | 1202 | } |
1203 | } | 1203 | } |
1204 | 1204 | ||
1205 | static void gr_gv11b_set_shader_cut_collector(struct gk20a *g, u32 data) | ||
1206 | { | ||
1207 | u32 val; | ||
1208 | |||
1209 | nvgpu_log_fn(g, "gr_gv11b_set_shader_cut_collector"); | ||
1210 | |||
1211 | val = gk20a_readl(g, gr_gpcs_tpcs_sm_l1tag_ctrl_r()); | ||
1212 | if (data & NVC397_SET_SHADER_CUT_COLLECTOR_STATE_ENABLE) | ||
1213 | val = set_field(val, | ||
1214 | gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_m(), | ||
1215 | gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_enable_f()); | ||
1216 | else | ||
1217 | val = set_field(val, | ||
1218 | gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_m(), | ||
1219 | gr_gpcs_tpcs_sm_l1tag_ctrl_always_cut_collector_disable_f()); | ||
1220 | gk20a_writel(g, gr_gpcs_tpcs_sm_l1tag_ctrl_r(), val); | ||
1221 | } | ||
1222 | |||
1223 | |||
1205 | int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, | 1224 | int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, |
1206 | u32 class_num, u32 offset, u32 data) | 1225 | u32 class_num, u32 offset, u32 data) |
1207 | { | 1226 | { |
@@ -1249,6 +1268,9 @@ int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, | |||
1249 | case NVC397_SET_BES_CROP_DEBUG4: | 1268 | case NVC397_SET_BES_CROP_DEBUG4: |
1250 | g->ops.gr.set_bes_crop_debug4(g, data); | 1269 | g->ops.gr.set_bes_crop_debug4(g, data); |
1251 | break; | 1270 | break; |
1271 | case NVC397_SET_SHADER_CUT_COLLECTOR: | ||
1272 | gr_gv11b_set_shader_cut_collector(g, data); | ||
1273 | break; | ||
1252 | default: | 1274 | default: |
1253 | goto fail; | 1275 | goto fail; |
1254 | } | 1276 | } |
diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h index 398731a4..dac82677 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h | |||
@@ -63,6 +63,7 @@ enum { | |||
63 | #define NVC397_SET_SKEDCHECK 0x10c0 | 63 | #define NVC397_SET_SKEDCHECK 0x10c0 |
64 | #define NVC397_SET_BES_CROP_DEBUG3 0x10c4 | 64 | #define NVC397_SET_BES_CROP_DEBUG3 0x10c4 |
65 | #define NVC397_SET_BES_CROP_DEBUG4 0x10b0 | 65 | #define NVC397_SET_BES_CROP_DEBUG4 0x10b0 |
66 | #define NVC397_SET_SHADER_CUT_COLLECTOR 0x10c8 | ||
66 | 67 | ||
67 | #define NVC397_SET_TEX_IN_DBG_TSL1_RVCH_INVALIDATE 0x1 | 68 | #define NVC397_SET_TEX_IN_DBG_TSL1_RVCH_INVALIDATE 0x1 |
68 | #define NVC397_SET_TEX_IN_DBG_SM_L1TAG_CTRL_CACHE_SURFACE_LD 0x2 | 69 | #define NVC397_SET_TEX_IN_DBG_SM_L1TAG_CTRL_CACHE_SURFACE_LD 0x2 |
@@ -73,6 +74,9 @@ enum { | |||
73 | #define NVC397_SET_SKEDCHECK_18_DISABLE 0x1 | 74 | #define NVC397_SET_SKEDCHECK_18_DISABLE 0x1 |
74 | #define NVC397_SET_SKEDCHECK_18_ENABLE 0x2 | 75 | #define NVC397_SET_SKEDCHECK_18_ENABLE 0x2 |
75 | 76 | ||
77 | #define NVC397_SET_SHADER_CUT_COLLECTOR_STATE_DISABLE 0x0 | ||
78 | #define NVC397_SET_SHADER_CUT_COLLECTOR_STATE_ENABLE 0x1 | ||
79 | |||
76 | #define NVC3C0_SET_SKEDCHECK 0x23c | 80 | #define NVC3C0_SET_SKEDCHECK 0x23c |
77 | 81 | ||
78 | #define NVA297_SET_SHADER_EXCEPTIONS_ENABLE_FALSE 0 | 82 | #define NVA297_SET_SHADER_EXCEPTIONS_ENABLE_FALSE 0 |