summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorseshendra Gadagottu <sgadagottu@nvidia.com>2018-01-18 14:02:08 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-22 18:29:54 -0500
commit193a2ed38ca51d898ac811820ab86237c84e18eb (patch)
treeda672582c2322fc91c7b5c600deb5a60f3068a8d /drivers/gpu/nvgpu/include
parentf6d898656a6d7c197aa27ee53f5f0151fb6dfcf5 (diff)
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 <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1641529 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h18
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h18
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_gr_gv100.h16
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h16
4 files changed, 66 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h
index 2da3ec41..7630bda2 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp106/hw_gr_gp106.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -3792,6 +3792,22 @@ static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
3792{ 3792{
3793 return 0x4U; 3793 return 0x4U;
3794} 3794}
3795static inline u32 gr_bes_crop_debug4_r(void)
3796{
3797 return 0x0040894cU;
3798}
3799static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
3800{
3801 return 0x1U << 18U;
3802}
3803static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
3804{
3805 return 0x0U;
3806}
3807static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
3808{
3809 return 0x40000U;
3810}
3795static inline u32 gr_bes_crop_settings_r(void) 3811static inline u32 gr_bes_crop_settings_r(void)
3796{ 3812{
3797 return 0x00408958U; 3813 return 0x00408958U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h
index 51809112..dca75004 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gp10b/hw_gr_gp10b.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a 4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"), 5 * copy of this software and associated documentation files (the "Software"),
@@ -3996,6 +3996,22 @@ static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
3996{ 3996{
3997 return 0x4U; 3997 return 0x4U;
3998} 3998}
3999static inline u32 gr_bes_crop_debug4_r(void)
4000{
4001 return 0x0040894cU;
4002}
4003static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
4004{
4005 return 0x1U << 18U;
4006}
4007static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
4008{
4009 return 0x0U;
4010}
4011static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
4012{
4013 return 0x40000U;
4014}
3999static inline u32 gr_bes_crop_settings_r(void) 4015static inline u32 gr_bes_crop_settings_r(void)
4000{ 4016{
4001 return 0x00408958U; 4017 return 0x00408958U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_gr_gv100.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_gr_gv100.h
index e669c0f0..2e28bdb8 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_gr_gv100.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv100/hw_gr_gv100.h
@@ -3732,6 +3732,22 @@ static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
3732{ 3732{
3733 return 0x4U; 3733 return 0x4U;
3734} 3734}
3735static inline u32 gr_bes_crop_debug4_r(void)
3736{
3737 return 0x0040894cU;
3738}
3739static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
3740{
3741 return 0x1U << 18U;
3742}
3743static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
3744{
3745 return 0x0U;
3746}
3747static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
3748{
3749 return 0x40000U;
3750}
3735static inline u32 gr_bes_crop_settings_r(void) 3751static inline u32 gr_bes_crop_settings_r(void)
3736{ 3752{
3737 return 0x00408958U; 3753 return 0x00408958U;
diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
index 2b9bffdd..72cbc7dd 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h
@@ -4416,6 +4416,22 @@ static inline u32 gr_bes_crop_debug3_blendopt_fill_override_enabled_f(void)
4416{ 4416{
4417 return 0x4U; 4417 return 0x4U;
4418} 4418}
4419static inline u32 gr_bes_crop_debug4_r(void)
4420{
4421 return 0x0040894cU;
4422}
4423static inline u32 gr_bes_crop_debug4_clamp_fp_blend_m(void)
4424{
4425 return 0x1U << 18U;
4426}
4427static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_inf_f(void)
4428{
4429 return 0x0U;
4430}
4431static inline u32 gr_bes_crop_debug4_clamp_fp_blend_to_maxval_f(void)
4432{
4433 return 0x40000U;
4434}
4419static inline u32 gr_bes_crop_settings_r(void) 4435static inline u32 gr_bes_crop_settings_r(void)
4420{ 4436{
4421 return 0x00408958U; 4437 return 0x00408958U;