Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123944
b: refs/heads/master
c: 69bdea7
h: refs/heads/master
v: v3
  • Loading branch information
Eric Miao committed Dec 17, 2008
1 parent e155c5d commit dd3de98
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 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: c1f99c215c58111629984a49ba87b2b145dd1f5b
refs/heads/master: 69bdea7047fbac88beb8b7ba9e428c4f0e53f563
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-pxa/include/mach/regs-lcd.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,4 +177,11 @@

#define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
#define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))

/* SMART_DELAY() is introduced for software controlled delay primitive which
* can be inserted between command sequences, unused command 0x6 is used here
* and delay ranges from 0ms ~ 255ms
*/
#define SMART_CMD_DELAY (0x6 << 9)
#define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))
#endif /* __ASM_ARCH_REGS_LCD_H */
13 changes: 10 additions & 3 deletions trunk/drivers/video/pxafb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dd3de98

Please sign in to comment.