aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/host1x/hw/channel_hw.c2
-rw-r--r--drivers/gpu/host1x/intr.c14
-rw-r--r--drivers/gpu/host1x/intr.h8
-rw-r--r--drivers/gpu/host1x/syncpt.c2
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c
index 4c9555038a95..d188f9068b91 100644
--- a/drivers/gpu/host1x/hw/channel_hw.c
+++ b/drivers/gpu/host1x/hw/channel_hw.c
@@ -164,7 +164,7 @@ static int channel_submit(struct host1x_job *job)
164 trace_host1x_channel_submitted(dev_name(ch->dev), prev_max, syncval); 164 trace_host1x_channel_submitted(dev_name(ch->dev), prev_max, syncval);
165 165
166 /* schedule a submit complete interrupt */ 166 /* schedule a submit complete interrupt */
167 err = host1x_intr_add_action(host, job->syncpt_id, syncval, 167 err = host1x_intr_add_action(host, sp, syncval,
168 HOST1X_INTR_ACTION_SUBMIT_COMPLETE, ch, 168 HOST1X_INTR_ACTION_SUBMIT_COMPLETE, ch,
169 completed_waiter, NULL); 169 completed_waiter, NULL);
170 completed_waiter = NULL; 170 completed_waiter = NULL;
diff --git a/drivers/gpu/host1x/intr.c b/drivers/gpu/host1x/intr.c
index 6028cf7b681f..9629c009d10f 100644
--- a/drivers/gpu/host1x/intr.c
+++ b/drivers/gpu/host1x/intr.c
@@ -211,11 +211,11 @@ static void syncpt_thresh_work(struct work_struct *work)
211 host1x_syncpt_load(host->syncpt + id)); 211 host1x_syncpt_load(host->syncpt + id));
212} 212}
213 213
214int host1x_intr_add_action(struct host1x *host, unsigned int id, u32 thresh, 214int host1x_intr_add_action(struct host1x *host, struct host1x_syncpt *syncpt,
215 enum host1x_intr_action action, void *data, 215 u32 thresh, enum host1x_intr_action action,
216 struct host1x_waitlist *waiter, void **ref) 216 void *data, struct host1x_waitlist *waiter,
217 void **ref)
217{ 218{
218 struct host1x_syncpt *syncpt;
219 int queue_was_empty; 219 int queue_was_empty;
220 220
221 if (waiter == NULL) { 221 if (waiter == NULL) {
@@ -234,19 +234,17 @@ int host1x_intr_add_action(struct host1x *host, unsigned int id, u32 thresh,
234 waiter->data = data; 234 waiter->data = data;
235 waiter->count = 1; 235 waiter->count = 1;
236 236
237 syncpt = host->syncpt + id;
238
239 spin_lock(&syncpt->intr.lock); 237 spin_lock(&syncpt->intr.lock);
240 238
241 queue_was_empty = list_empty(&syncpt->intr.wait_head); 239 queue_was_empty = list_empty(&syncpt->intr.wait_head);
242 240
243 if (add_waiter_to_queue(waiter, &syncpt->intr.wait_head)) { 241 if (add_waiter_to_queue(waiter, &syncpt->intr.wait_head)) {
244 /* added at head of list - new threshold value */ 242 /* added at head of list - new threshold value */
245 host1x_hw_intr_set_syncpt_threshold(host, id, thresh); 243 host1x_hw_intr_set_syncpt_threshold(host, syncpt->id, thresh);
246 244
247 /* added as first waiter - enable interrupt */ 245 /* added as first waiter - enable interrupt */
248 if (queue_was_empty) 246 if (queue_was_empty)
249 host1x_hw_intr_enable_syncpt_intr(host, id); 247 host1x_hw_intr_enable_syncpt_intr(host, syncpt->id);
250 } 248 }
251 249
252 spin_unlock(&syncpt->intr.lock); 250 spin_unlock(&syncpt->intr.lock);
diff --git a/drivers/gpu/host1x/intr.h b/drivers/gpu/host1x/intr.h
index 1370c2bb75b8..6db96af484fe 100644
--- a/drivers/gpu/host1x/intr.h
+++ b/drivers/gpu/host1x/intr.h
@@ -22,6 +22,7 @@
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/workqueue.h> 23#include <linux/workqueue.h>
24 24
25struct host1x_syncpt;
25struct host1x; 26struct host1x;
26 27
27enum host1x_intr_action { 28enum host1x_intr_action {
@@ -75,9 +76,10 @@ struct host1x_waitlist {
75 * 76 *
76 * This is a non-blocking api. 77 * This is a non-blocking api.
77 */ 78 */
78int host1x_intr_add_action(struct host1x *host, unsigned int id, u32 thresh, 79int host1x_intr_add_action(struct host1x *host, struct host1x_syncpt *syncpt,
79 enum host1x_intr_action action, void *data, 80 u32 thresh, enum host1x_intr_action action,
80 struct host1x_waitlist *waiter, void **ref); 81 void *data, struct host1x_waitlist *waiter,
82 void **ref);
81 83
82/* 84/*
83 * Unreference an action submitted to host1x_intr_add_action(). 85 * Unreference an action submitted to host1x_intr_add_action().
diff --git a/drivers/gpu/host1x/syncpt.c b/drivers/gpu/host1x/syncpt.c
index 088c05dd884c..a5dbf1ba4645 100644
--- a/drivers/gpu/host1x/syncpt.c
+++ b/drivers/gpu/host1x/syncpt.c
@@ -255,7 +255,7 @@ int host1x_syncpt_wait(struct host1x_syncpt *sp, u32 thresh, long timeout,
255 } 255 }
256 256
257 /* schedule a wakeup when the syncpoint value is reached */ 257 /* schedule a wakeup when the syncpoint value is reached */
258 err = host1x_intr_add_action(sp->host, sp->id, thresh, 258 err = host1x_intr_add_action(sp->host, sp, thresh,
259 HOST1X_INTR_ACTION_WAKEUP_INTERRUPTIBLE, 259 HOST1X_INTR_ACTION_WAKEUP_INTERRUPTIBLE,
260 &wq, waiter, &ref); 260 &wq, waiter, &ref);
261 if (err) 261 if (err)