diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-03-22 07:35:01 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-23 20:18:24 -0400 |
commit | cb8d8337a61ead5eb948d78ef24d55d07fa99e7b (patch) | |
tree | 428f0ce0f90620bc0ec1c7ddf1453c832aae5d3a /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |
parent | bac51e8081a2ae778bfdccc1c57ee3ef382de077 (diff) |
gpu: nvgpu: disallow invalid syncpoint wait ids
Instead of ignoring a wait when a raw syncpoint prefence has an invalid
id, reject the submit with -EINVAL just like with syncpoints in syncfds.
Change-Id: I9b5c417bd1c7cd081c79659d088ac2c915de8c0e
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1680281
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 25c57681..e94a112f 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -58,10 +58,8 @@ static int gk20a_channel_syncpt_wait_syncpt(struct gk20a_channel_sync *s, | |||
58 | struct channel_gk20a *c = sp->c; | 58 | struct channel_gk20a *c = sp->c; |
59 | int err = 0; | 59 | int err = 0; |
60 | 60 | ||
61 | if (!nvgpu_nvhost_syncpt_is_valid_pt_ext(sp->nvhost_dev, id)) { | 61 | if (!nvgpu_nvhost_syncpt_is_valid_pt_ext(sp->nvhost_dev, id)) |
62 | nvgpu_warn(c->g, "invalid wait id in gpfifo submit, elided"); | 62 | return -EINVAL; |
63 | return 0; | ||
64 | } | ||
65 | 63 | ||
66 | if (nvgpu_nvhost_syncpt_is_expired_ext(sp->nvhost_dev, id, thresh)) | 64 | if (nvgpu_nvhost_syncpt_is_expired_ext(sp->nvhost_dev, id, thresh)) |
67 | return 0; | 65 | return 0; |