summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorYogesh <ybhosale@nvidia.com>2015-08-17 19:41:02 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-08-21 18:14:44 -0400
commit05a6b54914fcd7f21ca30c32dbb851e6eecfc64c (patch)
treec1edd149e730897e5fa84dc6b84efbee49d19c9c /drivers/gpu/nvgpu/gk20a/gk20a.c
parent3fba1e929ba17531f88809cbc12212cedaed015b (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/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c9
1 files changed, 9 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)) {