From 2c5337a24f7f2d02989dfb733c55d6d8c7e90493 Mon Sep 17 00:00:00 2001 From: Joshua Bakita Date: Sun, 29 Oct 2023 13:07:40 -0400 Subject: Update includes to L4T r32.7.4 and drop nvgpu/gk20a.h dependency Also add instructions for updating `include/`. These files are now only needed to build on Linux 4.9-based Tegra platforms. --- include/os/linux/module.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'include/os/linux/module.c') diff --git a/include/os/linux/module.c b/include/os/linux/module.c index 807df2c..fdbab46 100644 --- a/include/os/linux/module.c +++ b/include/os/linux/module.c @@ -1,7 +1,7 @@ /* * GK20A Graphics * - * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2011-2021, 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, @@ -49,6 +49,7 @@ #include #include #include +#include #include "platform_gk20a.h" #include "sysfs.h" @@ -355,6 +356,10 @@ int gk20a_pm_finalize_poweron(struct device *dev) gk20a_init_cde_support(l); #endif +#ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING + nvgpu_enable_ecc_reporting(g); +#endif + err = gk20a_sched_ctrl_init(g); if (err) { nvgpu_err(g, "failed to init sched control"); @@ -364,9 +369,14 @@ int gk20a_pm_finalize_poweron(struct device *dev) g->sw_ready = true; done: - if (err) + if (err) { g->power_on = false; +#ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING + nvgpu_disable_ecc_reporting(g); +#endif + } + nvgpu_mutex_release(&g->power_lock); return err; } @@ -433,6 +443,10 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) /* Stop CPU from accessing the GPU registers. */ gk20a_lockout_registers(g); +#ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING + nvgpu_disable_ecc_reporting(g); +#endif + nvgpu_hide_usermode_for_poweroff(g); nvgpu_mutex_release(&g->power_lock); return 0; @@ -1382,6 +1396,10 @@ static int gk20a_probe(struct platform_device *dev) goto return_err; } +#ifdef CONFIG_NVGPU_SUPPORT_LINUX_ECC_ERROR_REPORTING + nvgpu_init_ecc_reporting(gk20a); +#endif + gk20a->nvgpu_reboot_nb.notifier_call = nvgpu_kernel_shutdown_notification; err = register_reboot_notifier(&gk20a->nvgpu_reboot_nb); -- cgit v1.2.2