Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284937
b: refs/heads/master
c: 9a147a6
h: refs/heads/master
i:
  284935: 06f949d
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 2, 2011
1 parent fe475a0 commit f33695e
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 39 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: e0a2aa5b3d1a26969ba906447c816d44c018969d
refs/heads/master: 9a147a65de1ac89e506ef90413f41ebd96e03fd3
6 changes: 6 additions & 0 deletions trunk/drivers/video/omap2/displays/panel-taal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,10 @@ static int taal_power_on(struct omap_dss_device *dssdev)
if (r)
goto err;

r = dsi_enable_video_output(dssdev, td->channel);
if (r)
goto err;

td->enabled = 1;

if (!td->intro_printed) {
Expand Down Expand Up @@ -1211,6 +1215,8 @@ static void taal_power_off(struct omap_dss_device *dssdev)
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
int r;

dsi_disable_video_output(dssdev, td->channel);

r = taal_dcs_write_0(td, MIPI_DCS_SET_DISPLAY_OFF);
if (!r)
r = taal_sleep_in(td);
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,8 @@ void dss_mgr_enable(struct omap_overlay_manager *mgr)
{
mutex_lock(&apply_lock);

dispc_mgr_enable(mgr->id, true);
if (!mgr_manual_update(mgr))
dispc_mgr_enable(mgr->id, true);
mgr->enabled = true;

mutex_unlock(&apply_lock);
Expand All @@ -658,7 +659,8 @@ void dss_mgr_disable(struct omap_overlay_manager *mgr)
{
mutex_lock(&apply_lock);

dispc_mgr_enable(mgr->id, false);
if (!mgr_manual_update(mgr))
dispc_mgr_enable(mgr->id, false);
mgr->enabled = false;

mutex_unlock(&apply_lock);
Expand Down
73 changes: 39 additions & 34 deletions trunk/drivers/video/omap2/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3973,65 +3973,70 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev)
}
}

int dsi_video_mode_enable(struct omap_dss_device *dssdev, int channel)
int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
int bpp = dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt);
u8 data_type;
u16 word_count;

switch (dssdev->panel.dsi_pix_fmt) {
case OMAP_DSS_DSI_FMT_RGB888:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_24;
break;
case OMAP_DSS_DSI_FMT_RGB666:
data_type = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
break;
case OMAP_DSS_DSI_FMT_RGB666_PACKED:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_18;
break;
case OMAP_DSS_DSI_FMT_RGB565:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16;
break;
default:
BUG();
};
if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_VIDEO_MODE) {
switch (dssdev->panel.dsi_pix_fmt) {
case OMAP_DSS_DSI_FMT_RGB888:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_24;
break;
case OMAP_DSS_DSI_FMT_RGB666:
data_type = MIPI_DSI_PIXEL_STREAM_3BYTE_18;
break;
case OMAP_DSS_DSI_FMT_RGB666_PACKED:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_18;
break;
case OMAP_DSS_DSI_FMT_RGB565:
data_type = MIPI_DSI_PACKED_PIXEL_STREAM_16;
break;
default:
BUG();
};

dsi_if_enable(dsidev, false);
dsi_vc_enable(dsidev, channel, false);
dsi_if_enable(dsidev, false);
dsi_vc_enable(dsidev, channel, false);

/* MODE, 1 = video mode */
REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 1, 4, 4);
/* MODE, 1 = video mode */
REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 1, 4, 4);

word_count = DIV_ROUND_UP(dssdev->panel.timings.x_res * bpp, 8);
word_count = DIV_ROUND_UP(dssdev->panel.timings.x_res * bpp, 8);

dsi_vc_write_long_header(dsidev, channel, data_type, word_count, 0);
dsi_vc_write_long_header(dsidev, channel, data_type,
word_count, 0);

dsi_vc_enable(dsidev, channel, true);
dsi_if_enable(dsidev, true);
dsi_vc_enable(dsidev, channel, true);
dsi_if_enable(dsidev, true);
}

dss_mgr_enable(dssdev->manager);

return 0;
}
EXPORT_SYMBOL(dsi_video_mode_enable);
EXPORT_SYMBOL(dsi_enable_video_output);

void dsi_video_mode_disable(struct omap_dss_device *dssdev, int channel)
void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel)
{
struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);

dsi_if_enable(dsidev, false);
dsi_vc_enable(dsidev, channel, false);
if (dssdev->panel.dsi_mode == OMAP_DSS_DSI_VIDEO_MODE) {
dsi_if_enable(dsidev, false);
dsi_vc_enable(dsidev, channel, false);

/* MODE, 0 = command mode */
REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 0, 4, 4);
/* MODE, 0 = command mode */
REG_FLD_MOD(dsidev, DSI_VC_CTRL(channel), 0, 4, 4);

dsi_vc_enable(dsidev, channel, true);
dsi_if_enable(dsidev, true);
dsi_vc_enable(dsidev, channel, true);
dsi_if_enable(dsidev, true);
}

dss_mgr_disable(dssdev->manager);
}
EXPORT_SYMBOL(dsi_video_mode_disable);
EXPORT_SYMBOL(dsi_disable_video_output);

static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
u16 w, u16 h)
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/video/omapdss.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ int dsi_vc_set_max_rx_packet_size(struct omap_dss_device *dssdev, int channel,
u16 len);
int dsi_vc_send_null(struct omap_dss_device *dssdev, int channel);
int dsi_vc_send_bta_sync(struct omap_dss_device *dssdev, int channel);
int dsi_video_mode_enable(struct omap_dss_device *dssdev, int channel);
void dsi_video_mode_disable(struct omap_dss_device *dssdev, int channel);
int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel);
void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel);

/* Board specific data */
struct omap_dss_board_info {
Expand Down

0 comments on commit f33695e

Please sign in to comment.