drm/rockchip: dw-mipi: remove mode_valid
authorChris Zhong <zyw@rock-chips.com>
Tue, 2 Aug 2016 01:44:21 +0000 (09:44 +0800)
committerGerrit Code Review <gerrit@rock-chips.com>
Tue, 2 Aug 2016 13:15:37 +0000 (21:15 +0800)
The MIPI DSI do not need check the validity of resolution, the max resolution
should depend VOP. So remove rk3288_mipi_dsi_mode_valid here.

Change-Id: I789d184f9a14010795fe595ef31e1bea5d1022e0
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
drivers/gpu/drm/rockchip/dw-mipi-dsi.c

index aff2225563454bc952ef495639d4488ca7cf5d82..aac04532bcd695b784536479c4216ade72300167 100644 (file)
@@ -1107,33 +1107,11 @@ static int rockchip_mipi_parse_dt(struct dw_mipi_dsi *dsi)
        return 0;
 }
 
-static enum drm_mode_status rk3288_mipi_dsi_mode_valid(
-                                       struct drm_connector *connector,
-                                       struct drm_display_mode *mode)
-{
-       /*
-        * The VID_PKT_SIZE field in the DSI_VID_PKT_CFG
-        * register is 11-bit.
-        */
-       if (mode->hdisplay > 0x7ff)
-               return MODE_BAD_HVALUE;
-
-       /*
-        * The V_ACTIVE_LINES field in the DSI_VTIMING_CFG
-        * register is 11-bit.
-        */
-       if (mode->vdisplay > 0x7ff)
-               return MODE_BAD_VVALUE;
-
-       return MODE_OK;
-}
-
 static struct dw_mipi_dsi_plat_data rk3288_mipi_dsi_drv_data = {
        .dsi0_en_bit = RK3288_DSI0_SEL_VOP_LIT,
        .dsi1_en_bit = RK3288_DSI1_SEL_VOP_LIT,
        .grf_switch_reg = RK3288_GRF_SOC_CON6,
        .max_data_lanes = 4,
-       .mode_valid = rk3288_mipi_dsi_mode_valid,
 };
 
 static struct dw_mipi_dsi_plat_data rk3399_mipi_dsi_drv_data = {
@@ -1143,7 +1121,6 @@ static struct dw_mipi_dsi_plat_data rk3399_mipi_dsi_drv_data = {
        .grf_dsi0_mode = RK3399_GRF_DSI_MODE,
        .grf_dsi0_mode_reg = RK3399_GRF_SOC_CON22,
        .max_data_lanes = 4,
-       .mode_valid = rk3288_mipi_dsi_mode_valid,
 };
 
 static const struct of_device_id dw_mipi_dsi_dt_ids[] = {