mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
gpu: nvgpu: gp10b: Implement SetCoalesceBufferSize
Implement method for setting the coalesce buffer size at runtime. Bug 1681992 Change-Id: Ice6c00a27f642c2d68d6cd0e30c12df2e48f5374 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/802366 (cherry picked from commit bd763bc8a16b80ccc8f79b2229eccf2fe2417611) Reviewed-on: http://git-master/r/808239 GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Deepak Nibade
parent
c9da53da4e
commit
d1331bd07d
@@ -290,6 +290,20 @@ static void gr_gp10b_set_go_idle_timeout(struct gk20a *g, u32 data)
|
||||
gk20a_writel(g, gr_fe_go_idle_timeout_r(), data);
|
||||
}
|
||||
|
||||
static void gr_gp10b_set_coalesce_buffer_size(struct gk20a *g, u32 data)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
val = gk20a_readl(g, gr_gpcs_tc_debug0_r());
|
||||
val = set_field(val, gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(),
|
||||
gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(data));
|
||||
gk20a_writel(g, gr_gpcs_tc_debug0_r(), val);
|
||||
|
||||
gk20a_dbg_fn("done");
|
||||
}
|
||||
|
||||
static int gr_gp10b_handle_sw_method(struct gk20a *g, u32 addr,
|
||||
u32 class_num, u32 offset, u32 data)
|
||||
{
|
||||
@@ -319,6 +333,9 @@ static int gr_gp10b_handle_sw_method(struct gk20a *g, u32 addr,
|
||||
case NVC097_SET_GO_IDLE_TIMEOUT:
|
||||
gr_gp10b_set_go_idle_timeout(g, data);
|
||||
break;
|
||||
case NVC097_SET_COALESCE_BUFFER_SIZE:
|
||||
gr_gp10b_set_coalesce_buffer_size(g, data);
|
||||
break;
|
||||
default:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ enum {
|
||||
|
||||
#define NVC097_SET_GO_IDLE_TIMEOUT 0x022c
|
||||
#define NVC097_SET_ALPHA_CIRCULAR_BUFFER_SIZE 0x02dc
|
||||
#define NVC097_SET_COALESCE_BUFFER_SIZE 0x1028
|
||||
#define NVC097_SET_CIRCULAR_BUFFER_SIZE 0x1280
|
||||
#define NVC097_SET_SHADER_EXCEPTIONS 0x1528
|
||||
#define NVC0C0_SET_SHADER_EXCEPTIONS 0x1528
|
||||
|
||||
@@ -3786,4 +3786,16 @@ static inline u32 gr_gpcs_tpcs_sm_disp_ctrl_re_suppress_disable_f(void)
|
||||
{
|
||||
return 0x1000;
|
||||
}
|
||||
static inline u32 gr_gpcs_tc_debug0_r(void)
|
||||
{
|
||||
return 0x00418708;
|
||||
}
|
||||
static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_f(u32 v)
|
||||
{
|
||||
return (v & 0xff) << 0;
|
||||
}
|
||||
static inline u32 gr_gpcs_tc_debug0_limit_coalesce_buffer_size_m(void)
|
||||
{
|
||||
return 0xff << 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user