summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorAnders Bauer <anders.bauer@stericsson.com>2011-12-16 13:13:47 +0100
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-22 11:04:26 +0200
commit51da222046dff73d3b221b9a8bc72dbe7eb77013 (patch)
tree12d2fc48055b09aaa8c29d397dd6f24ddc30ab8a /drivers/video
parent6f99b48c3f644ce08db9b8cbd62a87f39da42707 (diff)
video: mcde: remove synchronized_update
The SET_TEAR_ON command is sent in display driver file which makes the set_synchronized_update function unnecessary and hence it is removed. ST-Ericsson ID: 405619 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id: Ie00000290ffb95ad490ba8c13d3eeb576fc8681e Signed-off-by: Anders Bauer <anders.bauer@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/43219 Reviewed-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Tested-by: Jimmy RUBIN <jimmy.rubin@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Per PERSSON <per.xb.persson@stericsson.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/mcde/display-generic_dsi.c2
-rw-r--r--drivers/video/mcde/display-sony_acx424akp_dsi.c2
-rw-r--r--drivers/video/mcde/mcde_display.c43
-rw-r--r--drivers/video/mcde/mcde_dss.c47
-rw-r--r--drivers/video/mcde/mcde_hw.c37
5 files changed, 11 insertions, 120 deletions
diff --git a/drivers/video/mcde/display-generic_dsi.c b/drivers/video/mcde/display-generic_dsi.c
index 6c63f4cd750..dfbaa4a8765 100644
--- a/drivers/video/mcde/display-generic_dsi.c
+++ b/drivers/video/mcde/display-generic_dsi.c
@@ -254,8 +254,6 @@ static int generic_resume(struct mcde_display_device *ddev)
if (ret < 0)
dev_warn(&ddev->dev, "%s:Failed to resume display\n"
, __func__);
- ddev->set_synchronized_update(ddev,
- ddev->get_synchronized_update(ddev));
return ret;
}
diff --git a/drivers/video/mcde/display-sony_acx424akp_dsi.c b/drivers/video/mcde/display-sony_acx424akp_dsi.c
index 5a027203e9a..78b1477c15c 100644
--- a/drivers/video/mcde/display-sony_acx424akp_dsi.c
+++ b/drivers/video/mcde/display-sony_acx424akp_dsi.c
@@ -368,8 +368,6 @@ static int sony_acx424akp_resume(struct mcde_display_device *ddev)
if (ret < 0)
dev_warn(&ddev->dev, "%s:Failed to resume display\n"
, __func__);
- ddev->set_synchronized_update(ddev,
- ddev->get_synchronized_update(ddev));
return ret;
}
diff --git a/drivers/video/mcde/mcde_display.c b/drivers/video/mcde/mcde_display.c
index 1e71514ab34..bf8bd2ca92f 100644
--- a/drivers/video/mcde/mcde_display.c
+++ b/drivers/video/mcde/mcde_display.c
@@ -236,49 +236,10 @@ static inline enum mcde_display_rotation mcde_display_get_rotation_default(
return ddev->rotation;
}
-static int mcde_display_set_synchronized_update_default(
- struct mcde_display_device *ddev, bool enable)
-{
- if (ddev->port->type == MCDE_PORTTYPE_DSI && enable) {
- int ret;
- u8 m = 0;
-
- if (ddev->port->sync_src == MCDE_SYNCSRC_OFF)
- return -EINVAL;
-
- ret = mcde_dsi_dcs_write(ddev->chnl_state,
- DCS_CMD_SET_TEAR_ON, &m, 1);
- if (ret < 0) {
- dev_warn(&ddev->dev,
- "%s:Failed to set synchornized update = %d\n",
- __func__, enable);
- return ret;
- }
- }
- ddev->synchronized_update = enable;
- return 0;
-}
-
-static inline bool mcde_display_get_synchronized_update_default(
- struct mcde_display_device *ddev)
-{
- return ddev->synchronized_update;
-}
-
static int mcde_display_apply_config_default(struct mcde_display_device *ddev)
{
int ret;
- ret = mcde_chnl_enable_synchronized_update(ddev->chnl_state,
- ddev->synchronized_update);
-
- if (ret < 0) {
- dev_warn(&ddev->dev,
- "%s:Failed to enable synchronized update\n",
- __func__);
- return ret;
- }
-
if (!ddev->update_flags)
return 0;
@@ -396,10 +357,6 @@ void mcde_display_init_device(struct mcde_display_device *ddev)
ddev->get_pixel_format = mcde_display_get_pixel_format_default;
ddev->set_rotation = mcde_display_set_rotation_default;
ddev->get_rotation = mcde_display_get_rotation_default;
- ddev->set_synchronized_update =
- mcde_display_set_synchronized_update_default;
- ddev->get_synchronized_update =
- mcde_display_get_synchronized_update_default;
ddev->apply_config = mcde_display_apply_config_default;
ddev->invalidate_area = mcde_display_invalidate_area_default;
ddev->update = mcde_display_update_default;
diff --git a/drivers/video/mcde/mcde_dss.c b/drivers/video/mcde/mcde_dss.c
index a2ef0b652d7..35a6cbe9540 100644
--- a/drivers/video/mcde/mcde_dss.c
+++ b/drivers/video/mcde/mcde_dss.c
@@ -116,25 +116,10 @@ int mcde_dss_enable_display(struct mcde_display_device *ddev)
goto display_failed;
}
- ret = ddev->set_synchronized_update(ddev,
- ddev->get_synchronized_update(ddev));
- if (ret < 0)
- dev_warn(&ddev->dev, "Failed to set sync\n");
-
ret = ddev->set_rotation(ddev, ddev->get_rotation(ddev));
if (ret < 0)
dev_warn(&ddev->dev, "Failed to set rotation\n");
- ret = mcde_chnl_enable_synchronized_update(ddev->chnl_state,
- ddev->synchronized_update);
- if (ret < 0) {
- dev_warn(&ddev->dev,
- "%s:Failed to enable synchronized update\n",
- __func__);
- goto enable_sync_failed;
- }
- /* TODO: call driver for all defaults like sync_update above */
-
dev_dbg(&ddev->dev, "Display enabled, chnl=%d\n",
ddev->chnl_id);
ddev->enabled = true;
@@ -142,8 +127,6 @@ int mcde_dss_enable_display(struct mcde_display_device *ddev)
return 0;
-enable_sync_failed:
- ddev->set_power_mode(ddev, MCDE_DISPLAY_PM_OFF);
display_failed:
mcde_chnl_disable(ddev->chnl_state);
mutex_unlock(&ddev->display_lock);
@@ -451,36 +434,6 @@ enum mcde_display_rotation mcde_dss_get_rotation(
}
EXPORT_SYMBOL(mcde_dss_get_rotation);
-int mcde_dss_set_synchronized_update(struct mcde_display_device *ddev,
- bool enable)
-{
- int ret;
- mutex_lock(&ddev->display_lock);
- ret = ddev->set_synchronized_update(ddev, enable);
- if (ret)
- goto sync_update_failed;
-
- if (ddev->chnl_state)
- mcde_chnl_enable_synchronized_update(ddev->chnl_state, enable);
- mutex_unlock(&ddev->display_lock);
- return 0;
-
-sync_update_failed:
- mutex_unlock(&ddev->display_lock);
- return ret;
-}
-EXPORT_SYMBOL(mcde_dss_set_synchronized_update);
-
-bool mcde_dss_get_synchronized_update(struct mcde_display_device *ddev)
-{
- int ret;
- mutex_lock(&ddev->display_lock);
- ret = ddev->get_synchronized_update(ddev);
- mutex_unlock(&ddev->display_lock);
- return ret;
-}
-EXPORT_SYMBOL(mcde_dss_get_synchronized_update);
-
int __init mcde_dss_init(void)
{
return 0;
diff --git a/drivers/video/mcde/mcde_hw.c b/drivers/video/mcde/mcde_hw.c
index d6c9dd3304e..3b394106416 100644
--- a/drivers/video/mcde/mcde_hw.c
+++ b/drivers/video/mcde/mcde_hw.c
@@ -283,7 +283,6 @@ struct chnl_regs {
u16 (*map_b)(u8);
bool palette_enable;
bool bcd;
- bool synchronized_update;
bool roten;
u8 rotdir;
u32 rotbuf1;
@@ -365,7 +364,6 @@ struct mcde_chnl_state {
u16 (*map_g)(u8);
u16 (*map_b)(u8);
bool palette_enable;
- bool synchronized_update;
struct mcde_video_mode vmode;
enum mcde_display_rotation rotation;
u32 rotbuf1;
@@ -2725,7 +2723,6 @@ static int _mcde_chnl_apply(struct mcde_chnl_state *chnl)
/* REVIEW: 180 deg? */
chnl->regs.bpp = portfmt2bpp(chnl->port.pixel_format);
- chnl->regs.synchronized_update = chnl->synchronized_update;
chnl->regs.roten = roten;
chnl->regs.rotdir = rotdir;
chnl->regs.rotbuf1 = chnl->rotbuf1;
@@ -2808,15 +2805,17 @@ static void chnl_update_non_continous(struct mcde_chnl_state *chnl)
/* Commit settings to registers */
setup_channel(chnl);
- if (chnl->regs.synchronized_update &&
- chnl->power_mode == MCDE_DISPLAY_PM_ON) {
- if (chnl->port.type == MCDE_PORTTYPE_DSI &&
- chnl->port.sync_src == MCDE_SYNCSRC_BTA)
- dsi_te_request(chnl);
- } else {
- do_softwaretrig(chnl);
- dev_vdbg(&mcde_dev->dev, "Channel update (no sync), chnl=%d\n",
- chnl->id);
+ if (chnl->port.type == MCDE_PORTTYPE_DSI) {
+ if (chnl->port.sync_src == MCDE_SYNCSRC_OFF) {
+ do_softwaretrig(chnl);
+ dev_vdbg(&mcde_dev->dev, "Channel update (no sync), "
+ "chnl=%d\n", chnl->id);
+ } else if (chnl->port.sync_src == MCDE_SYNCSRC_BTA) {
+ if (chnl->power_mode == MCDE_DISPLAY_PM_ON)
+ dsi_te_request(chnl);
+ else
+ do_softwaretrig(chnl);
+ }
}
}
@@ -3021,20 +3020,6 @@ int mcde_chnl_set_rotation(struct mcde_chnl_state *chnl,
return 0;
}
-int mcde_chnl_enable_synchronized_update(struct mcde_chnl_state *chnl,
- bool enable)
-{
- dev_vdbg(&mcde_dev->dev, "%s\n", __func__);
- if (!chnl->reserved)
- return -EINVAL;
-
- chnl->synchronized_update = enable;
-
- dev_vdbg(&mcde_dev->dev, "%s exit\n", __func__);
-
- return 0;
-}
-
int mcde_chnl_set_power_mode(struct mcde_chnl_state *chnl,
enum mcde_display_power_mode power_mode)
{