diff options
Diffstat (limited to 'drivers/video/tegra/host/nvhost_intr.c')
-rw-r--r-- | drivers/video/tegra/host/nvhost_intr.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/video/tegra/host/nvhost_intr.c b/drivers/video/tegra/host/nvhost_intr.c index 7c4bdc7bafb6..ba821f694cb4 100644 --- a/drivers/video/tegra/host/nvhost_intr.c +++ b/drivers/video/tegra/host/nvhost_intr.c @@ -20,14 +20,13 @@ #include "nvhost_intr.h" #include "dev.h" +#include "nvhost_acm.h" #include <linux/interrupt.h> #include <linux/slab.h> #include <linux/irq.h> #include <trace/events/nvhost.h> - - - - +#include "nvhost_channel.h" +#include "nvhost_hwctx.h" /*** Wait list management ***/ @@ -116,11 +115,11 @@ void reset_threshold_interrupt(struct nvhost_intr *intr, { u32 thresh = list_first_entry(head, struct nvhost_waitlist, list)->thresh; - BUG_ON(!(intr_op(intr).set_syncpt_threshold && - intr_op(intr).enable_syncpt_intr)); + BUG_ON(!(intr_op().set_syncpt_threshold && + intr_op().enable_syncpt_intr)); - intr_op(intr).set_syncpt_threshold(intr, id, thresh); - intr_op(intr).enable_syncpt_intr(intr, id); + intr_op().set_syncpt_threshold(intr, id, thresh); + intr_op().enable_syncpt_intr(intr, id); } @@ -264,8 +263,8 @@ int nvhost_intr_add_action(struct nvhost_intr *intr, u32 id, u32 thresh, BUG_ON(waiter == NULL); - BUG_ON(!(intr_op(intr).set_syncpt_threshold && - intr_op(intr).enable_syncpt_intr)); + BUG_ON(!(intr_op().set_syncpt_threshold && + intr_op().enable_syncpt_intr)); /* initialize a new waiter */ INIT_LIST_HEAD(&waiter->list); @@ -288,8 +287,8 @@ int nvhost_intr_add_action(struct nvhost_intr *intr, u32 id, u32 thresh, spin_unlock(&syncpt->lock); mutex_lock(&intr->mutex); - BUG_ON(!(intr_op(intr).request_syncpt_irq)); - err = intr_op(intr).request_syncpt_irq(syncpt); + BUG_ON(!(intr_op().request_syncpt_irq)); + err = intr_op().request_syncpt_irq(syncpt); mutex_unlock(&intr->mutex); if (err) { @@ -304,11 +303,11 @@ int nvhost_intr_add_action(struct nvhost_intr *intr, u32 id, u32 thresh, if (add_waiter_to_queue(waiter, &syncpt->wait_head)) { /* added at head of list - new threshold value */ - intr_op(intr).set_syncpt_threshold(intr, id, thresh); + intr_op().set_syncpt_threshold(intr, id, thresh); /* added as first waiter - enable interrupt */ if (queue_was_empty) - intr_op(intr).enable_syncpt_intr(intr, id); + intr_op().enable_syncpt_intr(intr, id); } spin_unlock(&syncpt->lock); @@ -347,6 +346,7 @@ int nvhost_intr_init(struct nvhost_intr *intr, u32 irq_gen, u32 irq_sync) u32 nb_pts = host->syncpt.nb_pts; mutex_init(&intr->mutex); + intr_op().init_host_sync(intr); intr->host_general_irq = irq_gen; intr->host_general_irq_requested = false; @@ -374,17 +374,17 @@ void nvhost_intr_deinit(struct nvhost_intr *intr) void nvhost_intr_start(struct nvhost_intr *intr, u32 hz) { - BUG_ON(!(intr_op(intr).init_host_sync && - intr_op(intr).set_host_clocks_per_usec && - intr_op(intr).request_host_general_irq)); + BUG_ON(!(intr_op().init_host_sync && + intr_op().set_host_clocks_per_usec && + intr_op().request_host_general_irq)); mutex_lock(&intr->mutex); - intr_op(intr).init_host_sync(intr); - intr_op(intr).set_host_clocks_per_usec(intr, + intr_op().init_host_sync(intr); + intr_op().set_host_clocks_per_usec(intr, (hz + 1000000 - 1)/1000000); - intr_op(intr).request_host_general_irq(intr); + intr_op().request_host_general_irq(intr); mutex_unlock(&intr->mutex); } @@ -395,12 +395,12 @@ void nvhost_intr_stop(struct nvhost_intr *intr) struct nvhost_intr_syncpt *syncpt; u32 nb_pts = intr_to_dev(intr)->syncpt.nb_pts; - BUG_ON(!(intr_op(intr).disable_all_syncpt_intrs && - intr_op(intr).free_host_general_irq)); + BUG_ON(!(intr_op().disable_all_syncpt_intrs && + intr_op().free_host_general_irq)); mutex_lock(&intr->mutex); - intr_op(intr).disable_all_syncpt_intrs(intr); + intr_op().disable_all_syncpt_intrs(intr); for (id = 0, syncpt = intr->syncpt; id < nb_pts; @@ -422,7 +422,7 @@ void nvhost_intr_stop(struct nvhost_intr *intr) free_syncpt_irq(syncpt); } - intr_op(intr).free_host_general_irq(intr); + intr_op().free_host_general_irq(intr); mutex_unlock(&intr->mutex); } |