diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-06-27 19:49:33 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-28 13:04:12 -0400 |
commit | 8fe918c8d2f046f08cf14ad84f73803c61ac95ef (patch) | |
tree | 01ea10278385486efe036f5c2212be47fcbcf71b /drivers/gpu/nvgpu/os | |
parent | 2a9c4ce2cc702473ecc5eeceef0beef17ca8a689 (diff) |
gpu: nvgpu: check for valid scaling profile data
Check for valid scaling profile private data before making
calls to bandwidth manager.
Bug 200423741
Change-Id: Iff12b4a26ff0dfb2c32248b325a07e97f2de4e98
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1763601
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/os')
-rw-r--r-- | drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c index 00fd386e..cf18fd24 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gp10b_tegra.c | |||
@@ -133,7 +133,7 @@ static void gp10b_tegra_scale_exit(struct device *dev) | |||
133 | struct gk20a_platform *platform = gk20a_get_platform(dev); | 133 | struct gk20a_platform *platform = gk20a_get_platform(dev); |
134 | struct gk20a_scale_profile *profile = platform->g->scale_profile; | 134 | struct gk20a_scale_profile *profile = platform->g->scale_profile; |
135 | 135 | ||
136 | if (profile) | 136 | if (profile && profile->private_data) |
137 | tegra_bwmgr_unregister( | 137 | tegra_bwmgr_unregister( |
138 | (struct tegra_bwmgr_client *)profile->private_data); | 138 | (struct tegra_bwmgr_client *)profile->private_data); |
139 | } | 139 | } |
@@ -300,7 +300,8 @@ void gp10b_tegra_postscale(struct device *pdev, | |||
300 | unsigned long emc_rate; | 300 | unsigned long emc_rate; |
301 | 301 | ||
302 | nvgpu_log_fn(g, " "); | 302 | nvgpu_log_fn(g, " "); |
303 | if (profile && !platform->is_railgated(pdev)) { | 303 | if (profile && profile->private_data && |
304 | !platform->is_railgated(pdev)) { | ||
304 | unsigned long emc_scale; | 305 | unsigned long emc_scale; |
305 | 306 | ||
306 | if (freq <= gp10b_freq_table[0]) | 307 | if (freq <= gp10b_freq_table[0]) |