diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index cdbe3c09..121e442c 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include <linux/tegra_pm_domains.h> | 39 | #include <linux/tegra_pm_domains.h> |
40 | #include <linux/clk/tegra.h> | 40 | #include <linux/clk/tegra.h> |
41 | #include <linux/kthread.h> | 41 | #include <linux/kthread.h> |
42 | #include <linux/platform/tegra/common.h> | ||
42 | 43 | ||
43 | #include <linux/sched.h> | 44 | #include <linux/sched.h> |
44 | 45 | ||
@@ -584,6 +585,10 @@ static void gk20a_remove_support(struct platform_device *dev) | |||
584 | { | 585 | { |
585 | struct gk20a *g = get_gk20a(dev); | 586 | struct gk20a *g = get_gk20a(dev); |
586 | 587 | ||
588 | #ifdef CONFIG_TEGRA_COMMON | ||
589 | tegra_unregister_idle_unidle(); | ||
590 | #endif | ||
591 | |||
587 | if (g->pmu.remove_support) | 592 | if (g->pmu.remove_support) |
588 | g->pmu.remove_support(&g->pmu); | 593 | g->pmu.remove_support(&g->pmu); |
589 | 594 | ||
@@ -618,6 +623,10 @@ static int gk20a_init_support(struct platform_device *dev) | |||
618 | int err = 0; | 623 | int err = 0; |
619 | struct gk20a *g = get_gk20a(dev); | 624 | struct gk20a *g = get_gk20a(dev); |
620 | 625 | ||
626 | #ifdef CONFIG_TEGRA_COMMON | ||
627 | tegra_register_idle_unidle(gk20a_do_idle, gk20a_do_unidle); | ||
628 | #endif | ||
629 | |||
621 | g->regs = gk20a_ioremap_resource(dev, GK20A_BAR0_IORESOURCE_MEM, | 630 | g->regs = gk20a_ioremap_resource(dev, GK20A_BAR0_IORESOURCE_MEM, |
622 | &g->reg_mem); | 631 | &g->reg_mem); |
623 | if (IS_ERR(g->regs)) { | 632 | if (IS_ERR(g->regs)) { |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 6454bbfc..ed209929 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -839,6 +839,8 @@ void gk20a_idle(struct platform_device *pdev); | |||
839 | void gk20a_disable(struct gk20a *g, u32 units); | 839 | void gk20a_disable(struct gk20a *g, u32 units); |
840 | void gk20a_enable(struct gk20a *g, u32 units); | 840 | void gk20a_enable(struct gk20a *g, u32 units); |
841 | void gk20a_reset(struct gk20a *g, u32 units); | 841 | void gk20a_reset(struct gk20a *g, u32 units); |
842 | int gk20a_do_idle(void); | ||
843 | int gk20a_do_unidle(void); | ||
842 | int __gk20a_do_idle(struct platform_device *pdev, bool force_reset); | 844 | int __gk20a_do_idle(struct platform_device *pdev, bool force_reset); |
843 | int __gk20a_do_unidle(struct platform_device *pdev); | 845 | int __gk20a_do_unidle(struct platform_device *pdev); |
844 | 846 | ||