aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-10 10:27:39 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-02-24 07:31:28 -0500
commit942a91a6e04e996c32252bc6c2177f74089d7a1d (patch)
tree0ee0acd1f3c4b67521cb45370635afeb3c0f0e0a
parent69b2048f44ead2d278e25d12adf0494b469ffb1c (diff)
OMAP: DSS2: DSI: remove external TE support
With the reworked model, DSI driver doesn't need to know anything about external TE lines. Thus we can remove ext_te support, and only leave the DSI TE trigger support. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
-rw-r--r--drivers/video/omap2/dss/dsi.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index 41cdefbaf7f3..73bdb04e6814 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -237,7 +237,6 @@ static struct
237 struct dsi_update_region update_region; 237 struct dsi_update_region update_region;
238 238
239 bool te_enabled; 239 bool te_enabled;
240 bool use_ext_te;
241 240
242 struct work_struct framedone_work; 241 struct work_struct framedone_work;
243 void (*framedone_callback)(int, void *); 242 void (*framedone_callback)(int, void *);
@@ -2723,15 +2722,12 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
2723 unsigned packet_payload; 2722 unsigned packet_payload;
2724 unsigned packet_len; 2723 unsigned packet_len;
2725 u32 l; 2724 u32 l;
2726 bool use_te_trigger;
2727 const unsigned channel = dsi.update_channel; 2725 const unsigned channel = dsi.update_channel;
2728 /* line buffer is 1024 x 24bits */ 2726 /* line buffer is 1024 x 24bits */
2729 /* XXX: for some reason using full buffer size causes considerable TX 2727 /* XXX: for some reason using full buffer size causes considerable TX
2730 * slowdown with update sizes that fill the whole buffer */ 2728 * slowdown with update sizes that fill the whole buffer */
2731 const unsigned line_buf_size = 1023 * 3; 2729 const unsigned line_buf_size = 1023 * 3;
2732 2730
2733 use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;
2734
2735 DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n", 2731 DSSDBG("dsi_update_screen_dispc(%d,%d %dx%d)\n",
2736 x, y, w, h); 2732 x, y, w, h);
2737 2733
@@ -2760,7 +2756,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
2760 2756
2761 dsi_vc_write_long_header(channel, DSI_DT_DCS_LONG_WRITE, packet_len, 0); 2757 dsi_vc_write_long_header(channel, DSI_DT_DCS_LONG_WRITE, packet_len, 0);
2762 2758
2763 if (use_te_trigger) 2759 if (dsi.te_enabled)
2764 l = FLD_MOD(l, 1, 30, 30); /* TE_EN */ 2760 l = FLD_MOD(l, 1, 30, 30); /* TE_EN */
2765 else 2761 else
2766 l = FLD_MOD(l, 1, 31, 31); /* TE_START */ 2762 l = FLD_MOD(l, 1, 31, 31); /* TE_START */
@@ -2781,7 +2777,7 @@ static void dsi_update_screen_dispc(struct omap_dss_device *dssdev,
2781 2777
2782 dss_start_update(dssdev); 2778 dss_start_update(dssdev);
2783 2779
2784 if (use_te_trigger) { 2780 if (dsi.te_enabled) {
2785 /* disable LP_RX_TO, so that we can receive TE. Time to wait 2781 /* disable LP_RX_TO, so that we can receive TE. Time to wait
2786 * for TE is longer than the timer allows */ 2782 * for TE is longer than the timer allows */
2787 REG_FLD_MOD(DSI_TIMING2, 0, 15, 15); /* LP_RX_TO */ 2783 REG_FLD_MOD(DSI_TIMING2, 0, 15, 15); /* LP_RX_TO */
@@ -2805,16 +2801,13 @@ static void dsi_framedone_timeout_work_callback(struct work_struct *work)
2805{ 2801{
2806 int r; 2802 int r;
2807 const int channel = dsi.update_channel; 2803 const int channel = dsi.update_channel;
2808 bool use_te_trigger;
2809 2804
2810 DSSERR("Framedone not received for 250ms!\n"); 2805 DSSERR("Framedone not received for 250ms!\n");
2811 2806
2812 /* SIDLEMODE back to smart-idle */ 2807 /* SIDLEMODE back to smart-idle */
2813 dispc_enable_sidle(); 2808 dispc_enable_sidle();
2814 2809
2815 use_te_trigger = dsi.te_enabled && !dsi.use_ext_te; 2810 if (dsi.te_enabled) {
2816
2817 if (use_te_trigger) {
2818 /* enable LP_RX_TO again after the TE */ 2811 /* enable LP_RX_TO again after the TE */
2819 REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */ 2812 REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
2820 } 2813 }
@@ -2858,13 +2851,10 @@ static void dsi_handle_framedone(void)
2858{ 2851{
2859 int r; 2852 int r;
2860 const int channel = dsi.update_channel; 2853 const int channel = dsi.update_channel;
2861 bool use_te_trigger;
2862
2863 use_te_trigger = dsi.te_enabled && !dsi.use_ext_te;
2864 2854
2865 DSSDBG("FRAMEDONE\n"); 2855 DSSDBG("FRAMEDONE\n");
2866 2856
2867 if (use_te_trigger) { 2857 if (dsi.te_enabled) {
2868 /* enable LP_RX_TO again after the TE */ 2858 /* enable LP_RX_TO again after the TE */
2869 REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */ 2859 REG_FLD_MOD(DSI_TIMING2, 1, 15, 15); /* LP_RX_TO */
2870 } 2860 }
@@ -3175,8 +3165,6 @@ int omapdss_dsi_display_enable(struct omap_dss_device *dssdev)
3175 if (r) 3165 if (r)
3176 goto err2; 3166 goto err2;
3177 3167
3178 dsi.use_ext_te = dssdev->phy.dsi.ext_te;
3179
3180 mutex_unlock(&dsi.lock); 3168 mutex_unlock(&dsi.lock);
3181 3169
3182 return 0; 3170 return 0;