mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
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 <mkumbar@nvidia.com> Reviewed-on: http://git-master/r/1166783 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Terje Bergstrom
parent
601a5f8ed2
commit
10b75f9cdd
@@ -449,7 +449,7 @@ struct gpu_ops {
|
|||||||
u8 value);
|
u8 value);
|
||||||
} pmu_ver;
|
} pmu_ver;
|
||||||
struct {
|
struct {
|
||||||
int (*get_netlist_name)(int index, char *name);
|
int (*get_netlist_name)(struct gk20a *g, int index, char *name);
|
||||||
bool (*is_fw_defined)(void);
|
bool (*is_fw_defined)(void);
|
||||||
bool use_dma_for_fw_bootstrap;
|
bool use_dma_for_fw_bootstrap;
|
||||||
} gr_ctx;
|
} gr_ctx;
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ static int gr_gk20a_alloc_load_netlist_aiv(u32 *src, u32 len,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int gr_gk20a_get_netlist_name(int index, char *name)
|
static int gr_gk20a_get_netlist_name(struct gk20a *g, int index, char *name)
|
||||||
{
|
{
|
||||||
switch (index) {
|
switch (index) {
|
||||||
#ifdef GK20A_NETLIST_IMAGE_FW_NAME
|
#ifdef GK20A_NETLIST_IMAGE_FW_NAME
|
||||||
@@ -130,7 +130,7 @@ static int gr_gk20a_init_ctx_vars_fw(struct gk20a *g, struct gr_gk20a *gr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (; net < max; net++) {
|
for (; net < max; net++) {
|
||||||
if (g->ops.gr_ctx.get_netlist_name(net, name) != 0) {
|
if (g->ops.gr_ctx.get_netlist_name(g, net, name) != 0) {
|
||||||
gk20a_warn(d, "invalid netlist index %d", net);
|
gk20a_warn(d, "invalid netlist index %d", net);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,17 @@
|
|||||||
#define GK20A_NETLIST_IMAGE_C "NETC_img.bin"
|
#define GK20A_NETLIST_IMAGE_C "NETC_img.bin"
|
||||||
#define GK20A_NETLIST_IMAGE_D "NETD_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 {
|
union __max_name {
|
||||||
#ifdef GK20A_NETLIST_IMAGE_A
|
#ifdef GK20A_NETLIST_IMAGE_A
|
||||||
char __name_a[sizeof(GK20A_NETLIST_IMAGE_A)];
|
char __name_a[sizeof(GK20A_NETLIST_IMAGE_A)];
|
||||||
@@ -43,7 +54,7 @@ union __max_name {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAX_NETLIST_NAME sizeof(union __max_name)
|
#define MAX_NETLIST_NAME (sizeof(GPU_ARCH) + sizeof(union __max_name))
|
||||||
|
|
||||||
/* index for emulation netlists */
|
/* index for emulation netlists */
|
||||||
#define NETLIST_FINAL -1
|
#define NETLIST_FINAL -1
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "gk20a/gk20a.h"
|
#include "gk20a/gk20a.h"
|
||||||
#include "gr_ctx_gm20b.h"
|
#include "gr_ctx_gm20b.h"
|
||||||
|
|
||||||
static int gr_gm20b_get_netlist_name(int index, char *name)
|
static int gr_gm20b_get_netlist_name(struct gk20a *g, int index, char *name)
|
||||||
{
|
{
|
||||||
switch (index) {
|
switch (index) {
|
||||||
#ifdef GM20B_NETLIST_IMAGE_FW_NAME
|
#ifdef GM20B_NETLIST_IMAGE_FW_NAME
|
||||||
|
|||||||
Reference in New Issue
Block a user