From cb9f8bae1aeacf9da0d5fea2da36baa43e9a586b Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Mon, 29 Jan 2018 08:40:24 -0800 Subject: 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 Reviewed-on: https://git-master.nvidia.com/r/1648013 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/driver_common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'drivers/gpu/nvgpu/common/linux/driver_common.c') 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) g->vbios_min_version = platform->vbios_min_version; } +static void nvgpu_init_ltc_vars(struct gk20a *g) +{ + struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); + + g->ltc_streamid = platform->ltc_streamid; +} + static void nvgpu_init_mm_vars(struct gk20a *g) { struct gk20a_platform *platform = dev_get_drvdata(dev_from_gk20a(g)); @@ -202,6 +209,7 @@ int nvgpu_probe(struct gk20a *g, nvgpu_init_timeslice(g); nvgpu_init_pm_vars(g); nvgpu_init_vbios_vars(g); + nvgpu_init_ltc_vars(g); /* Initialize the platform interface. */ err = platform->probe(dev); -- cgit v1.2.2