summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjorn Svensson <torbjorn.x.svensson@stericsson.com>2012-01-17 09:34:25 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:26 +0200
commit22a2dbf89186f2079f989e2b25e32856dc99492b (patch)
tree8e0157b72bcfc91116d819f098d9a81b34e9c301
parentebe29ef21682470fa88500777b19d88cb8e24c85 (diff)
video: mcde: enable rotbufsize
This patch enables rotbufsize by making the neccesary mcde_hw.c changes. ST-Ericsson ID: 373680 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Ia0ee39696199ccf01a65a473a685bf8d59cba379 Signed-off-by: Torbjorn Svensson <torbjorn.x.svensson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/45632 Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Tested-by: Jimmy RUBIN <jimmy.rubin@stericsson.com>
-rw-r--r--drivers/video/mcde/mcde_display.c3
-rw-r--r--drivers/video/mcde/mcde_hw.c11
-rw-r--r--include/video/mcde.h2
-rw-r--r--include/video/mcde_display.h4
4 files changed, 11 insertions, 9 deletions
diff --git a/drivers/video/mcde/mcde_display.c b/drivers/video/mcde/mcde_display.c
index bf8bd2ca92f..9e9eb78516e 100644
--- a/drivers/video/mcde/mcde_display.c
+++ b/drivers/video/mcde/mcde_display.c
@@ -214,8 +214,7 @@ static int mcde_display_set_rotation_default(struct mcde_display_device *ddev,
enum mcde_display_rotation final;
final = (360 + rotation - ddev->orientation) % 360;
- ret = mcde_chnl_set_rotation(ddev->chnl_state, final,
- ddev->rotbuf1, ddev->rotbuf2);
+ ret = mcde_chnl_set_rotation(ddev->chnl_state, final);
if (WARN_ON(ret))
return ret;
diff --git a/drivers/video/mcde/mcde_hw.c b/drivers/video/mcde/mcde_hw.c
index 220b6dcb8e9..afa53e90712 100644
--- a/drivers/video/mcde/mcde_hw.c
+++ b/drivers/video/mcde/mcde_hw.c
@@ -287,6 +287,7 @@ struct chnl_regs {
u8 rotdir;
u32 rotbuf1;
u32 rotbuf2;
+ u32 rotbufsize;
/* Blending */
u8 blend_ctrl;
@@ -368,6 +369,7 @@ struct mcde_chnl_state {
enum mcde_display_rotation rotation;
u32 rotbuf1;
u32 rotbuf2;
+ u32 rotbufsize;
struct mcde_col_transform rgb_2_ycbcr;
struct mcde_col_transform ycbcr_2_rgb;
@@ -2665,6 +2667,7 @@ static struct mcde_chnl_state *_mcde_chnl_get(enum mcde_chnl chnl_id,
{
int i;
struct mcde_chnl_state *chnl = NULL;
+ struct mcde_platform_data *pdata = mcde_dev->dev.platform_data;
static struct mcde_col_transform ycbcr_2_rgb = {
/* Note that in MCDE YUV 422 pixels come as VYU pixels */
@@ -2708,6 +2711,9 @@ static struct mcde_chnl_state *_mcde_chnl_get(enum mcde_chnl chnl_id,
chnl->blend_en = true;
chnl->blend_ctrl = MCDE_CRA0_BLENDCTRL_SOURCE;
chnl->alpha_blend = 0xFF;
+ chnl->rotbuf1 = pdata->rotbuf1;
+ chnl->rotbuf2 = pdata->rotbuf2;
+ chnl->rotbufsize = pdata->rotbufsize;
_mcde_chnl_apply(chnl);
chnl->reserved = true;
@@ -2761,6 +2767,7 @@ static int _mcde_chnl_apply(struct mcde_chnl_state *chnl)
chnl->regs.rotdir = rotdir;
chnl->regs.rotbuf1 = chnl->rotbuf1;
chnl->regs.rotbuf2 = chnl->rotbuf2;
+ chnl->regs.rotbufsize = chnl->rotbufsize;
chnl->regs.palette_enable = chnl->palette_enable;
chnl->regs.map_r = chnl->map_r;
chnl->regs.map_g = chnl->map_g;
@@ -3049,7 +3056,7 @@ int mcde_chnl_set_video_mode(struct mcde_chnl_state *chnl,
EXPORT_SYMBOL(mcde_chnl_set_video_mode);
int mcde_chnl_set_rotation(struct mcde_chnl_state *chnl,
- enum mcde_display_rotation rotation, u32 rotbuf1, u32 rotbuf2)
+ enum mcde_display_rotation rotation)
{
dev_vdbg(&mcde_dev->dev, "%s\n", __func__);
@@ -3062,8 +3069,6 @@ int mcde_chnl_set_rotation(struct mcde_chnl_state *chnl,
return -EINVAL;
chnl->rotation = rotation;
- chnl->rotbuf1 = rotbuf1;
- chnl->rotbuf2 = rotbuf2;
dev_vdbg(&mcde_dev->dev, "%s exit\n", __func__);
diff --git a/include/video/mcde.h b/include/video/mcde.h
index b9f6a6b55fd..499ce5cfecc 100644
--- a/include/video/mcde.h
+++ b/include/video/mcde.h
@@ -282,7 +282,7 @@ int mcde_chnl_set_video_mode(struct mcde_chnl_state *chnl,
struct mcde_video_mode *vmode);
/* TODO: Remove rotbuf* parameters when ESRAM allocator is implemented*/
int mcde_chnl_set_rotation(struct mcde_chnl_state *chnl,
- enum mcde_display_rotation rotation, u32 rotbuf1, u32 rotbuf2);
+ enum mcde_display_rotation rotation);
int mcde_chnl_set_power_mode(struct mcde_chnl_state *chnl,
enum mcde_display_power_mode power_mode);
diff --git a/include/video/mcde_display.h b/include/video/mcde_display.h
index 25a06aaae6b..5130b228d84 100644
--- a/include/video/mcde_display.h
+++ b/include/video/mcde_display.h
@@ -48,9 +48,7 @@ struct mcde_display_device {
struct mcde_chnl_state *chnl_state;
struct list_head ovlys;
struct mcde_rectangle update_area;
- /* TODO: Remove once ESRAM allocator is done */
- u32 rotbuf1;
- u32 rotbuf2;
+
/* Display driver internal */
u16 native_x_res;