From 05a6b54914fcd7f21ca30c32dbb851e6eecfc64c Mon Sep 17 00:00:00 2001 From: Yogesh Date: Mon, 17 Aug 2015 16:41:02 -0700 Subject: 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 Reviewed-on: http://git-master/r/785047 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gk20a.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') 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 @@ #include #include #include +#include #include @@ -584,6 +585,10 @@ static void gk20a_remove_support(struct platform_device *dev) { struct gk20a *g = get_gk20a(dev); +#ifdef CONFIG_TEGRA_COMMON + tegra_unregister_idle_unidle(); +#endif + if (g->pmu.remove_support) g->pmu.remove_support(&g->pmu); @@ -618,6 +623,10 @@ static int gk20a_init_support(struct platform_device *dev) int err = 0; struct gk20a *g = get_gk20a(dev); +#ifdef CONFIG_TEGRA_COMMON + tegra_register_idle_unidle(gk20a_do_idle, gk20a_do_unidle); +#endif + g->regs = gk20a_ioremap_resource(dev, GK20A_BAR0_IORESOURCE_MEM, &g->reg_mem); if (IS_ERR(g->regs)) { -- cgit v1.2.2