diff options
| author | Jayarami Reddy <jayarami.reddy@stericsson.com> | 2011-09-26 11:19:49 +0530 |
|---|---|---|
| committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-09-26 11:38:21 +0200 |
| commit | acd9a97a9e1b84afeeb72de9495e50e2708eef8b (patch) | |
| tree | 472217e80d7a554a35475e28d7d5005368081879 /drivers/video | |
| parent | b73bd297f5c2709b50ea2347ca5121c140da2156 (diff) | |
video: mcde: fix pixelwatermarklevel
In order to avoid mcde underflow, the pixelwatermarklevel
is set based on mcde hardware version.
ST-Ericsson ID: 351086
ST-Ericsson Linux next: Not tested, ER 282779
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: Jayarami Reddy <jayarami.reddy@stericsson.com>
Change-Id: Ida63433629f84409c4c7c45c63dca4872fc1106a
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/31937
Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com>
Reviewed-by: Anders BAUER <anders.bauer@stericsson.com>
Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/mcde/mcde_hw.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/video/mcde/mcde_hw.c b/drivers/video/mcde/mcde_hw.c index 5cdf4be73a6..320b53f51c9 100644 --- a/drivers/video/mcde/mcde_hw.c +++ b/drivers/video/mcde/mcde_hw.c @@ -841,6 +841,15 @@ static u8 portfmt2cdwin(enum mcde_port_pix_fmt pix_fmt) } } +static u32 get_input_fifo_size(void) +{ + if (hardware_version == MCDE_CHIP_VERSION_1_0_4 || + hardware_version == MCDE_CHIP_VERSION_4_0_4) + return MCDE_INPUT_FIFO_SIZE_4_0_4; + else + return MCDE_INPUT_FIFO_SIZE_3_0_8; +} + static u32 get_output_fifo_size(enum mcde_fifo fifo) { u32 ret = 1; /* Avoid div by zero */ @@ -1477,9 +1486,9 @@ static void update_overlay_registers(u8 idx, struct ovly_regs *regs, if ((fifo == MCDE_FIFO_A || fifo == MCDE_FIFO_B) && regs->ppl >= fifo_size * 2) - pixelfetchwtrmrklevel = MCDE_PIXFETCH_LARGE_WTRMRKLVL; + pixelfetchwtrmrklevel = get_input_fifo_size() * 2; else - pixelfetchwtrmrklevel = MCDE_PIXFETCH_MEDIUM_WTRMRKLVL; + pixelfetchwtrmrklevel = get_input_fifo_size() / 2; if (port->update_auto_trig && port->type == MCDE_PORTTYPE_DSI) { switch (port->sync_src) { |
