diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 631813ae..73b2d7ec 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A Channel Synchronization Abstraction | 4 | * GK20A Channel Synchronization Abstraction |
5 | * | 5 | * |
6 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -61,7 +61,7 @@ static int gk20a_channel_syncpt_wait_syncpt(struct gk20a_channel_sync *s, | |||
61 | container_of(s, struct gk20a_channel_syncpt, ops); | 61 | container_of(s, struct gk20a_channel_syncpt, ops); |
62 | struct priv_cmd_entry *wait_cmd = NULL; | 62 | struct priv_cmd_entry *wait_cmd = NULL; |
63 | 63 | ||
64 | if (id >= nvhost_syncpt_nb_pts_ext(sp->host1x_pdev)) { | 64 | if (!nvhost_syncpt_is_valid_pt_ext(sp->host1x_pdev, id)) { |
65 | dev_warn(dev_from_gk20a(sp->c->g), | 65 | dev_warn(dev_from_gk20a(sp->c->g), |
66 | "invalid wait id in gpfifo submit, elided"); | 66 | "invalid wait id in gpfifo submit, elided"); |
67 | return 0; | 67 | return 0; |
@@ -105,8 +105,8 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
105 | for (i = 0; i < sync_fence->num_fences; i++) { | 105 | for (i = 0; i < sync_fence->num_fences; i++) { |
106 | struct sync_pt *pt = sync_pt_from_fence(sync_fence->cbs[i].sync_pt); | 106 | struct sync_pt *pt = sync_pt_from_fence(sync_fence->cbs[i].sync_pt); |
107 | u32 wait_id = nvhost_sync_pt_id(pt); | 107 | u32 wait_id = nvhost_sync_pt_id(pt); |
108 | if (!wait_id || | 108 | if (!wait_id || !nvhost_syncpt_is_valid_pt_ext(sp->host1x_pdev, |
109 | wait_id >= nvhost_syncpt_nb_pts_ext(sp->host1x_pdev)) { | 109 | wait_id)) { |
110 | sync_fence_put(sync_fence); | 110 | sync_fence_put(sync_fence); |
111 | return -EINVAL; | 111 | return -EINVAL; |
112 | } | 112 | } |