diff options
author | Dan Willemsen <dwillemsen@nvidia.com> | 2015-02-17 00:42:47 -0500 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 23:19:07 -0400 |
commit | 6e3d5ac13f2a9740a7dbb21aeb06ba7af4f6bd12 (patch) | |
tree | b1a35e2fa06797f70ff6e4033dae5407ee842d4c /drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |
parent | e6292247ad8abd27c5a9c4f80cdce849ea8bd50b (diff) |
host/gpu: Upgrade to new fence-based sync implementation
Signed-off-by: Dan Willemsen <dwillemsen@nvidia.com>
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, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 746a2de3..622f438c 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -91,7 +91,6 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
91 | #ifdef CONFIG_SYNC | 91 | #ifdef CONFIG_SYNC |
92 | int i; | 92 | int i; |
93 | int num_wait_cmds; | 93 | int num_wait_cmds; |
94 | struct sync_pt *pt; | ||
95 | struct sync_fence *sync_fence; | 94 | struct sync_fence *sync_fence; |
96 | struct priv_cmd_entry *wait_cmd = NULL; | 95 | struct priv_cmd_entry *wait_cmd = NULL; |
97 | struct gk20a_channel_syncpt *sp = | 96 | struct gk20a_channel_syncpt *sp = |
@@ -103,7 +102,8 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
103 | return -EINVAL; | 102 | return -EINVAL; |
104 | 103 | ||
105 | /* validate syncpt ids */ | 104 | /* validate syncpt ids */ |
106 | list_for_each_entry(pt, &sync_fence->pt_list_head, pt_list) { | 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); | ||
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 || |
109 | wait_id >= nvhost_syncpt_nb_pts_ext(sp->host1x_pdev)) { | 109 | wait_id >= nvhost_syncpt_nb_pts_ext(sp->host1x_pdev)) { |
@@ -122,7 +122,9 @@ static int gk20a_channel_syncpt_wait_fd(struct gk20a_channel_sync *s, int fd, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | i = 0; | 124 | i = 0; |
125 | list_for_each_entry(pt, &sync_fence->pt_list_head, pt_list) { | 125 | for (i = 0; i < sync_fence->num_fences; i++) { |
126 | struct fence *f = sync_fence->cbs[i].sync_pt; | ||
127 | struct sync_pt *pt = sync_pt_from_fence(f); | ||
126 | u32 wait_id = nvhost_sync_pt_id(pt); | 128 | u32 wait_id = nvhost_sync_pt_id(pt); |
127 | u32 wait_value = nvhost_sync_pt_thresh(pt); | 129 | u32 wait_value = nvhost_sync_pt_thresh(pt); |
128 | 130 | ||