From 0b0df9eb84d68b9daf6b309263d133bb1a720e9b Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 30 Oct 2017 13:22:21 -0700 Subject: gpu: nvgpu: Use nvgpu_is_enabled() for ASPM Convert disable_aspm and references to that field to use nvgpu_is_enabled(NVGPU_SUPPORT_ASPM). Initialize it from gk20a_platform struct at probe time. This removes another dependency to struct gk20a_platform. JIRA NVGPU-259 Change-Id: I32e30160f817ea275aa190dcf86c5fd594138d75 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1590124 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index a282110a..f71a51fd 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c @@ -124,7 +124,6 @@ int gk20a_prepare_poweroff(struct gk20a *g) int gk20a_finalize_poweron(struct gk20a *g) { - struct gk20a_platform *platform = gk20a_get_platform(dev_from_gk20a(g)); int err; #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU) u32 nr_pages; @@ -312,7 +311,7 @@ int gk20a_finalize_poweron(struct gk20a *g) if (g->ops.xve.available_speeds) { u32 speed; - if (platform->disable_aspm && g->ops.xve.disable_aspm) + if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_ASPM) && g->ops.xve.disable_aspm) g->ops.xve.disable_aspm(g); g->ops.xve.available_speeds(g, &speed); -- cgit v1.2.2