diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2016-06-17 04:39:34 -0400 |
---|---|---|
committer | Deepak Nibade <dnibade@nvidia.com> | 2016-12-27 04:56:17 -0500 |
commit | d4eb7f691ef14263377c0f33777b104e2b1a0c53 (patch) | |
tree | aa6f0dbbe9cfea722f62bce036130ff999d2c108 /drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c | |
parent | 454cb1631be1a09b25c45a18a97fdaae2f5cdf76 (diff) |
gpu: nvgpu: select FW based on ARCH
JIRA DNVGPU-34
Change-Id: Iea1964c7d12536591659188c8e969fc7fb632d12
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/1166785
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c b/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c index 34e1f859..1f47cc5a 100644 --- a/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c +++ b/drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c | |||
@@ -15,10 +15,25 @@ | |||
15 | 15 | ||
16 | #include "gk20a/gk20a.h" | 16 | #include "gk20a/gk20a.h" |
17 | #include "gr_ctx_gp106.h" | 17 | #include "gr_ctx_gp106.h" |
18 | #include "nvgpu_gpuid_t18x.h" | ||
18 | 19 | ||
19 | static int gr_gp106_get_netlist_name(int index, char *name) | 20 | static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name) |
20 | { | 21 | { |
21 | sprintf(name, GP106_NETLIST_IMAGE_FW_NAME); | 22 | u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; |
23 | |||
24 | switch (ver) { | ||
25 | case NVGPU_GPUID_GP104: | ||
26 | sprintf(name, "%s/%s", "gp104", | ||
27 | GP104_NETLIST_IMAGE_FW_NAME); | ||
28 | break; | ||
29 | case NVGPU_GPUID_GP106: | ||
30 | sprintf(name, "%s/%s", "gp106", | ||
31 | GP106_NETLIST_IMAGE_FW_NAME); | ||
32 | break; | ||
33 | default: | ||
34 | gk20a_err(g->dev, "no support for GPUID %x", ver); | ||
35 | } | ||
36 | |||
22 | return 0; | 37 | return 0; |
23 | } | 38 | } |
24 | 39 | ||