From 7acc993cdbcc202854f188e7f53646f387573a09 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 14 Apr 2017 15:12:57 -0700 Subject: gpu: nvgpu: Move can_railgate & railgate_delay to gk20a Copy can_railgate and railgate_delay to struct gk20a at probe time, and access them from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I63d4f4aff7eb17a167775fd7982a1b548bbca3a5 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1463543 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/pci.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/pci.c') diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index b4e6cb7c..a603135f 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c @@ -64,8 +64,8 @@ static struct gk20a_platform nvgpu_pci_device[] = { .remove = nvgpu_pci_tegra_remove, /* power management configuration */ - .railgate_delay = 500, - .can_railgate = false, + .railgate_delay_init = 500, + .can_railgate_init = false, .can_elpg = true, .enable_elpg = true, .enable_elcg = false, @@ -98,8 +98,8 @@ static struct gk20a_platform nvgpu_pci_device[] = { .remove = nvgpu_pci_tegra_remove, /* power management configuration */ - .railgate_delay = 500, - .can_railgate = false, + .railgate_delay_init = 500, + .can_railgate_init = false, .can_elpg = true, .enable_elpg = true, .enable_elcg = false, @@ -132,8 +132,8 @@ static struct gk20a_platform nvgpu_pci_device[] = { .remove = nvgpu_pci_tegra_remove, /* power management configuration */ - .railgate_delay = 500, - .can_railgate = false, + .railgate_delay_init = 500, + .can_railgate_init = false, .can_elpg = true, .enable_elpg = true, .enable_elcg = false, @@ -166,8 +166,8 @@ static struct gk20a_platform nvgpu_pci_device[] = { .remove = nvgpu_pci_tegra_remove, /* power management configuration */ - .railgate_delay = 500, - .can_railgate = false, + .railgate_delay_init = 500, + .can_railgate_init = false, .can_elpg = true, .enable_elpg = true, .enable_elcg = false, @@ -311,14 +311,14 @@ static const struct dev_pm_ops nvgpu_pci_pm_ops = { static int nvgpu_pci_pm_init(struct device *dev) { #ifdef CONFIG_PM - struct gk20a_platform *platform = gk20a_get_platform(dev); + struct gk20a *g = get_gk20a(dev); - if (!platform->can_railgate) { + if (!g->can_railgate) { pm_runtime_disable(dev); } else { - if (platform->railgate_delay) + if (g->railgate_delay) pm_runtime_set_autosuspend_delay(dev, - platform->railgate_delay); + g->railgate_delay); /* * Runtime PM for PCI devices is disabled by default, -- cgit v1.2.2