diff options
author | Yogesh <ybhosale@nvidia.com> | 2015-08-17 19:41:02 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2015-08-21 18:14:44 -0400 |
commit | 05a6b54914fcd7f21ca30c32dbb851e6eecfc64c (patch) | |
tree | c1edd149e730897e5fa84dc6b84efbee49d19c9c /drivers | |
parent | 3fba1e929ba17531f88809cbc12212cedaed015b (diff) |
gpu: nvgpu: Inject function addresses
Inject function addresses of gk20a_do_idle and
gk20a_do_unidle once the nvgpu module loads.
Bug 1476801
Change-Id: I67a8ae7fb654524616c2c2c710013cbc097a3f32
Signed-off-by: Yogesh Bhosale <ybhosale@nvidia.com>
Reviewed-on: http://git-master/r/785047
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-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 | ||