diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/pci.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 069dfc95..44786e4b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -822,7 +822,8 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
822 | * serviced. | 822 | * serviced. |
823 | */ | 823 | */ |
824 | disable_irq(g->irq_stall); | 824 | disable_irq(g->irq_stall); |
825 | disable_irq(g->irq_nonstall); | 825 | if (g->irq_stall != g->irq_nonstall) |
826 | disable_irq(g->irq_nonstall); | ||
826 | 827 | ||
827 | ret |= gk20a_gr_suspend(g); | 828 | ret |= gk20a_gr_suspend(g); |
828 | ret |= gk20a_mm_suspend(g); | 829 | ret |= gk20a_mm_suspend(g); |
@@ -907,6 +908,15 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
907 | if (err) | 908 | if (err) |
908 | goto done; | 909 | goto done; |
909 | 910 | ||
911 | /* | ||
912 | * Before probing the GPU make sure the GPU's state is cleared. This is | ||
913 | * relevant for rebind operations. | ||
914 | */ | ||
915 | if (g->ops.xve.reset_gpu && !g->gpu_reset_done) { | ||
916 | g->ops.xve.reset_gpu(g); | ||
917 | g->gpu_reset_done = true; | ||
918 | } | ||
919 | |||
910 | if (g->ops.bios.init) | 920 | if (g->ops.bios.init) |
911 | err = g->ops.bios.init(g); | 921 | err = g->ops.bios.init(g); |
912 | if (err) | 922 | if (err) |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 30a3252a..ff354bc8 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -832,6 +832,7 @@ struct gk20a { | |||
832 | void __iomem *bar1; | 832 | void __iomem *bar1; |
833 | void __iomem *bar1_saved; | 833 | void __iomem *bar1_saved; |
834 | 834 | ||
835 | bool gpu_reset_done; | ||
835 | bool power_on; | 836 | bool power_on; |
836 | bool suspended; | 837 | bool suspended; |
837 | 838 | ||
diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c index ed681c75..88b743bc 100644 --- a/drivers/gpu/nvgpu/pci.c +++ b/drivers/gpu/nvgpu/pci.c | |||
@@ -400,6 +400,8 @@ static void nvgpu_pci_remove(struct pci_dev *pdev) | |||
400 | platform->remove(g->dev); | 400 | platform->remove(g->dev); |
401 | gk20a_dbg(gpu_dbg_shutdown, "Platform remove done.\b"); | 401 | gk20a_dbg(gpu_dbg_shutdown, "Platform remove done.\b"); |
402 | 402 | ||
403 | enable_irq(g->irq_stall); | ||
404 | |||
403 | kfree(g); | 405 | kfree(g); |
404 | } | 406 | } |
405 | 407 | ||