mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: plug-in misc-ec interface for av+l
This patch adds misc-ec interface into NvGPU driver to report GPU HW errors to Safety_Services, in AV+L. For this purpose, it introduces a new flag "CONFIG_NVGPU_ENABLE_MISC_EC". JIRA NVGPU-8094 Change-Id: Id8fff69487cad9ed4eb082a7d8615a1e15867ffa Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2678394 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: Dinesh T <dt@nvidia.com> Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
201b5c1c7f
commit
86be5112b2
@@ -98,6 +98,11 @@ ifdef CONFIG_TEGRA_NVMAP_NEXT
|
|||||||
CONFIG_NVGPU_NVMAP_NEXT := y
|
CONFIG_NVGPU_NVMAP_NEXT := y
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
CONFIG_NVGPU_ENABLE_MISC_EC := n
|
||||||
|
ifdef CONFIG_TEGRA_EPL
|
||||||
|
CONFIG_NVGPU_ENABLE_MISC_EC := y
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq ($(findstring 5.10,$(NV_BUILD_KERNEL_OPTIONS)),)
|
ifneq ($(findstring 5.10,$(NV_BUILD_KERNEL_OPTIONS)),)
|
||||||
CONFIG_NVGPU_NVMAP_NEXT := y
|
CONFIG_NVGPU_NVMAP_NEXT := y
|
||||||
endif
|
endif
|
||||||
@@ -273,3 +278,6 @@ endif
|
|||||||
ifeq ($(CONFIG_NVGPU_IVM_BUILD),y)
|
ifeq ($(CONFIG_NVGPU_IVM_BUILD),y)
|
||||||
ccflags-y += -DCONFIG_NVGPU_IVM_BUILD
|
ccflags-y += -DCONFIG_NVGPU_IVM_BUILD
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(CONFIG_NVGPU_ENABLE_MISC_EC),y)
|
||||||
|
ccflags-y += -DCONFIG_NVGPU_ENABLE_MISC_EC
|
||||||
|
endif
|
||||||
|
|||||||
@@ -17,13 +17,33 @@
|
|||||||
#include <nvgpu/cic_mon.h>
|
#include <nvgpu/cic_mon.h>
|
||||||
#include <nvgpu/types.h>
|
#include <nvgpu/types.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_NVGPU_ENABLE_MISC_EC
|
||||||
|
#include <linux/tegra-epl.h>
|
||||||
|
#include "os/linux/os_linux.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
struct gk20a;
|
struct gk20a;
|
||||||
|
|
||||||
int nvgpu_cic_mon_report_err_safety_services(struct gk20a *g,
|
int nvgpu_cic_mon_report_err_safety_services(struct gk20a *g, u32 err_id)
|
||||||
u32 err_id)
|
|
||||||
{
|
{
|
||||||
|
int ret = 0U;
|
||||||
|
|
||||||
|
#ifdef CONFIG_NVGPU_ENABLE_MISC_EC
|
||||||
|
struct device *dev = dev_from_gk20a(g);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ToDo: Add MISC_EC API to report error.
|
* MISC_EC_SW_ERR_CODE_0 register has been allocated for NvGPU
|
||||||
|
* to report GPU HW errors to Safety_Services via MISC_EC interface.
|
||||||
*/
|
*/
|
||||||
return 0;
|
ret = epl_report_misc_ec_error(dev, MISC_EC_SW_ERR_CODE_0, err_id);
|
||||||
|
if (ret != 0) {
|
||||||
|
nvgpu_err(g, "Error reporting to Safety_Services failed");
|
||||||
|
nvgpu_err(g, "ret (%d). err (0x%x)", ret, err_id);
|
||||||
|
} else {
|
||||||
|
nvgpu_err(g, "Reported err (0x%x) to Safety_Services",
|
||||||
|
err_id);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user