From be7b4aac612e91e3bc94fde20dd37572721914c6 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Wed, 5 Apr 2023 18:05:23 -0700 Subject: [PATCH] gpu: nvgpu: linux: pci calls vgpu power on for virt dev VF driver shares same poweron function with legacy vgpu. Jira GVSCI-15779 Change-Id: I44381f7ebe1cfd6c72ff886aa9f54d54c189a8b6 Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2884178 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/os/linux/pci.c b/drivers/gpu/nvgpu/os/linux/pci.c index 42ab33f41..171d4b7b8 100644 --- a/drivers/gpu/nvgpu/os/linux/pci.c +++ b/drivers/gpu/nvgpu/os/linux/pci.c @@ -53,6 +53,7 @@ #include "dmabuf_priv.h" #include "vgpu/vf_linux.h" +#include "vgpu/vgpu_common.h" #if defined(CONFIG_NVGPU_HAL_NON_FUSA) && defined(CONFIG_NVGPU_NEXT) #include @@ -467,7 +468,10 @@ static int nvgpu_pci_init_support(struct pci_dev *pdev, bool is_pci_igpu) #ifdef CONFIG_PM static int nvgpu_pci_pm_runtime_resume(struct device *dev) { - return gk20a_pm_finalize_poweron(dev); + if (gk20a_gpu_is_virtual(dev)) + return vgpu_pm_finalize_poweron(dev); + else + return gk20a_pm_finalize_poweron(dev); } static int nvgpu_pci_pm_runtime_suspend(struct device *dev)