diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/dsi.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c index 4fdb628427e0..b38974523d48 100644 --- a/drivers/video/omap2/dss/dsi.c +++ b/drivers/video/omap2/dss/dsi.c | |||
@@ -309,6 +309,11 @@ void dsi_bus_unlock(void) | |||
309 | } | 309 | } |
310 | EXPORT_SYMBOL(dsi_bus_unlock); | 310 | EXPORT_SYMBOL(dsi_bus_unlock); |
311 | 311 | ||
312 | static bool dsi_bus_is_locked(void) | ||
313 | { | ||
314 | return mutex_is_locked(&dsi.bus_lock); | ||
315 | } | ||
316 | |||
312 | static inline int wait_for_bit_change(const struct dsi_reg idx, int bitnum, | 317 | static inline int wait_for_bit_change(const struct dsi_reg idx, int bitnum, |
313 | int value) | 318 | int value) |
314 | { | 319 | { |
@@ -1959,7 +1964,7 @@ static int dsi_vc_send_bta(int channel) | |||
1959 | (dsi.debug_write || dsi.debug_read)) | 1964 | (dsi.debug_write || dsi.debug_read)) |
1960 | DSSDBG("dsi_vc_send_bta %d\n", channel); | 1965 | DSSDBG("dsi_vc_send_bta %d\n", channel); |
1961 | 1966 | ||
1962 | WARN_ON(!mutex_is_locked(&dsi.bus_lock)); | 1967 | WARN_ON(!dsi_bus_is_locked()); |
1963 | 1968 | ||
1964 | if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */ | 1969 | if (REG_GET(DSI_VC_CTRL(channel), 20, 20)) { /* RX_FIFO_NOT_EMPTY */ |
1965 | DSSERR("rx fifo not empty when sending BTA, dumping data:\n"); | 1970 | DSSERR("rx fifo not empty when sending BTA, dumping data:\n"); |
@@ -2010,7 +2015,7 @@ static inline void dsi_vc_write_long_header(int channel, u8 data_type, | |||
2010 | u32 val; | 2015 | u32 val; |
2011 | u8 data_id; | 2016 | u8 data_id; |
2012 | 2017 | ||
2013 | WARN_ON(!mutex_is_locked(&dsi.bus_lock)); | 2018 | WARN_ON(!dsi_bus_is_locked()); |
2014 | 2019 | ||
2015 | /*data_id = data_type | channel << 6; */ | 2020 | /*data_id = data_type | channel << 6; */ |
2016 | data_id = data_type | dsi.vc[channel].dest_per << 6; | 2021 | data_id = data_type | dsi.vc[channel].dest_per << 6; |
@@ -2105,7 +2110,7 @@ static int dsi_vc_send_short(int channel, u8 data_type, u16 data, u8 ecc) | |||
2105 | u32 r; | 2110 | u32 r; |
2106 | u8 data_id; | 2111 | u8 data_id; |
2107 | 2112 | ||
2108 | WARN_ON(!mutex_is_locked(&dsi.bus_lock)); | 2113 | WARN_ON(!dsi_bus_is_locked()); |
2109 | 2114 | ||
2110 | if (dsi.debug_write) | 2115 | if (dsi.debug_write) |
2111 | DSSDBG("dsi_vc_send_short(ch%d, dt %#x, b1 %#x, b2 %#x)\n", | 2116 | DSSDBG("dsi_vc_send_short(ch%d, dt %#x, b1 %#x, b2 %#x)\n", |
@@ -2895,7 +2900,7 @@ static int dsi_set_update_mode(struct omap_dss_device *dssdev, | |||
2895 | int r = 0; | 2900 | int r = 0; |
2896 | int i; | 2901 | int i; |
2897 | 2902 | ||
2898 | WARN_ON(!mutex_is_locked(&dsi.bus_lock)); | 2903 | WARN_ON(!dsi_bus_is_locked()); |
2899 | 2904 | ||
2900 | if (dsi.update_mode != mode) { | 2905 | if (dsi.update_mode != mode) { |
2901 | dsi.update_mode = mode; | 2906 | dsi.update_mode = mode; |