summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/driver_common.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2018-01-29 11:40:24 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-31 15:37:28 -0500
commitcb9f8bae1aeacf9da0d5fea2da36baa43e9a586b (patch)
tree51dfd30eb00d52354dc533fb780bbf80808582fd /drivers/gpu/nvgpu/common/linux/driver_common.c
parent6e5a3451d4cf4f28d1eb9086d46f32210df85986 (diff)
gpu: nvgpu: Unify querying stream id
Stream ID for gp10b is retrieved directly from DT headers in common code. Introduce instead a variable to store the stream ID and move the query to platform_gp10b_tegra.c. JIRA NVGPU-4 Change-Id: I123024e13e470283bb691883f8f963eb72c997d8 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1648013 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/driver_common.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/driver_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c
index f2373e00..b90574e0 100644
--- a/drivers/gpu/nvgpu/common/linux/driver_common.c
+++ b/drivers/gpu/nvgpu/common/linux/driver_common.c
@@ -170,6 +170,13 @@ static void nvgpu_init_vbios_vars(struct gk20a *g)
170 g->vbios_min_version = platform->vbios_min_version; 170 g->vbios_min_version = platform->vbios_min_version;
171} 171}
172 172
173static void nvgpu_init_ltc_vars(struct gk20a *g)
174{
175 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
176
177 g->ltc_streamid = platform->ltc_streamid;
178}
179
173static void nvgpu_init_mm_vars(struct gk20a *g) 180static void nvgpu_init_mm_vars(struct gk20a *g)
174{ 181{
175 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); 182 struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g));
@@ -202,6 +209,7 @@ int nvgpu_probe(struct gk20a *g,
202 nvgpu_init_timeslice(g); 209 nvgpu_init_timeslice(g);
203 nvgpu_init_pm_vars(g); 210 nvgpu_init_pm_vars(g);
204 nvgpu_init_vbios_vars(g); 211 nvgpu_init_vbios_vars(g);
212 nvgpu_init_ltc_vars(g);
205 213
206 /* Initialize the platform interface. */ 214 /* Initialize the platform interface. */
207 err = platform->probe(dev); 215 err = platform->probe(dev);