diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-03-08 18:46:31 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-12 12:12:57 -0400 |
commit | 02956adcd35507dde5db3a3b006a5c6a06334733 (patch) | |
tree | e29fb5fcdb2da7c5e1cc20e7ea4973d21e96ccbc /drivers/gpu/nvgpu | |
parent | cb6ed949e272f8ad753bf4ab1c0d20c35f31498b (diff) |
gpu: nvgpu: check for syncpt enable
Check for syncpt enable before querying for
synpt ro map. Otherwise it is getting result
in kernel crash with syncpt support disabled.
Change-Id: Iaa13d802ec66a368f2bedd2dd1061bae29b4aaa2
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1671652
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_as.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_as.c b/drivers/gpu/nvgpu/common/linux/ioctl_as.c index c5769476..7559499e 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_as.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_as.c | |||
@@ -270,6 +270,9 @@ static int nvgpu_as_ioctl_get_sync_ro_map( | |||
270 | if (!g->ops.fifo.get_sync_ro_map) | 270 | if (!g->ops.fifo.get_sync_ro_map) |
271 | return -EINVAL; | 271 | return -EINVAL; |
272 | 272 | ||
273 | if (!gk20a_platform_has_syncpoints(g)) | ||
274 | return -EINVAL; | ||
275 | |||
273 | err = g->ops.fifo.get_sync_ro_map(vm, &base_gpuva, &sync_size); | 276 | err = g->ops.fifo.get_sync_ro_map(vm, &base_gpuva, &sync_size); |
274 | if (err) | 277 | if (err) |
275 | return err; | 278 | return err; |