From bc0cf21cfb8bb0a92f2614e6e0a49cb6082e05bf Mon Sep 17 00:00:00 2001 From: Nitin Kumbhar Date: Mon, 12 Nov 2018 14:11:00 +0530 Subject: [PATCH] gpu: nvgpu: optimize dgpu gc off delays Add separate delays for dgpu power off and reduce those to 2ms. JIRA NVGPU-1100 Change-Id: I08b2efb6d13f395e84b5c5de378288883294597f Signed-off-by: Nitin Kumbhar Reviewed-on: https://git-master.nvidia.com/r/1947976 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/pci_power.c | 4 ++-- drivers/gpu/nvgpu/os/linux/platform_gk20a.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/os/linux/pci_power.c b/drivers/gpu/nvgpu/os/linux/pci_power.c index cd352cc1c..a8ebc55d0 100644 --- a/drivers/gpu/nvgpu/os/linux/pci_power.c +++ b/drivers/gpu/nvgpu/os/linux/pci_power.c @@ -258,7 +258,7 @@ static int nvgpu_disable_pci_rail(struct nvgpu_pci_gpios *pgpios) gpio_set_value(pci_vbat_pwr_on_gpio, 0); - mdelay(PCI_VBAR_PWR_ON_DELAY_MS); + mdelay(PCI_VBAR_PWR_OFF_DELAY_MS); return 0; } @@ -285,7 +285,7 @@ static int nvgpu_deassert_pci_pwr_on(struct nvgpu_pci_gpios *pgpios) gpio_set_value(pci_pwr_on, 0); - mdelay(PCI_PWR_ON_DELAY_MS); + mdelay(PCI_PWR_OFF_DELAY_MS); return 0; } diff --git a/drivers/gpu/nvgpu/os/linux/platform_gk20a.h b/drivers/gpu/nvgpu/os/linux/platform_gk20a.h index 3ba1bc847..c6ec007ec 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gk20a.h +++ b/drivers/gpu/nvgpu/os/linux/platform_gk20a.h @@ -51,6 +51,8 @@ struct nvgpu_pci_gpios { /* delays in milliseconds (ms) */ #define PCI_VBAR_PWR_ON_DELAY_MS 15 #define PCI_PWR_ON_DELAY_MS 150 +#define PCI_VBAR_PWR_OFF_DELAY_MS 2 +#define PCI_PWR_OFF_DELAY_MS 2 struct gk20a_platform { /* Populated by the gk20a driver before probing the platform. */