mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: t23x: init hal for nvgpu-next
Add hooks for nvgpu-next init hal. JIRA NVGPU-4383 Change-Id: Ia899878743bca35d911c74444749f254ba94bbe0 Signed-off-by: seshendra <sgadagottu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2243694 Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* NVIDIA GPU HAL interface.
|
||||
*
|
||||
* Copyright (c) 2014-2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
@@ -36,6 +36,10 @@
|
||||
#include "hal_tu104.h"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
|
||||
#include "nvgpu_next_gpuid.h"
|
||||
#endif
|
||||
|
||||
#include "hal/mc/mc_gm20b.h"
|
||||
|
||||
int nvgpu_init_hal(struct gk20a *g)
|
||||
@@ -62,6 +66,13 @@ int nvgpu_init_hal(struct gk20a *g)
|
||||
return -ENODEV;
|
||||
}
|
||||
break;
|
||||
#if defined(CONFIG_NVGPU_NEXT)
|
||||
case NVGPU_NEXT_GPUID:
|
||||
if (NVGPU_NEXT_INIT_HAL(g) != 0) {
|
||||
return -ENODEV;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
case NVGPU_GPUID_GV11B:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
|
||||
# Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
@@ -38,6 +38,8 @@ CORE_OUT=$(OUT)/nvgpu_unit_core
|
||||
|
||||
# Nvgpu driver code.
|
||||
NVGPU_SRC=$(TWD)/../drivers/gpu/nvgpu
|
||||
# Nvgpu-next driver code.
|
||||
NVGPU_NEXT_SRC=$(TWD)/../../nvgpu-next/drivers/gpu/nvgpu
|
||||
NVGPU_OUT=$(OUT)/libnvgpu
|
||||
|
||||
# Unit tests themselves.
|
||||
@@ -47,6 +49,8 @@ UNIT_OUT=$(OUT)/units
|
||||
INCLUDES= \
|
||||
-I$(NVGPU_SRC) \
|
||||
-I$(NVGPU_SRC)/include \
|
||||
-I$(NVGPU_NEXT_SRC) \
|
||||
-I$(NVGPU_NEXT_SRC)/include \
|
||||
-I$(TWD)/../include \
|
||||
-I$(TWD)/../include/uapi \
|
||||
-I$(TWD)/include \
|
||||
@@ -133,6 +137,14 @@ $(NVGPU_OUT)/%.o : $(NVGPU_SRC)/%.c $(HEADERS)
|
||||
fi
|
||||
$(CC) --coverage $(CFLAGS) -c -o $@ $<
|
||||
|
||||
# Default build target for all the nvgpu-next driver object files we want to
|
||||
# build in userspace. These too get bundled into libnvgpu-drv.so.
|
||||
$(NVGPU_OUT)/%.o : $(NVGPU_NEXT_SRC)/%.c $(HEADERS) $(HEADERS_NEXT)
|
||||
@if [ ! -d $(dir $@) ] ; then \
|
||||
mkdir -p $(dir $@) ; \
|
||||
fi
|
||||
$(CC) --coverage $(CFLAGS) $(configs) -c -o $@ $<
|
||||
|
||||
# Build target for unit test files. These are not part of the libnvgpu-drv.so.
|
||||
# These comprise the unit test framework.
|
||||
$(CORE_OUT)/%.o : $(CORE_SRC)/%.c $(CORE_HEADERS)
|
||||
|
||||
@@ -21,8 +21,9 @@
|
||||
# DEALINGS IN THE SOFTWARE.
|
||||
|
||||
include $(NVGPU_SRC)/Makefile.sources
|
||||
include $(NVGPU_NEXT_SRC)/Makefile.sources
|
||||
|
||||
OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o)
|
||||
OBJS := $(srcs:%.c=$(NVGPU_OUT)/%.o) $(srcs_next:%.c=$(NVGPU_OUT)/%.o)
|
||||
|
||||
HEADERS := \
|
||||
$(NVGPU_SRC)/include/nvgpu/*.h \
|
||||
|
||||
Reference in New Issue
Block a user