Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251072
b: refs/heads/master
c: 773139f
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed May 12, 2011
1 parent 670aed2 commit 38f2a26
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c96c92d893e28d8b8b3161ffb6c3cf0847aaf478
refs/heads/master: 773139f1759f9dc5efe2c314df9aad88b7364015
16 changes: 16 additions & 0 deletions trunk/drivers/video/omap2/dss/rfbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/ktime.h>
#include <linux/hrtimer.h>
#include <linux/seq_file.h>
#include <linux/semaphore.h>

#include <video/omapdss.h>
#include "dss.h"
Expand Down Expand Up @@ -119,6 +120,8 @@ static struct {
struct completion cmd_done;
atomic_t cmd_fifo_full;
atomic_t cmd_pending;

struct semaphore bus_lock;
} rfbi;

struct update_region {
Expand Down Expand Up @@ -146,6 +149,18 @@ static void rfbi_enable_clocks(bool enable)
dss_clk_disable(DSS_CLK_ICK | DSS_CLK_FCK);
}

void rfbi_bus_lock(void)
{
down(&rfbi.bus_lock);
}
EXPORT_SYMBOL(rfbi_bus_lock);

void rfbi_bus_unlock(void)
{
up(&rfbi.bus_lock);
}
EXPORT_SYMBOL(rfbi_bus_unlock);

void omap_rfbi_write_command(const void *buf, u32 len)
{
rfbi_enable_clocks(1);
Expand Down Expand Up @@ -1022,6 +1037,7 @@ static int omap_rfbihw_probe(struct platform_device *pdev)
rfbi.pdev = pdev;

spin_lock_init(&rfbi.cmd_lock);
sema_init(&rfbi.bus_lock, 1);

init_completion(&rfbi.cmd_done);
atomic_set(&rfbi.cmd_fifo_full, 0);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ int omap_rfbi_enable_te(bool enable, unsigned line);
int omap_rfbi_setup_te(enum omap_rfbi_te_mode mode,
unsigned hs_pulse_time, unsigned vs_pulse_time,
int hs_pol_inv, int vs_pol_inv, int extif_div);
void rfbi_bus_lock(void);
void rfbi_bus_unlock(void);

/* DSI */
void dsi_bus_lock(struct omap_dss_device *dssdev);
Expand Down

0 comments on commit 38f2a26

Please sign in to comment.