Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344685
b: refs/heads/master
c: 549acbe
h: refs/heads/master
i:
  344683: 019140b
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 7, 2012
1 parent 4205eb7 commit 5a987df
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 62 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bb39813413db782cc77b94d55cb5d044f42079df
refs/heads/master: 549acbe7a3380dd3bd2ac71698549148ecc0d17e
30 changes: 30 additions & 0 deletions trunk/drivers/video/omap2/dss/dispc-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,33 @@ void dispc_mgr_disable_sync(enum omap_channel channel)
WARN_ON(1);
}

int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
unsigned long timeout)
{
void dispc_irq_wait_handler(void *data, u32 mask)
{
complete((struct completion *)data);
}

int r;
DECLARE_COMPLETION_ONSTACK(completion);

r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
irqmask);

if (r)
return r;

timeout = wait_for_completion_interruptible_timeout(&completion,
timeout);

omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);

if (timeout == 0)
return -ETIMEDOUT;

if (timeout == -ERESTARTSYS)
return -ERESTARTSYS;

return 0;
}
3 changes: 3 additions & 0 deletions trunk/drivers/video/omap2/dss/dispc-compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@
void dispc_mgr_enable_sync(enum omap_channel channel);
void dispc_mgr_disable_sync(enum omap_channel channel);

int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
unsigned long timeout);

#endif
57 changes: 0 additions & 57 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3750,63 +3750,6 @@ static void dispc_error_worker(struct work_struct *work)
dispc_runtime_put();
}

int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout)
{
void dispc_irq_wait_handler(void *data, u32 mask)
{
complete((struct completion *)data);
}

int r;
DECLARE_COMPLETION_ONSTACK(completion);

r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
irqmask);

if (r)
return r;

timeout = wait_for_completion_timeout(&completion, timeout);

omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);

if (timeout == 0)
return -ETIMEDOUT;

return 0;
}

int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
unsigned long timeout)
{
void dispc_irq_wait_handler(void *data, u32 mask)
{
complete((struct completion *)data);
}

int r;
DECLARE_COMPLETION_ONSTACK(completion);

r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion,
irqmask);

if (r)
return r;

timeout = wait_for_completion_interruptible_timeout(&completion,
timeout);

omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask);

if (timeout == 0)
return -ETIMEDOUT;

if (timeout == -ERESTARTSYS)
return -ERESTARTSYS;

return 0;
}

static void _omap_dispc_initialize_irq(void)
{
unsigned long flags;
Expand Down
4 changes: 0 additions & 4 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,10 +775,6 @@ typedef void (*omap_dispc_isr_t) (void *arg, u32 mask);
int omap_dispc_register_isr(omap_dispc_isr_t isr, void *arg, u32 mask);
int omap_dispc_unregister_isr(omap_dispc_isr_t isr, void *arg, u32 mask);

int omap_dispc_wait_for_irq_timeout(u32 irqmask, unsigned long timeout);
int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask,
unsigned long timeout);

#define to_dss_driver(x) container_of((x), struct omap_dss_driver, driver)
#define to_dss_device(x) container_of((x), struct omap_dss_device, dev)

Expand Down

0 comments on commit 5a987df

Please sign in to comment.