From bc86b17fa2860fa4df204668e423dadb31ef32a5 Mon Sep 17 00:00:00 2001 From: Arvind M Date: Tue, 14 Feb 2023 15:41:21 +0000 Subject: [PATCH] host1x: kmd: enable irq on poweron [1] Since the irq is not enabled during the power-on, the firmware is not communicable state upon module reset. [2] This commit fixes the issue by enabling irq on power-on. Bug 3979666 Bug 3975703 Change-Id: I746a9236b390ab2d429df1f4a3f6243745147b65 Signed-off-by: Arvind M Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2858111 Reviewed-by: svcacv Reviewed-by: svc_kernel_abi Reviewed-by: Amit Sharma (SW-TEGRA) Reviewed-by: Ayush Kumar Reviewed-by: Jonathan Hunter Reviewed-by: Mikko Perttunen GVS: Gerrit_Virtual_Submit Tested-by: Amit Sharma (SW-TEGRA) --- drivers/gpu/host1x-nvhost/nvhost.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/host1x-nvhost/nvhost.c b/drivers/gpu/host1x-nvhost/nvhost.c index 477d3a4f..40469e36 100644 --- a/drivers/gpu/host1x-nvhost/nvhost.c +++ b/drivers/gpu/host1x-nvhost/nvhost.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2022, NVIDIA Corporation. All rights reserved. + * Copyright (c) 2022-2023, NVIDIA Corporation. All rights reserved. */ #include @@ -670,6 +670,9 @@ int nvhost_flcn_finalize_poweron(struct platform_device *pdev) return err; } + if (pdata->flcn_isr) + enable_irq(pdata->irq); + return 0; } EXPORT_SYMBOL(nvhost_flcn_finalize_poweron); @@ -919,9 +922,6 @@ static int nvhost_module_runtime_resume(struct device *dev) /* Load clockgating registers */ nvhost_module_load_regs(pdev, pdata->engine_can_cg); - if (pdata->flcn_isr) - enable_irq(pdata->irq); - if (pdata->finalize_poweron) err = pdata->finalize_poweron(pdev);