summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-12-08 18:46:00 +0800
committerEric Miao <eric.miao@marvell.com>2008-12-17 22:50:52 +0800
commit69bdea7047fbac88beb8b7ba9e428c4f0e53f563 (patch)
treedb4b378ef239087317cd0b4f8ba4c9d7ed8d638a /drivers/video
parentc1f99c215c58111629984a49ba87b2b145dd1f5b (diff)
downloadlinux-69bdea7047fbac88beb8b7ba9e428c4f0e53f563.tar.gz
linux-69bdea7047fbac88beb8b7ba9e428c4f0e53f563.tar.bz2
linux-69bdea7047fbac88beb8b7ba9e428c4f0e53f563.zip
[ARM] pxafb: allow insertion of delay to the smart panel command sequence
Some smart panel requires a delay between command sequences, while PXA LCD controller didn't provide such one, let's emulate this by software. A software delay marker can be inserted into the command sequence, once pxafb_smart_queue() detects this, it flushes the previous commands and delay for a specified number of milliseconds. Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/pxafb.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index d6de84b42036..1e1c4ec0d3b9 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -723,12 +723,19 @@ int pxafb_smart_queue(struct fb_info *info, uint16_t *cmds, int n_cmds)
int i;
struct pxafb_info *fbi = container_of(info, struct pxafb_info, fb);
- /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */
- for (i = 0; i < n_cmds; i++) {
+ for (i = 0; i < n_cmds; i++, cmds++) {
+ /* if it is a software delay, flush and delay */
+ if ((*cmds & 0xff00) == SMART_CMD_DELAY) {
+ pxafb_smart_flush(info);
+ mdelay(*cmds & 0xff);
+ continue;
+ }
+
+ /* leave 2 commands for INTERRUPT and WAIT_FOR_SYNC */
if (fbi->n_smart_cmds == CMD_BUFF_SIZE - 8)
pxafb_smart_flush(info);
- fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds++;
+ fbi->smart_cmds[fbi->n_smart_cmds++] = *cmds;
}
return 0;