From 10b75f9cdd2184e9728b7d38dd037330d1c20704 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Fri, 17 Jun 2016 14:08:07 +0530 Subject: gpu: nvgpu: update get_netlist_name ops declaration -update get_netlist_name ops declaration to support to load GPU FW based on GPU-ARCH -"GAxxx" string used to get size for "gm204/" or "gm206/" which will added to NETIMAGE path like "gm204/NETC_img.bin" Change-Id: I5bfa13df014533a885c4328d3c767e51c29f9255 Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/1166783 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h') diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h index d413942a..b0e4c4c2 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h @@ -28,6 +28,17 @@ #define GK20A_NETLIST_IMAGE_C "NETC_img.bin" #define GK20A_NETLIST_IMAGE_D "NETD_img.bin" +/* + * Need to support multiple ARCH in same GPU family + * then need to provide path like ARCH/NETIMAGE to + * point to correct netimage within GPU family, + * Example, gm20x can support gm204 or gm206,so path + * for netimage is gm204/NETC_img.bin, and '/' char + * will inserted at null terminator char of "GAxxx" + * to get complete path like gm204/NETC_img.bin + */ +#define GPU_ARCH "GAxxx" + union __max_name { #ifdef GK20A_NETLIST_IMAGE_A char __name_a[sizeof(GK20A_NETLIST_IMAGE_A)]; @@ -43,7 +54,7 @@ union __max_name { #endif }; -#define MAX_NETLIST_NAME sizeof(union __max_name) +#define MAX_NETLIST_NAME (sizeof(GPU_ARCH) + sizeof(union __max_name)) /* index for emulation netlists */ #define NETLIST_FINAL -1 -- cgit v1.2.2