aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/omap2/dss/dsi.c50
-rw-r--r--include/video/omapdss.h2
2 files changed, 36 insertions, 16 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 62549f61ad2f..96d0024ada40 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -336,6 +336,7 @@ struct dsi_data {
336 struct omap_video_timings timings; 336 struct omap_video_timings timings;
337 enum omap_dss_dsi_pixel_format pix_fmt; 337 enum omap_dss_dsi_pixel_format pix_fmt;
338 enum omap_dss_dsi_mode mode; 338 enum omap_dss_dsi_mode mode;
339 struct omap_dss_dsi_videomode_timings vm_timings;
339}; 340};
340 341
341struct dsi_packet_sent_handler_data { 342struct dsi_packet_sent_handler_data {
@@ -2366,7 +2367,7 @@ static int dsi_cio_init(struct omap_dss_device *dssdev)
2366 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { 2367 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
2367 /* DDR_CLK_ALWAYS_ON */ 2368 /* DDR_CLK_ALWAYS_ON */
2368 REG_FLD_MOD(dsidev, DSI_CLK_CTRL, 2369 REG_FLD_MOD(dsidev, DSI_CLK_CTRL,
2369 dssdev->panel.dsi_vm_timings.ddr_clk_always_on, 13, 13); 2370 dsi->vm_timings.ddr_clk_always_on, 13, 13);
2370 } 2371 }
2371 2372
2372 dsi->ulps_enabled = false; 2373 dsi->ulps_enabled = false;
@@ -2688,6 +2689,7 @@ void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel,
2688 bool enable) 2689 bool enable)
2689{ 2690{
2690 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 2691 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
2692 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
2691 2693
2692 DSSDBG("dsi_vc_enable_hs(%d, %d)\n", channel, enable); 2694 DSSDBG("dsi_vc_enable_hs(%d, %d)\n", channel, enable);
2693 2695
@@ -2704,7 +2706,7 @@ void omapdss_dsi_vc_enable_hs(struct omap_dss_device *dssdev, int channel,
2704 dsi_force_tx_stop_mode_io(dsidev); 2706 dsi_force_tx_stop_mode_io(dsidev);
2705 2707
2706 /* start the DDR clock by sending a NULL packet */ 2708 /* start the DDR clock by sending a NULL packet */
2707 if (dssdev->panel.dsi_vm_timings.ddr_clk_always_on && enable) 2709 if (dsi->vm_timings.ddr_clk_always_on && enable)
2708 dsi_vc_send_null(dssdev, channel); 2710 dsi_vc_send_null(dssdev, channel);
2709} 2711}
2710EXPORT_SYMBOL(omapdss_dsi_vc_enable_hs); 2712EXPORT_SYMBOL(omapdss_dsi_vc_enable_hs);
@@ -3638,8 +3640,9 @@ static void dsi_config_vp_num_line_buffers(struct omap_dss_device *dssdev)
3638static void dsi_config_vp_sync_events(struct omap_dss_device *dssdev) 3640static void dsi_config_vp_sync_events(struct omap_dss_device *dssdev)
3639{ 3641{
3640 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 3642 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
3641 bool vsync_end = dssdev->panel.dsi_vm_timings.vp_vsync_end; 3643 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
3642 bool hsync_end = dssdev->panel.dsi_vm_timings.vp_hsync_end; 3644 bool vsync_end = dsi->vm_timings.vp_vsync_end;
3645 bool hsync_end = dsi->vm_timings.vp_hsync_end;
3643 u32 r; 3646 u32 r;
3644 3647
3645 r = dsi_read_reg(dsidev, DSI_CTRL); 3648 r = dsi_read_reg(dsidev, DSI_CTRL);
@@ -3656,10 +3659,11 @@ static void dsi_config_vp_sync_events(struct omap_dss_device *dssdev)
3656static void dsi_config_blanking_modes(struct omap_dss_device *dssdev) 3659static void dsi_config_blanking_modes(struct omap_dss_device *dssdev)
3657{ 3660{
3658 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 3661 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
3659 int blanking_mode = dssdev->panel.dsi_vm_timings.blanking_mode; 3662 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
3660 int hfp_blanking_mode = dssdev->panel.dsi_vm_timings.hfp_blanking_mode; 3663 int blanking_mode = dsi->vm_timings.blanking_mode;
3661 int hbp_blanking_mode = dssdev->panel.dsi_vm_timings.hbp_blanking_mode; 3664 int hfp_blanking_mode = dsi->vm_timings.hfp_blanking_mode;
3662 int hsa_blanking_mode = dssdev->panel.dsi_vm_timings.hsa_blanking_mode; 3665 int hbp_blanking_mode = dsi->vm_timings.hbp_blanking_mode;
3666 int hsa_blanking_mode = dsi->vm_timings.hsa_blanking_mode;
3663 u32 r; 3667 u32 r;
3664 3668
3665 /* 3669 /*
@@ -3992,14 +3996,14 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev)
3992 3996
3993 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { 3997 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
3994 /* TODO: Implement a video mode check_timings function */ 3998 /* TODO: Implement a video mode check_timings function */
3995 int hsa = dssdev->panel.dsi_vm_timings.hsa; 3999 int hsa = dsi->vm_timings.hsa;
3996 int hfp = dssdev->panel.dsi_vm_timings.hfp; 4000 int hfp = dsi->vm_timings.hfp;
3997 int hbp = dssdev->panel.dsi_vm_timings.hbp; 4001 int hbp = dsi->vm_timings.hbp;
3998 int vsa = dssdev->panel.dsi_vm_timings.vsa; 4002 int vsa = dsi->vm_timings.vsa;
3999 int vfp = dssdev->panel.dsi_vm_timings.vfp; 4003 int vfp = dsi->vm_timings.vfp;
4000 int vbp = dssdev->panel.dsi_vm_timings.vbp; 4004 int vbp = dsi->vm_timings.vbp;
4001 int window_sync = dssdev->panel.dsi_vm_timings.window_sync; 4005 int window_sync = dsi->vm_timings.window_sync;
4002 bool hsync_end = dssdev->panel.dsi_vm_timings.vp_hsync_end; 4006 bool hsync_end = dsi->vm_timings.vp_hsync_end;
4003 struct omap_video_timings *timings = &dsi->timings; 4007 struct omap_video_timings *timings = &dsi->timings;
4004 int bpp = dsi_get_pixel_size(dsi->pix_fmt); 4008 int bpp = dsi_get_pixel_size(dsi->pix_fmt);
4005 int tl, t_he, width_bytes; 4009 int tl, t_he, width_bytes;
@@ -4715,6 +4719,20 @@ void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev,
4715} 4719}
4716EXPORT_SYMBOL(omapdss_dsi_set_operation_mode); 4720EXPORT_SYMBOL(omapdss_dsi_set_operation_mode);
4717 4721
4722void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
4723 struct omap_dss_dsi_videomode_timings *timings)
4724{
4725 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
4726 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
4727
4728 mutex_lock(&dsi->lock);
4729
4730 dsi->vm_timings = *timings;
4731
4732 mutex_unlock(&dsi->lock);
4733}
4734EXPORT_SYMBOL(omapdss_dsi_set_videomode_timings);
4735
4718static int __init dsi_init_display(struct omap_dss_device *dssdev) 4736static int __init dsi_init_display(struct omap_dss_device *dssdev)
4719{ 4737{
4720 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4738 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
diff --git a/include/video/omapdss.h b/include/video/omapdss.h
index 363235cc642f..bf6d16b405a2 100644
--- a/include/video/omapdss.h
+++ b/include/video/omapdss.h
@@ -726,6 +726,8 @@ void omapdss_dsi_set_pixel_format(struct omap_dss_device *dssdev,
726 enum omap_dss_dsi_pixel_format fmt); 726 enum omap_dss_dsi_pixel_format fmt);
727void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev, 727void omapdss_dsi_set_operation_mode(struct omap_dss_device *dssdev,
728 enum omap_dss_dsi_mode mode); 728 enum omap_dss_dsi_mode mode);
729void omapdss_dsi_set_videomode_timings(struct omap_dss_device *dssdev,
730 struct omap_dss_dsi_videomode_timings *timings);
729 731
730int omap_dsi_update(struct omap_dss_device *dssdev, int channel, 732int omap_dsi_update(struct omap_dss_device *dssdev, int channel,
731 void (*callback)(int, void *), void *data); 733 void (*callback)(int, void *), void *data);