diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/hal.c | 2 |
3 files changed, 18 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 703a7c0c..e4bfce7f 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -74,18 +74,18 @@ void __gk20a_warn_on_no_regs(void) | |||
74 | 74 | ||
75 | static int gk20a_detect_chip(struct gk20a *g) | 75 | static int gk20a_detect_chip(struct gk20a *g) |
76 | { | 76 | { |
77 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; | 77 | struct nvgpu_gpu_params *p = &g->params; |
78 | u32 val; | 78 | u32 val; |
79 | 79 | ||
80 | if (gpu->arch) | 80 | if (p->gpu_arch) |
81 | return 0; | 81 | return 0; |
82 | 82 | ||
83 | val = gk20a_mc_boot_0(g, &gpu->arch, &gpu->impl, &gpu->rev); | 83 | val = gk20a_mc_boot_0(g, &p->gpu_arch, &p->gpu_impl, &p->gpu_rev); |
84 | 84 | ||
85 | gk20a_dbg_info("arch: %x, impl: %x, rev: %x\n", | 85 | gk20a_dbg_info("arch: %x, impl: %x, rev: %x\n", |
86 | g->gpu_characteristics.arch, | 86 | g->params.gpu_arch, |
87 | g->gpu_characteristics.impl, | 87 | g->params.gpu_impl, |
88 | g->gpu_characteristics.rev); | 88 | g->params.gpu_rev); |
89 | 89 | ||
90 | return gpu_init_hal(g); | 90 | return gpu_init_hal(g); |
91 | } | 91 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index dca27887..550e8a0c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -1060,6 +1060,15 @@ struct nvgpu_bios { | |||
1060 | u32 expansion_rom_offset; | 1060 | u32 expansion_rom_offset; |
1061 | }; | 1061 | }; |
1062 | 1062 | ||
1063 | struct nvgpu_gpu_params { | ||
1064 | /* GPU architecture ID */ | ||
1065 | u32 gpu_arch; | ||
1066 | /* GPU implementation ID */ | ||
1067 | u32 gpu_impl; | ||
1068 | /* GPU revision ID */ | ||
1069 | u32 gpu_rev; | ||
1070 | }; | ||
1071 | |||
1063 | struct gk20a { | 1072 | struct gk20a { |
1064 | struct nvgpu_nvhost_dev *nvhost_dev; | 1073 | struct nvgpu_nvhost_dev *nvhost_dev; |
1065 | 1074 | ||
@@ -1081,6 +1090,8 @@ struct gk20a { | |||
1081 | u32 log_mask; | 1090 | u32 log_mask; |
1082 | u32 log_trace; | 1091 | u32 log_trace; |
1083 | 1092 | ||
1093 | struct nvgpu_gpu_params params; | ||
1094 | |||
1084 | /* | 1095 | /* |
1085 | * Guards access to hardware when usual gk20a_{busy,idle} are skipped | 1096 | * Guards access to hardware when usual gk20a_{busy,idle} are skipped |
1086 | * for submits and held for channel lifetime but dropped for an ongoing | 1097 | * for submits and held for channel lifetime but dropped for an ongoing |
diff --git a/drivers/gpu/nvgpu/gk20a/hal.c b/drivers/gpu/nvgpu/gk20a/hal.c index 3535fedd..13e6f374 100644 --- a/drivers/gpu/nvgpu/gk20a/hal.c +++ b/drivers/gpu/nvgpu/gk20a/hal.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | int gpu_init_hal(struct gk20a *g) | 37 | int gpu_init_hal(struct gk20a *g) |
38 | { | 38 | { |
39 | u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; | 39 | u32 ver = g->params.gpu_arch + g->params.gpu_impl; |
40 | switch (ver) { | 40 | switch (ver) { |
41 | case GK20A_GPUID_GM20B: | 41 | case GK20A_GPUID_GM20B: |
42 | case GK20A_GPUID_GM20B_B: | 42 | case GK20A_GPUID_GM20B_B: |