From d4eb7f691ef14263377c0f33777b104e2b1a0c53 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Fri, 17 Jun 2016 14:09:34 +0530 Subject: gpu: nvgpu: select FW based on ARCH JIRA DNVGPU-34 Change-Id: Iea1964c7d12536591659188c8e969fc7fb632d12 Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/1166785 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/gr_ctx_gp106.c') 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 @@ #include "gk20a/gk20a.h" #include "gr_ctx_gp106.h" +#include "nvgpu_gpuid_t18x.h" -static int gr_gp106_get_netlist_name(int index, char *name) +static int gr_gp106_get_netlist_name(struct gk20a *g, int index, char *name) { - sprintf(name, GP106_NETLIST_IMAGE_FW_NAME); + u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; + + switch (ver) { + case NVGPU_GPUID_GP104: + sprintf(name, "%s/%s", "gp104", + GP104_NETLIST_IMAGE_FW_NAME); + break; + case NVGPU_GPUID_GP106: + sprintf(name, "%s/%s", "gp106", + GP106_NETLIST_IMAGE_FW_NAME); + break; + default: + gk20a_err(g->dev, "no support for GPUID %x", ver); + } + return 0; } -- cgit v1.2.2