aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2018-05-05 02:45:47 -0400
committerThierry Reding <treding@nvidia.com>2018-05-18 15:50:04 -0400
commit24c94e166dfe89839129b8e0fae208b6af60d6f1 (patch)
tree9c171fc00e813de23dabf7cf7717938644416a12
parent2f8a6da866eff746a9f8c7745790f3765baeb589 (diff)
gpu: host1x: Remove wait check support
The job submission userspace ABI doesn't support this and there are no plans to implement it, so all of this code is dead and can be removed. Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--drivers/gpu/drm/tegra/drm.c62
-rw-r--r--drivers/gpu/host1x/dev.h8
-rw-r--r--drivers/gpu/host1x/hw/channel_hw.c3
-rw-r--r--drivers/gpu/host1x/hw/syncpt_hw.c11
-rw-r--r--drivers/gpu/host1x/job.c124
-rw-r--r--drivers/gpu/host1x/syncpt.c6
-rw-r--r--drivers/gpu/host1x/syncpt.h3
-rw-r--r--include/linux/host1x.h15
-rw-r--r--include/trace/events/host1x.h16
9 files changed, 14 insertions, 234 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 3cdef659cd39..204b10e33f16 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -321,46 +321,14 @@ static int host1x_reloc_copy_from_user(struct host1x_reloc *dest,
321 return 0; 321 return 0;
322} 322}
323 323
324static int host1x_waitchk_copy_from_user(struct host1x_waitchk *dest,
325 struct drm_tegra_waitchk __user *src,
326 struct drm_file *file)
327{
328 u32 cmdbuf;
329 int err;
330
331 err = get_user(cmdbuf, &src->handle);
332 if (err < 0)
333 return err;
334
335 err = get_user(dest->offset, &src->offset);
336 if (err < 0)
337 return err;
338
339 err = get_user(dest->syncpt_id, &src->syncpt);
340 if (err < 0)
341 return err;
342
343 err = get_user(dest->thresh, &src->thresh);
344 if (err < 0)
345 return err;
346
347 dest->bo = host1x_bo_lookup(file, cmdbuf);
348 if (!dest->bo)
349 return -ENOENT;
350
351 return 0;
352}
353
354int tegra_drm_submit(struct tegra_drm_context *context, 324int tegra_drm_submit(struct tegra_drm_context *context,
355 struct drm_tegra_submit *args, struct drm_device *drm, 325 struct drm_tegra_submit *args, struct drm_device *drm,
356 struct drm_file *file) 326 struct drm_file *file)
357{ 327{
358 unsigned int num_cmdbufs = args->num_cmdbufs; 328 unsigned int num_cmdbufs = args->num_cmdbufs;
359 unsigned int num_relocs = args->num_relocs; 329 unsigned int num_relocs = args->num_relocs;
360 unsigned int num_waitchks = args->num_waitchks;
361 struct drm_tegra_cmdbuf __user *user_cmdbufs; 330 struct drm_tegra_cmdbuf __user *user_cmdbufs;
362 struct drm_tegra_reloc __user *user_relocs; 331 struct drm_tegra_reloc __user *user_relocs;
363 struct drm_tegra_waitchk __user *user_waitchks;
364 struct drm_tegra_syncpt __user *user_syncpt; 332 struct drm_tegra_syncpt __user *user_syncpt;
365 struct drm_tegra_syncpt syncpt; 333 struct drm_tegra_syncpt syncpt;
366 struct host1x *host1x = dev_get_drvdata(drm->dev->parent); 334 struct host1x *host1x = dev_get_drvdata(drm->dev->parent);
@@ -372,7 +340,6 @@ int tegra_drm_submit(struct tegra_drm_context *context,
372 340
373 user_cmdbufs = u64_to_user_ptr(args->cmdbufs); 341 user_cmdbufs = u64_to_user_ptr(args->cmdbufs);
374 user_relocs = u64_to_user_ptr(args->relocs); 342 user_relocs = u64_to_user_ptr(args->relocs);
375 user_waitchks = u64_to_user_ptr(args->waitchks);
376 user_syncpt = u64_to_user_ptr(args->syncpts); 343 user_syncpt = u64_to_user_ptr(args->syncpts);
377 344
378 /* We don't yet support other than one syncpt_incr struct per submit */ 345 /* We don't yet support other than one syncpt_incr struct per submit */
@@ -384,12 +351,11 @@ int tegra_drm_submit(struct tegra_drm_context *context,
384 return -EINVAL; 351 return -EINVAL;
385 352
386 job = host1x_job_alloc(context->channel, args->num_cmdbufs, 353 job = host1x_job_alloc(context->channel, args->num_cmdbufs,
387 args->num_relocs, args->num_waitchks); 354 args->num_relocs);
388 if (!job) 355 if (!job)
389 return -ENOMEM; 356 return -ENOMEM;
390 357
391 job->num_relocs = args->num_relocs; 358 job->num_relocs = args->num_relocs;
392 job->num_waitchk = args->num_waitchks;
393 job->client = (u32)args->context; 359 job->client = (u32)args->context;
394 job->class = context->client->base.class; 360 job->class = context->client->base.class;
395 job->serialize = true; 361 job->serialize = true;
@@ -398,7 +364,7 @@ int tegra_drm_submit(struct tegra_drm_context *context,
398 * Track referenced BOs so that they can be unreferenced after the 364 * Track referenced BOs so that they can be unreferenced after the
399 * submission is complete. 365 * submission is complete.
400 */ 366 */
401 num_refs = num_cmdbufs + num_relocs * 2 + num_waitchks; 367 num_refs = num_cmdbufs + num_relocs * 2;
402 368
403 refs = kmalloc_array(num_refs, sizeof(*refs), GFP_KERNEL); 369 refs = kmalloc_array(num_refs, sizeof(*refs), GFP_KERNEL);
404 if (!refs) { 370 if (!refs) {
@@ -489,30 +455,6 @@ int tegra_drm_submit(struct tegra_drm_context *context,
489 } 455 }
490 } 456 }
491 457
492 /* copy and resolve waitchks from submit */
493 while (num_waitchks--) {
494 struct host1x_waitchk *wait = &job->waitchk[num_waitchks];
495 struct tegra_bo *obj;
496
497 err = host1x_waitchk_copy_from_user(
498 wait, &user_waitchks[num_waitchks], file);
499 if (err < 0)
500 goto fail;
501
502 obj = host1x_to_tegra_bo(wait->bo);
503 refs[num_refs++] = &obj->gem;
504
505 /*
506 * The unaligned offset will cause an unaligned write during
507 * of the waitchks patching, corrupting the commands stream.
508 */
509 if (wait->offset & 3 ||
510 wait->offset >= obj->gem.size) {
511 err = -EINVAL;
512 goto fail;
513 }
514 }
515
516 if (copy_from_user(&syncpt, user_syncpt, sizeof(syncpt))) { 458 if (copy_from_user(&syncpt, user_syncpt, sizeof(syncpt))) {
517 err = -EFAULT; 459 err = -EFAULT;
518 goto fail; 460 goto fail;
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index 43e9fabb43a1..36f44ffebe73 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -78,7 +78,6 @@ struct host1x_syncpt_ops {
78 void (*load_wait_base)(struct host1x_syncpt *syncpt); 78 void (*load_wait_base)(struct host1x_syncpt *syncpt);
79 u32 (*load)(struct host1x_syncpt *syncpt); 79 u32 (*load)(struct host1x_syncpt *syncpt);
80 int (*cpu_incr)(struct host1x_syncpt *syncpt); 80 int (*cpu_incr)(struct host1x_syncpt *syncpt);
81 int (*patch_wait)(struct host1x_syncpt *syncpt, void *patch_addr);
82 void (*assign_to_channel)(struct host1x_syncpt *syncpt, 81 void (*assign_to_channel)(struct host1x_syncpt *syncpt,
83 struct host1x_channel *channel); 82 struct host1x_channel *channel);
84 void (*enable_protection)(struct host1x *host); 83 void (*enable_protection)(struct host1x *host);
@@ -183,13 +182,6 @@ static inline int host1x_hw_syncpt_cpu_incr(struct host1x *host,
183 return host->syncpt_op->cpu_incr(sp); 182 return host->syncpt_op->cpu_incr(sp);
184} 183}
185 184
186static inline int host1x_hw_syncpt_patch_wait(struct host1x *host,
187 struct host1x_syncpt *sp,
188 void *patch_addr)
189{
190 return host->syncpt_op->patch_wait(sp, patch_addr);
191}
192
193static inline void host1x_hw_syncpt_assign_to_channel( 185static inline void host1x_hw_syncpt_assign_to_channel(
194 struct host1x *host, struct host1x_syncpt *sp, 186 struct host1x *host, struct host1x_syncpt *sp,
195 struct host1x_channel *ch) 187 struct host1x_channel *ch)
diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c
index 9af758785a11..4c9555038a95 100644
--- a/drivers/gpu/host1x/hw/channel_hw.c
+++ b/drivers/gpu/host1x/hw/channel_hw.c
@@ -104,8 +104,7 @@ static int channel_submit(struct host1x_job *job)
104 sp = host->syncpt + job->syncpt_id; 104 sp = host->syncpt + job->syncpt_id;
105 trace_host1x_channel_submit(dev_name(ch->dev), 105 trace_host1x_channel_submit(dev_name(ch->dev),
106 job->num_gathers, job->num_relocs, 106 job->num_gathers, job->num_relocs,
107 job->num_waitchk, job->syncpt_id, 107 job->syncpt_id, job->syncpt_incrs);
108 job->syncpt_incrs);
109 108
110 /* before error checks, return current max */ 109 /* before error checks, return current max */
111 prev_max = job->syncpt_end = host1x_syncpt_read_max(sp); 110 prev_max = job->syncpt_end = host1x_syncpt_read_max(sp);
diff --git a/drivers/gpu/host1x/hw/syncpt_hw.c b/drivers/gpu/host1x/hw/syncpt_hw.c
index 7dfd47d74f89..a23bb3352d02 100644
--- a/drivers/gpu/host1x/hw/syncpt_hw.c
+++ b/drivers/gpu/host1x/hw/syncpt_hw.c
@@ -96,16 +96,6 @@ static int syncpt_cpu_incr(struct host1x_syncpt *sp)
96 return 0; 96 return 0;
97} 97}
98 98
99/* remove a wait pointed to by patch_addr */
100static int syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr)
101{
102 u32 override = host1x_class_host_wait_syncpt(HOST1X_SYNCPT_RESERVED, 0);
103
104 *((u32 *)patch_addr) = override;
105
106 return 0;
107}
108
109/** 99/**
110 * syncpt_assign_to_channel() - Assign syncpoint to channel 100 * syncpt_assign_to_channel() - Assign syncpoint to channel
111 * @sp: syncpoint 101 * @sp: syncpoint
@@ -156,7 +146,6 @@ static const struct host1x_syncpt_ops host1x_syncpt_ops = {
156 .load_wait_base = syncpt_read_wait_base, 146 .load_wait_base = syncpt_read_wait_base,
157 .load = syncpt_load, 147 .load = syncpt_load,
158 .cpu_incr = syncpt_cpu_incr, 148 .cpu_incr = syncpt_cpu_incr,
159 .patch_wait = syncpt_patch_wait,
160 .assign_to_channel = syncpt_assign_to_channel, 149 .assign_to_channel = syncpt_assign_to_channel,
161 .enable_protection = syncpt_enable_protection, 150 .enable_protection = syncpt_enable_protection,
162}; 151};
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index db509ab8874e..3cbfc6e37668 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -34,8 +34,7 @@
34#define HOST1X_WAIT_SYNCPT_OFFSET 0x8 34#define HOST1X_WAIT_SYNCPT_OFFSET 0x8
35 35
36struct host1x_job *host1x_job_alloc(struct host1x_channel *ch, 36struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
37 u32 num_cmdbufs, u32 num_relocs, 37 u32 num_cmdbufs, u32 num_relocs)
38 u32 num_waitchks)
39{ 38{
40 struct host1x_job *job = NULL; 39 struct host1x_job *job = NULL;
41 unsigned int num_unpins = num_cmdbufs + num_relocs; 40 unsigned int num_unpins = num_cmdbufs + num_relocs;
@@ -46,7 +45,6 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
46 total = sizeof(struct host1x_job) + 45 total = sizeof(struct host1x_job) +
47 (u64)num_relocs * sizeof(struct host1x_reloc) + 46 (u64)num_relocs * sizeof(struct host1x_reloc) +
48 (u64)num_unpins * sizeof(struct host1x_job_unpin_data) + 47 (u64)num_unpins * sizeof(struct host1x_job_unpin_data) +
49 (u64)num_waitchks * sizeof(struct host1x_waitchk) +
50 (u64)num_cmdbufs * sizeof(struct host1x_job_gather) + 48 (u64)num_cmdbufs * sizeof(struct host1x_job_gather) +
51 (u64)num_unpins * sizeof(dma_addr_t) + 49 (u64)num_unpins * sizeof(dma_addr_t) +
52 (u64)num_unpins * sizeof(u32 *); 50 (u64)num_unpins * sizeof(u32 *);
@@ -66,8 +64,6 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
66 mem += num_relocs * sizeof(struct host1x_reloc); 64 mem += num_relocs * sizeof(struct host1x_reloc);
67 job->unpins = num_unpins ? mem : NULL; 65 job->unpins = num_unpins ? mem : NULL;
68 mem += num_unpins * sizeof(struct host1x_job_unpin_data); 66 mem += num_unpins * sizeof(struct host1x_job_unpin_data);
69 job->waitchk = num_waitchks ? mem : NULL;
70 mem += num_waitchks * sizeof(struct host1x_waitchk);
71 job->gathers = num_cmdbufs ? mem : NULL; 67 job->gathers = num_cmdbufs ? mem : NULL;
72 mem += num_cmdbufs * sizeof(struct host1x_job_gather); 68 mem += num_cmdbufs * sizeof(struct host1x_job_gather);
73 job->addr_phys = num_unpins ? mem : NULL; 69 job->addr_phys = num_unpins ? mem : NULL;
@@ -111,73 +107,6 @@ void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
111} 107}
112EXPORT_SYMBOL(host1x_job_add_gather); 108EXPORT_SYMBOL(host1x_job_add_gather);
113 109
114/*
115 * NULL an already satisfied WAIT_SYNCPT host method, by patching its
116 * args in the command stream. The method data is changed to reference
117 * a reserved (never given out or incr) HOST1X_SYNCPT_RESERVED syncpt
118 * with a matching threshold value of 0, so is guaranteed to be popped
119 * by the host HW.
120 */
121static void host1x_syncpt_patch_offset(struct host1x_syncpt *sp,
122 struct host1x_bo *h, u32 offset)
123{
124 void *patch_addr = NULL;
125
126 /* patch the wait */
127 patch_addr = host1x_bo_kmap(h, offset >> PAGE_SHIFT);
128 if (patch_addr) {
129 host1x_syncpt_patch_wait(sp,
130 patch_addr + (offset & ~PAGE_MASK));
131 host1x_bo_kunmap(h, offset >> PAGE_SHIFT, patch_addr);
132 } else
133 pr_err("Could not map cmdbuf for wait check\n");
134}
135
136/*
137 * Check driver supplied waitchk structs for syncpt thresholds
138 * that have already been satisfied and NULL the comparison (to
139 * avoid a wrap condition in the HW).
140 */
141static int do_waitchks(struct host1x_job *job, struct host1x *host,
142 struct host1x_job_gather *g)
143{
144 struct host1x_bo *patch = g->bo;
145 int i;
146
147 /* compare syncpt vs wait threshold */
148 for (i = 0; i < job->num_waitchk; i++) {
149 struct host1x_waitchk *wait = &job->waitchk[i];
150 struct host1x_syncpt *sp =
151 host1x_syncpt_get(host, wait->syncpt_id);
152
153 /* validate syncpt id */
154 if (wait->syncpt_id > host1x_syncpt_nb_pts(host))
155 continue;
156
157 /* skip all other gathers */
158 if (patch != wait->bo)
159 continue;
160
161 trace_host1x_syncpt_wait_check(wait->bo, wait->offset,
162 wait->syncpt_id, wait->thresh,
163 host1x_syncpt_read_min(sp));
164
165 if (host1x_syncpt_is_expired(sp, wait->thresh)) {
166 dev_dbg(host->dev,
167 "drop WAIT id %u (%s) thresh 0x%x, min 0x%x\n",
168 wait->syncpt_id, sp->name, wait->thresh,
169 host1x_syncpt_read_min(sp));
170
171 host1x_syncpt_patch_offset(sp, patch,
172 g->offset + wait->offset);
173 }
174
175 wait->bo = NULL;
176 }
177
178 return 0;
179}
180
181static unsigned int pin_job(struct host1x *host, struct host1x_job *job) 110static unsigned int pin_job(struct host1x *host, struct host1x_job *job)
182{ 111{
183 unsigned int i; 112 unsigned int i;
@@ -331,17 +260,6 @@ static bool check_reloc(struct host1x_reloc *reloc, struct host1x_bo *cmdbuf,
331 return true; 260 return true;
332} 261}
333 262
334static bool check_wait(struct host1x_waitchk *wait, struct host1x_bo *cmdbuf,
335 unsigned int offset)
336{
337 offset *= sizeof(u32);
338
339 if (wait->bo != cmdbuf || wait->offset != offset)
340 return false;
341
342 return true;
343}
344
345struct host1x_firewall { 263struct host1x_firewall {
346 struct host1x_job *job; 264 struct host1x_job *job;
347 struct device *dev; 265 struct device *dev;
@@ -349,9 +267,6 @@ struct host1x_firewall {
349 unsigned int num_relocs; 267 unsigned int num_relocs;
350 struct host1x_reloc *reloc; 268 struct host1x_reloc *reloc;
351 269
352 unsigned int num_waitchks;
353 struct host1x_waitchk *waitchk;
354
355 struct host1x_bo *cmdbuf; 270 struct host1x_bo *cmdbuf;
356 unsigned int offset; 271 unsigned int offset;
357 272
@@ -378,20 +293,6 @@ static int check_register(struct host1x_firewall *fw, unsigned long offset)
378 fw->reloc++; 293 fw->reloc++;
379 } 294 }
380 295
381 if (offset == HOST1X_WAIT_SYNCPT_OFFSET) {
382 if (fw->class != HOST1X_CLASS_HOST1X)
383 return -EINVAL;
384
385 if (!fw->num_waitchks)
386 return -EINVAL;
387
388 if (!check_wait(fw->waitchk, fw->cmdbuf, fw->offset))
389 return -EINVAL;
390
391 fw->num_waitchks--;
392 fw->waitchk++;
393 }
394
395 return 0; 296 return 0;
396} 297}
397 298
@@ -556,8 +457,6 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
556 fw.dev = dev; 457 fw.dev = dev;
557 fw.reloc = job->relocarray; 458 fw.reloc = job->relocarray;
558 fw.num_relocs = job->num_relocs; 459 fw.num_relocs = job->num_relocs;
559 fw.waitchk = job->waitchk;
560 fw.num_waitchks = job->num_waitchk;
561 fw.class = job->class; 460 fw.class = job->class;
562 461
563 for (i = 0; i < job->num_gathers; i++) { 462 for (i = 0; i < job->num_gathers; i++) {
@@ -604,8 +503,8 @@ static inline int copy_gathers(struct host1x_job *job, struct device *dev)
604 offset += g->words * sizeof(u32); 503 offset += g->words * sizeof(u32);
605 } 504 }
606 505
607 /* No relocs and waitchks should remain at this point */ 506 /* No relocs should remain at this point */
608 if (fw.num_relocs || fw.num_waitchks) 507 if (fw.num_relocs)
609 return -EINVAL; 508 return -EINVAL;
610 509
611 return 0; 510 return 0;
@@ -616,19 +515,6 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
616 int err; 515 int err;
617 unsigned int i, j; 516 unsigned int i, j;
618 struct host1x *host = dev_get_drvdata(dev->parent); 517 struct host1x *host = dev_get_drvdata(dev->parent);
619 DECLARE_BITMAP(waitchk_mask, host1x_syncpt_nb_pts(host));
620
621 bitmap_zero(waitchk_mask, host1x_syncpt_nb_pts(host));
622 for (i = 0; i < job->num_waitchk; i++) {
623 u32 syncpt_id = job->waitchk[i].syncpt_id;
624
625 if (syncpt_id < host1x_syncpt_nb_pts(host))
626 set_bit(syncpt_id, waitchk_mask);
627 }
628
629 /* get current syncpt values for waitchk */
630 for_each_set_bit(i, waitchk_mask, host1x_syncpt_nb_pts(host))
631 host1x_syncpt_load(host->syncpt + i);
632 518
633 /* pin memory */ 519 /* pin memory */
634 err = pin_job(host, job); 520 err = pin_job(host, job);
@@ -663,10 +549,6 @@ int host1x_job_pin(struct host1x_job *job, struct device *dev)
663 err = do_relocs(job, g); 549 err = do_relocs(job, g);
664 if (err) 550 if (err)
665 break; 551 break;
666
667 err = do_waitchks(job, host, g);
668 if (err)
669 break;
670 } 552 }
671 553
672out: 554out:
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index a2a952adc136..a108669188e8 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -373,12 +373,6 @@ bool host1x_syncpt_is_expired(struct host1x_syncpt *sp, u32 thresh)
373 return (s32)(current_val - thresh) >= 0; 373 return (s32)(current_val - thresh) >= 0;
374} 374}
375 375
376/* remove a wait pointed to by patch_addr */
377int host1x_syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr)
378{
379 return host1x_hw_syncpt_patch_wait(sp->host, sp, patch_addr);
380}
381
382int host1x_syncpt_init(struct host1x *host) 376int host1x_syncpt_init(struct host1x *host)
383{ 377{
384 struct host1x_syncpt_base *bases; 378 struct host1x_syncpt_base *bases;
diff --git a/drivers/gpu/host1x/syncpt.h b/drivers/gpu/host1x/syncpt.h
index 9d88d37c2397..d98e22325e9d 100644
--- a/drivers/gpu/host1x/syncpt.h
+++ b/drivers/gpu/host1x/syncpt.h
@@ -124,7 +124,4 @@ static inline int host1x_syncpt_is_valid(struct host1x_syncpt *sp)
124 return sp->id < host1x_syncpt_nb_pts(sp->host); 124 return sp->id < host1x_syncpt_nb_pts(sp->host);
125} 125}
126 126
127/* Patch a wait by replacing it with a wait for syncpt 0 value 0 */
128int host1x_syncpt_patch_wait(struct host1x_syncpt *sp, void *patch_addr);
129
130#endif 127#endif
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index ddf7f9ca86cc..f66bece1e1b7 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -192,13 +192,6 @@ struct host1x_reloc {
192 unsigned long shift; 192 unsigned long shift;
193}; 193};
194 194
195struct host1x_waitchk {
196 struct host1x_bo *bo;
197 u32 offset;
198 u32 syncpt_id;
199 u32 thresh;
200};
201
202struct host1x_job { 195struct host1x_job {
203 /* When refcount goes to zero, job can be freed */ 196 /* When refcount goes to zero, job can be freed */
204 struct kref ref; 197 struct kref ref;
@@ -215,11 +208,6 @@ struct host1x_job {
215 struct host1x_job_gather *gathers; 208 struct host1x_job_gather *gathers;
216 unsigned int num_gathers; 209 unsigned int num_gathers;
217 210
218 /* Wait checks to be processed at submit time */
219 struct host1x_waitchk *waitchk;
220 unsigned int num_waitchk;
221 u32 waitchk_mask;
222
223 /* Array of handles to be pinned & unpinned */ 211 /* Array of handles to be pinned & unpinned */
224 struct host1x_reloc *relocarray; 212 struct host1x_reloc *relocarray;
225 unsigned int num_relocs; 213 unsigned int num_relocs;
@@ -261,8 +249,7 @@ struct host1x_job {
261}; 249};
262 250
263struct host1x_job *host1x_job_alloc(struct host1x_channel *ch, 251struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
264 u32 num_cmdbufs, u32 num_relocs, 252 u32 num_cmdbufs, u32 num_relocs);
265 u32 num_waitchks);
266void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *mem_id, 253void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *mem_id,
267 u32 words, u32 offset); 254 u32 words, u32 offset);
268struct host1x_job *host1x_job_get(struct host1x_job *job); 255struct host1x_job *host1x_job_get(struct host1x_job *job);
diff --git a/include/trace/events/host1x.h b/include/trace/events/host1x.h
index 63116362543c..a37ef73092e5 100644
--- a/include/trace/events/host1x.h
+++ b/include/trace/events/host1x.h
@@ -115,16 +115,15 @@ TRACE_EVENT(host1x_cdma_push_gather,
115); 115);
116 116
117TRACE_EVENT(host1x_channel_submit, 117TRACE_EVENT(host1x_channel_submit,
118 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 waitchks, 118 TP_PROTO(const char *name, u32 cmdbufs, u32 relocs, u32 syncpt_id,
119 u32 syncpt_id, u32 syncpt_incrs), 119 u32 syncpt_incrs),
120 120
121 TP_ARGS(name, cmdbufs, relocs, waitchks, syncpt_id, syncpt_incrs), 121 TP_ARGS(name, cmdbufs, relocs, syncpt_id, syncpt_incrs),
122 122
123 TP_STRUCT__entry( 123 TP_STRUCT__entry(
124 __field(const char *, name) 124 __field(const char *, name)
125 __field(u32, cmdbufs) 125 __field(u32, cmdbufs)
126 __field(u32, relocs) 126 __field(u32, relocs)
127 __field(u32, waitchks)
128 __field(u32, syncpt_id) 127 __field(u32, syncpt_id)
129 __field(u32, syncpt_incrs) 128 __field(u32, syncpt_incrs)
130 ), 129 ),
@@ -133,15 +132,14 @@ TRACE_EVENT(host1x_channel_submit,
133 __entry->name = name; 132 __entry->name = name;
134 __entry->cmdbufs = cmdbufs; 133 __entry->cmdbufs = cmdbufs;
135 __entry->relocs = relocs; 134 __entry->relocs = relocs;
136 __entry->waitchks = waitchks;
137 __entry->syncpt_id = syncpt_id; 135 __entry->syncpt_id = syncpt_id;
138 __entry->syncpt_incrs = syncpt_incrs; 136 __entry->syncpt_incrs = syncpt_incrs;
139 ), 137 ),
140 138
141 TP_printk("name=%s, cmdbufs=%u, relocs=%u, waitchks=%d," 139 TP_printk("name=%s, cmdbufs=%u, relocs=%u, syncpt_id=%u, "
142 "syncpt_id=%u, syncpt_incrs=%u", 140 "syncpt_incrs=%u",
143 __entry->name, __entry->cmdbufs, __entry->relocs, __entry->waitchks, 141 __entry->name, __entry->cmdbufs, __entry->relocs,
144 __entry->syncpt_id, __entry->syncpt_incrs) 142 __entry->syncpt_id, __entry->syncpt_incrs)
145); 143);
146 144
147TRACE_EVENT(host1x_channel_submitted, 145TRACE_EVENT(host1x_channel_submitted,