diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-12-14 17:43:42 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-05 12:13:30 -0500 |
commit | ea5a2147229e32f0524827af82cb7a880aca6296 (patch) | |
tree | 57502c753df7efec4924f9969eb2aebca347c304 /drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |
parent | 5711e2b1f7c3a34444c654e7a3bf0a6f8201ef03 (diff) |
gpu: nvgpu: Implement SET_RD_COALESCE
Implement SW method SET_RD_COALESCE to implement correct handling
of texture read coalescing.
Bug 200223870
Change-Id: Icd6f987b72d78e5add4076fc550e2070eba70628
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1271303
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index fc98b5ca..c74b9fec 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GM20B GPC MMU | 2 | * GM20B GPC MMU |
3 | * | 3 | * |
4 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2011-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, |
@@ -262,6 +262,20 @@ static void gr_gm20b_commit_global_pagepool(struct gk20a *g, | |||
262 | 262 | ||
263 | } | 263 | } |
264 | 264 | ||
265 | void gr_gm20b_set_rd_coalesce(struct gk20a *g, u32 data) | ||
266 | { | ||
267 | u32 val; | ||
268 | |||
269 | gk20a_dbg_fn(""); | ||
270 | |||
271 | val = gk20a_readl(g, gr_gpcs_tpcs_tex_m_dbg2_r()); | ||
272 | val = set_field(val, gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_m(), | ||
273 | gr_gpcs_tpcs_tex_m_dbg2_lg_rd_coalesce_en_f(data)); | ||
274 | gk20a_writel(g, gr_gpcs_tpcs_tex_m_dbg2_r(), val); | ||
275 | |||
276 | gk20a_dbg_fn("done"); | ||
277 | } | ||
278 | |||
265 | static int gr_gm20b_handle_sw_method(struct gk20a *g, u32 addr, | 279 | static int gr_gm20b_handle_sw_method(struct gk20a *g, u32 addr, |
266 | u32 class_num, u32 offset, u32 data) | 280 | u32 class_num, u32 offset, u32 data) |
267 | { | 281 | { |
@@ -272,6 +286,9 @@ static int gr_gm20b_handle_sw_method(struct gk20a *g, u32 addr, | |||
272 | case NVB1C0_SET_SHADER_EXCEPTIONS: | 286 | case NVB1C0_SET_SHADER_EXCEPTIONS: |
273 | gk20a_gr_set_shader_exceptions(g, data); | 287 | gk20a_gr_set_shader_exceptions(g, data); |
274 | break; | 288 | break; |
289 | case NVB1C0_SET_RD_COALESCE: | ||
290 | gr_gm20b_set_rd_coalesce(g, data); | ||
291 | break; | ||
275 | default: | 292 | default: |
276 | goto fail; | 293 | goto fail; |
277 | } | 294 | } |
@@ -288,6 +305,9 @@ static int gr_gm20b_handle_sw_method(struct gk20a *g, u32 addr, | |||
288 | case NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE: | 305 | case NVB197_SET_ALPHA_CIRCULAR_BUFFER_SIZE: |
289 | g->ops.gr.set_alpha_circular_buffer_size(g, data); | 306 | g->ops.gr.set_alpha_circular_buffer_size(g, data); |
290 | break; | 307 | break; |
308 | case NVB197_SET_RD_COALESCE: | ||
309 | gr_gm20b_set_rd_coalesce(g, data); | ||
310 | break; | ||
291 | default: | 311 | default: |
292 | goto fail; | 312 | goto fail; |
293 | } | 313 | } |