From 193a2ed38ca51d898ac811820ab86237c84e18eb Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Thu, 18 Jan 2018 11:02:08 -0800 Subject: gpu: nvgpu: add sw method for SET_BES_CROP_DEBUG4 Added sw method support for SET_BES_CROP_DEBUG4. In this sw method: CLAMP_FP_BLEND_TO_MAXVAL forces overflow and CLAMP_FP_BLEND_TO_INF blend results to clamp to FP maxval. Added support for this sw method in gp10b/gp106/gv11b and gv100. Bug 2046636 Change-Id: I3a9e97587aca76718f7f504ea3b853f87409092a Signed-off-by: seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/1641529 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/gr_gv11b.c | 3 +++ drivers/gpu/nvgpu/gv11b/gr_gv11b.h | 1 + drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 1 + 3 files changed, 5 insertions(+) (limited to 'drivers/gpu/nvgpu/gv11b') diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c index 3030def8..9c79b29b 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.c @@ -1193,6 +1193,9 @@ int gr_gv11b_handle_sw_method(struct gk20a *g, u32 addr, case NVC397_SET_BES_CROP_DEBUG3: g->ops.gr.set_bes_crop_debug3(g, data); break; + case NVC397_SET_BES_CROP_DEBUG4: + g->ops.gr.set_bes_crop_debug4(g, data); + break; default: goto fail; } diff --git a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h index 022a7698..f8f80df3 100644 --- a/drivers/gpu/nvgpu/gv11b/gr_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/gr_gv11b.h @@ -65,6 +65,7 @@ enum { #define NVC397_SET_TEX_IN_DBG 0x10bc #define NVC397_SET_SKEDCHECK 0x10c0 #define NVC397_SET_BES_CROP_DEBUG3 0x10c4 +#define NVC397_SET_BES_CROP_DEBUG4 0x10b0 #define NVC397_SET_TEX_IN_DBG_TSL1_RVCH_INVALIDATE 0x1 #define NVC397_SET_TEX_IN_DBG_SM_L1TAG_CTRL_CACHE_SURFACE_LD 0x2 diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 482c1eec..93f819e4 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c @@ -367,6 +367,7 @@ static const struct gpu_ops gv11b_ops = { .init_preemption_state = gr_gv11b_init_preemption_state, .update_boosted_ctx = gr_gp10b_update_boosted_ctx, .set_bes_crop_debug3 = gr_gp10b_set_bes_crop_debug3, + .set_bes_crop_debug4 = gr_gp10b_set_bes_crop_debug4, .create_gr_sysfs = gr_gv11b_create_sysfs, .set_ctxsw_preemption_mode = gr_gv11b_set_ctxsw_preemption_mode, .is_etpc_addr = gv11b_gr_pri_is_etpc_addr, -- cgit v1.2.2