summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2014-01-31 05:57:48 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:09:33 -0400
commita4d9f96efae76b32ed054b76c12520be2bbcad26 (patch)
tree1f4fb929210c952d96c8335039c607ae89ab1312 /drivers
parentc44f2084eb1a6bb722bc1c83010caf8e0a0744e8 (diff)
video: tegra: host: gm20b: Implement gr ops
Implement gm20b specific gr ops. Bug 1387211 Change-Id: I4523311f1c155ba2d3403dcf222769f6817b2450 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/362415 Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gk20a/hal.c4
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_common.c5
4 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 5eab4ba0..67f6ad8a 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -872,6 +872,9 @@ static int gk20a_pm_finalize_poweron(struct device *dev)
872 goto done; 872 goto done;
873 } 873 }
874 874
875 if (g->ops.ltc.init_fs_state)
876 g->ops.ltc.init_fs_state(g);
877
875 err = gk20a_init_mm_support(g); 878 err = gk20a_init_mm_support(g);
876 if (err) { 879 if (err) {
877 gk20a_err(dev, "failed to init gk20a mm"); 880 gk20a_err(dev, "failed to init gk20a mm");
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 63dfc12d..5eaa4d64 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -4211,6 +4211,9 @@ static int gk20a_init_gr_setup_hw(struct gk20a *g)
4211 4211
4212 gk20a_dbg_fn(""); 4212 gk20a_dbg_fn("");
4213 4213
4214 if (g->ops.gr.init_gpc_mmu)
4215 g->ops.gr.init_gpc_mmu(g);
4216
4214 /* slcg prod values */ 4217 /* slcg prod values */
4215 g->ops.clock_gating.slcg_gr_load_gating_prod(g, g->slcg_enabled); 4218 g->ops.clock_gating.slcg_gr_load_gating_prod(g, g->slcg_enabled);
4216 g->ops.clock_gating.slcg_perf_load_gating_prod(g, g->slcg_enabled); 4219 g->ops.clock_gating.slcg_perf_load_gating_prod(g, g->slcg_enabled);
diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c
index dea740c2..1aae0304 100644
--- a/drivers/gpu/nvgpu/gk20a/hal.c
+++ b/drivers/gpu/nvgpu/gk20a/hal.c
@@ -15,6 +15,7 @@
15 15
16#include "gk20a.h" 16#include "gk20a.h"
17#include "hal_gk20a.h" 17#include "hal_gk20a.h"
18#include "gm20b/hal_gm20b.h"
18 19
19int gpu_init_hal(struct gk20a *g) 20int gpu_init_hal(struct gk20a *g)
20{ 21{
@@ -24,6 +25,9 @@ int gpu_init_hal(struct gk20a *g)
24 gk20a_dbg_info("gk20a detected"); 25 gk20a_dbg_info("gk20a detected");
25 gk20a_init_hal(&g->ops); 26 gk20a_init_hal(&g->ops);
26 break; 27 break;
28 case GK20A_GPUID_GM20B:
29 gm20b_init_hal(&g->ops);
30 break;
27 default: 31 default:
28 gk20a_err(&g->dev->dev, "no support for %x", ver); 32 gk20a_err(&g->dev->dev, "no support for %x", ver);
29 return -ENODEV; 33 return -ENODEV;
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_common.c b/drivers/gpu/nvgpu/gk20a/ltc_common.c
index cd6faacf..463c5cf8 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_common.c
+++ b/drivers/gpu/nvgpu/gk20a/ltc_common.c
@@ -66,6 +66,11 @@ static int gk20a_determine_L2_size_bytes(struct gk20a *g)
66 bytes_per_line = 128; 66 bytes_per_line = 128;
67 break; 67 break;
68 68
69 case GK20A_GPUID_GM20B:
70 lts_per_ltc = 2;
71 bytes_per_line = 128;
72 break;
73
69 default: 74 default:
70 dev_err(dev_from_gk20a(g), "Unknown GPU id 0x%02x\n", 75 dev_err(dev_from_gk20a(g), "Unknown GPU id 0x%02x\n",
71 (unsigned)gpuid); 76 (unsigned)gpuid);