summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJayarami Reddy <jayarami.reddy@stericsson.com>2011-11-09 18:25:04 +0530
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:19 +0200
commitfd2a8b5b96aab13387a6cc0f8c3ad598be0a5783 (patch)
tree9a3cdfd7facc5e04990719fe9829cbb3bbbd337b
parentfdf669e16c492c38dba87263755e0e0077d6f0bd (diff)
video: mcde: Configure the correct output fifosize
Configure the correct output fifosize to avoid underflow and fix display overlap issue for u5500. ST-Ericsson ID: 366427 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I5cacd1728fa9067568be8d6a9ed0e744055546e7 Signed-off-by: Jayarami Reddy <jayarami.reddy@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/37183 Reviewed-by: QATOOLS Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com> Reviewed-by: QABUILD Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
-rw-r--r--drivers/video/mcde/mcde_hw.c17
-rw-r--r--include/video/mcde.h3
2 files changed, 11 insertions, 9 deletions
diff --git a/drivers/video/mcde/mcde_hw.c b/drivers/video/mcde/mcde_hw.c
index 0baffc246d7..efec33c1a8f 100644
--- a/drivers/video/mcde/mcde_hw.c
+++ b/drivers/video/mcde/mcde_hw.c
@@ -75,7 +75,7 @@ static void wait_for_flow_disabled(struct mcde_chnl_state *chnl);
#define OVLY_TIMEOUT 100
#define CHNL_TIMEOUT 100
#define FLOW_STOP_TIMEOUT 20
-#define SCREEN_PPL_HIGH 1920
+#define SCREEN_PPL_HIGH 1280
#define SCREEN_PPL_CEA2 720
#define SCREEN_LPF_CEA2 480
#define DSI_DELAY0_CEA2_ADD 10
@@ -103,6 +103,8 @@ static u8 num_channels;
static u8 num_overlays;
static int mcde_irq;
static u32 input_fifo_size;
+static u32 output_fifo_ab_size;
+static u32 output_fifo_c0c1_size;
static struct regulator *regulator_vana;
static struct regulator *regulator_mcde_epod;
@@ -718,11 +720,11 @@ static u32 get_output_fifo_size(enum mcde_fifo fifo)
switch (fifo) {
case MCDE_FIFO_A:
case MCDE_FIFO_B:
- ret = MCDE_FIFO_AB_SIZE;
+ ret = output_fifo_ab_size;
break;
case MCDE_FIFO_C0:
case MCDE_FIFO_C1:
- ret = MCDE_FIFO_C0C1_SIZE;
+ ret = output_fifo_c0c1_size;
break;
default:
dev_warn(&mcde_dev->dev, "Unsupported fifo");
@@ -1318,10 +1320,8 @@ static void update_overlay_registers(u8 idx, struct ovly_regs *regs,
ljinc *= 2;
}
- fifo_size = get_output_fifo_size(fifo);
-
if ((fifo == MCDE_FIFO_A || fifo == MCDE_FIFO_B) &&
- regs->ppl >= fifo_size * 2)
+ regs->ppl >= SCREEN_PPL_HIGH)
pixelfetchwtrmrklevel = input_fifo_size * 2;
else
pixelfetchwtrmrklevel = input_fifo_size / 2;
@@ -3272,6 +3272,8 @@ static int probe_hw(struct platform_device *pdev)
num_overlays = 6;
dsi_ifc_is_supported = true;
input_fifo_size = 128;
+ output_fifo_ab_size = 640;
+ output_fifo_c0c1_size = 160;
dev_info(&mcde_dev->dev, "db8500 V2 HW\n");
break;
case MCDE_VERSION_4_0_4:
@@ -3279,6 +3281,7 @@ static int probe_hw(struct platform_device *pdev)
num_channels = 2;
num_overlays = 3;
input_fifo_size = 80;
+ output_fifo_ab_size = 320;
dsi_ifc_is_supported = false;
dev_info(&mcde_dev->dev, "db5500 V2 HW\n");
break;
@@ -3288,6 +3291,8 @@ static int probe_hw(struct platform_device *pdev)
num_overlays = 6;
dsi_ifc_is_supported = true;
input_fifo_size = 192;
+ output_fifo_ab_size = 640;
+ output_fifo_c0c1_size = 160;
dev_info(&mcde_dev->dev, "db9540 V1 HW\n");
break;
case MCDE_VERSION_3_0_5:
diff --git a/include/video/mcde.h b/include/video/mcde.h
index 8e1c772fdaa..39b190c6403 100644
--- a/include/video/mcde.h
+++ b/include/video/mcde.h
@@ -187,9 +187,6 @@ enum mcde_display_rotation {
#define MCDE_BUF_START_ALIGMENT 8
#define MCDE_BUF_LINE_ALIGMENT 8
-#define MCDE_FIFO_AB_SIZE 640
-#define MCDE_FIFO_C0C1_SIZE 160
-
/* Tv-out defines */
#define MCDE_CONFIG_TVOUT_BACKGROUND_LUMINANCE 0x83
#define MCDE_CONFIG_TVOUT_BACKGROUND_CHROMINANCE_CB 0x9C