aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-10-13 09:12:29 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:18 -0500
commitdb18644f90e664bf30f58cf9b8bc879598bff62f (patch)
tree16bc1cef274325335347bf7357562a418f05d17d /drivers/video/omap2/dss
parent9b4362f2b5ad6d0cf6b5754000b8db80d0592e89 (diff)
OMAPDSS: DSI: remove dsi_get_num_lanes_used
There's no longer need for the dsi_get_num_lanes_used function, so it can be removed. The lane check in dsi_init_display() can be removed as the validity of the config will be verified when parsing it. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss')
-rw-r--r--drivers/video/omap2/dss/dsi.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c
index dee95253e01d..2b375c6027b6 100644
--- a/drivers/video/omap2/dss/dsi.c
+++ b/drivers/video/omap2/dss/dsi.c
@@ -2034,23 +2034,6 @@ static int dsi_cio_power(struct platform_device *dsidev,
2034 return 0; 2034 return 0;
2035} 2035}
2036 2036
2037/* Number of lanes used by the dss device */
2038static inline int dsi_get_num_lanes_used(struct omap_dss_device *dssdev)
2039{
2040 int num_data_lanes = 0;
2041
2042 if (dssdev->phy.dsi.data1_lane != 0)
2043 num_data_lanes++;
2044 if (dssdev->phy.dsi.data2_lane != 0)
2045 num_data_lanes++;
2046 if (dssdev->phy.dsi.data3_lane != 0)
2047 num_data_lanes++;
2048 if (dssdev->phy.dsi.data4_lane != 0)
2049 num_data_lanes++;
2050
2051 return num_data_lanes + 1;
2052}
2053
2054static unsigned dsi_get_line_buf_size(struct platform_device *dsidev) 2037static unsigned dsi_get_line_buf_size(struct platform_device *dsidev)
2055{ 2038{
2056 int val; 2039 int val;
@@ -3863,6 +3846,7 @@ static int dsi_proto_config(struct omap_dss_device *dssdev)
3863static void dsi_proto_timings(struct omap_dss_device *dssdev) 3846static void dsi_proto_timings(struct omap_dss_device *dssdev)
3864{ 3847{
3865 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 3848 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
3849 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
3866 unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail; 3850 unsigned tlpx, tclk_zero, tclk_prepare, tclk_trail;
3867 unsigned tclk_pre, tclk_post; 3851 unsigned tclk_pre, tclk_post;
3868 unsigned ths_prepare, ths_prepare_ths_zero, ths_zero; 3852 unsigned ths_prepare, ths_prepare_ths_zero, ths_zero;
@@ -3870,7 +3854,7 @@ static void dsi_proto_timings(struct omap_dss_device *dssdev)
3870 unsigned ddr_clk_pre, ddr_clk_post; 3854 unsigned ddr_clk_pre, ddr_clk_post;
3871 unsigned enter_hs_mode_lat, exit_hs_mode_lat; 3855 unsigned enter_hs_mode_lat, exit_hs_mode_lat;
3872 unsigned ths_eot; 3856 unsigned ths_eot;
3873 int ndl = dsi_get_num_lanes_used(dssdev) - 1; 3857 int ndl = dsi->num_lanes_used - 1;
3874 u32 r; 3858 u32 r;
3875 3859
3876 r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG0); 3860 r = dsi_read_reg(dsidev, DSI_DSIPHY_CFG0);
@@ -4554,7 +4538,6 @@ int dsi_init_display(struct omap_dss_device *dssdev)
4554{ 4538{
4555 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4539 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev);
4556 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 4540 struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev);
4557 int dsi_module = dsi_get_dsidev_id(dsidev);
4558 4541
4559 DSSDBG("DSI init\n"); 4542 DSSDBG("DSI init\n");
4560 4543
@@ -4576,12 +4559,6 @@ int dsi_init_display(struct omap_dss_device *dssdev)
4576 dsi->vdds_dsi_reg = vdds_dsi; 4559 dsi->vdds_dsi_reg = vdds_dsi;
4577 } 4560 }
4578 4561
4579 if (dsi_get_num_lanes_used(dssdev) > dsi->num_lanes_supported) {
4580 DSSERR("DSI%d can't support more than %d lanes\n",
4581 dsi_module + 1, dsi->num_lanes_supported);
4582 return -EINVAL;
4583 }
4584
4585 return 0; 4562 return 0;
4586} 4563}
4587 4564