mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: vgpu: add gpu next hal & platform
- added compatible string and platform data - added hal init - mark gv11b_vgpu_probe global Jira GVSCI-4645 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Change-Id: If04261bf9421f23df065e26ffe998218a3ba5b73 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2342377 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Sagar Kadamati <skadamati@nvidia.com> Reviewed-by: Lakshmanan M <lm@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
2b48aa5b0c
commit
78c45e889e
@@ -211,6 +211,7 @@ timers:
|
||||
vgpu:
|
||||
sources: [ os/linux/vgpu/fecs_trace_vgpu_linux.c,
|
||||
os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.c,
|
||||
os/linux/vgpu/gv11b/platform_gv11b_vgpu_tegra.h,
|
||||
os/linux/vgpu/platform_vgpu_tegra.c,
|
||||
os/linux/vgpu/platform_vgpu_tegra.h,
|
||||
os/linux/vgpu/sysfs_vgpu.c,
|
||||
|
||||
@@ -58,7 +58,7 @@ nvgpu:
|
||||
hal-vgpu:
|
||||
safe: yes
|
||||
children:
|
||||
!include nvgpu-hal-vgpu.yaml
|
||||
!include nvgpu-hal-vgpu.yaml nvgpu-next-hal-vgpu.yaml
|
||||
|
||||
# A meta-element for the GPU HW. A good example of this is the HW headers.
|
||||
# This is not code we write in nvgpu, but we import it from the GPU HW
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2019-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"),
|
||||
@@ -26,6 +26,10 @@
|
||||
#include <nvgpu/vgpu/vgpu.h>
|
||||
#include <nvgpu/vgpu/os_init_hal_vgpu.h>
|
||||
|
||||
#if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT)
|
||||
#include "nvgpu_next_gpuid.h"
|
||||
#endif
|
||||
|
||||
#include "init_hal_vgpu.h"
|
||||
#include "vgpu_hal_gp10b.h"
|
||||
#include "vgpu_hal_gv11b.h"
|
||||
@@ -44,6 +48,11 @@ int vgpu_init_hal(struct gk20a *g)
|
||||
case NVGPU_GPUID_GV11B:
|
||||
err = vgpu_gv11b_init_hal(g);
|
||||
break;
|
||||
#ifdef CONFIG_NVGPU_NEXT
|
||||
case NVGPU_NEXT_GPUID:
|
||||
err = NVGPU_NEXT_VGPU_INIT_HAL(g);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
nvgpu_err(g, "no support for %x", ver);
|
||||
|
||||
@@ -731,6 +731,10 @@ static struct of_device_id tegra_gk20a_of_match[] = {
|
||||
#if defined(CONFIG_NVGPU_NEXT) && defined(CONFIG_NVGPU_NON_FUSA)
|
||||
{ .compatible = NVGPU_NEXT_COMPATIBLE,
|
||||
.data = &NVGPU_NEXT_PLATFORM},
|
||||
#ifdef CONFIG_NVGPU_GR_VIRTUALIZATION
|
||||
{ .compatible = NVGPU_NEXT_COMPATIBLE_VGPU,
|
||||
.data = &NVGPU_NEXT_PLATFORM_VGPU},
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
{ },
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "os/linux/vgpu/vgpu_linux.h"
|
||||
#include "os/linux/vgpu/platform_vgpu_tegra.h"
|
||||
|
||||
static int gv11b_vgpu_probe(struct device *dev)
|
||||
int gv11b_vgpu_probe(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_GV11B_VGPU_LINUX_H
|
||||
#define PLATFORM_GV11B_VGPU_LINUX_H
|
||||
|
||||
struct device;
|
||||
|
||||
int gv11b_vgpu_probe(struct device *dev);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user