Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284834
b: refs/heads/master
c: a2e6297
h: refs/heads/master
v: v3
  • Loading branch information
Kuninori Morimoto authored and Florian Tobias Schandinat committed Nov 21, 2011
1 parent 4e03f27 commit 9d2827a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 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: 5e47431aabf716c9ad9eacf1a966e1fc1469c809
refs/heads/master: a2e6297153f8fc7185d119c59d8eed1ee7d4c74f
5 changes: 3 additions & 2 deletions trunk/arch/arm/mach-shmobile/board-ag5evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,9 @@ static struct sh_mipi_dsi_info mipidsi0_info = {
.lane = 2,
.vsynw_offset = 20,
.clksrc = 1,
.flags = SH_MIPI_DSI_HSABM |
SH_MIPI_DSI_SYNC_PULSES_MODE,
.flags = SH_MIPI_DSI_HSABM |
SH_MIPI_DSI_SYNC_PULSES_MODE |
SH_MIPI_DSI_HSbyteCLK,
.set_dot_clock = sh_mipi_set_dot_clock,
};

Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,8 @@ static struct sh_mipi_dsi_info mipidsi0_info = {
.lcd_chan = &lcdc_info.ch[0],
.lane = 2,
.vsynw_offset = 17,
.flags = SH_MIPI_DSI_SYNC_PULSES_MODE,
.flags = SH_MIPI_DSI_SYNC_PULSES_MODE |
SH_MIPI_DSI_HSbyteCLK,
.set_dot_clock = sh_mipi_set_dot_clock,
};

Expand Down
14 changes: 10 additions & 4 deletions trunk/drivers/video/sh_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
void __iomem *base = mipi->base;
struct sh_mobile_lcdc_chan_cfg *ch = pdata->lcd_chan;
u32 pctype, datatype, pixfmt, linelength, vmctr2;
u32 tmp, top, bottom, delay;
u32 tmp, top, bottom, delay, div;
bool yuv;
int bpp;

Expand Down Expand Up @@ -364,17 +364,23 @@ static int __init sh_mipi_setup(struct sh_mipi *mipi,
bottom = 0x00000001;
delay = 0;

div = 1; /* HSbyteCLK is calculation base
* HS4divCLK = HSbyteCLK/2
* HS6divCLK is not supported for now */
if (pdata->flags & SH_MIPI_DSI_HS4divCLK)
div = 2;

if (pdata->flags & SH_MIPI_DSI_HFPBM) { /* HBPLEN */
top = ch->lcd_cfg[0].hsync_len + ch->lcd_cfg[0].left_margin;
top = ((pdata->lane * top) - 10) << 16;
top = ((pdata->lane * top / div) - 10) << 16;
}
if (pdata->flags & SH_MIPI_DSI_HBPBM) { /* HFPLEN */
bottom = ch->lcd_cfg[0].right_margin;
bottom = (pdata->lane * bottom) - 12;
bottom = (pdata->lane * bottom / div) - 12;
}

bpp = linelength / ch->lcd_cfg[0].xres; /* byte / pixel */
if (pdata->lane > bpp) {
if ((pdata->lane / div) > bpp) {
tmp = ch->lcd_cfg[0].xres / bpp; /* output cycle */
tmp = ch->lcd_cfg[0].xres - tmp; /* (input - output) cycle */
delay = (pdata->lane * tmp);
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/video/sh_mipi_dsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ struct sh_mobile_lcdc_chan_cfg;
#define SH_MIPI_DSI_HSEE (1 << 5)
#define SH_MIPI_DSI_HSAE (1 << 6)

#define SH_MIPI_DSI_HSbyteCLK (1 << 24)
#define SH_MIPI_DSI_HS6divCLK (1 << 25)
#define SH_MIPI_DSI_HS4divCLK (1 << 26)

#define SH_MIPI_DSI_SYNC_PULSES_MODE (SH_MIPI_DSI_VSEE | \
SH_MIPI_DSI_HSEE | \
SH_MIPI_DSI_HSAE)
Expand Down

0 comments on commit 9d2827a

Please sign in to comment.