mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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>
This commit is contained in:
@@ -39,6 +39,7 @@
|
||||
#include <linux/tegra_pm_domains.h>
|
||||
#include <linux/clk/tegra.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/platform/tegra/common.h>
|
||||
|
||||
#include <linux/sched.h>
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -839,6 +839,8 @@ void gk20a_idle(struct platform_device *pdev);
|
||||
void gk20a_disable(struct gk20a *g, u32 units);
|
||||
void gk20a_enable(struct gk20a *g, u32 units);
|
||||
void gk20a_reset(struct gk20a *g, u32 units);
|
||||
int gk20a_do_idle(void);
|
||||
int gk20a_do_unidle(void);
|
||||
int __gk20a_do_idle(struct platform_device *pdev, bool force_reset);
|
||||
int __gk20a_do_unidle(struct platform_device *pdev);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user