Loading drivers/gpu/drm/msm/dp/dp_catalog.c +45 −3 Original line number Diff line number Diff line Loading @@ -73,6 +73,35 @@ static u8 const vm_voltage_swing[4][4] = { {0xFF, 0xFF, 0xFF, 0xFF} /* sw1, 1.2 v, optional */ }; static u8 const vm_pre_emphasis_hbr3_hbr2[4][4] = { {0x00, 0x0C, 0x15, 0x1A}, {0x02, 0x0E, 0x16, 0xFF}, {0x02, 0x11, 0xFF, 0xFF}, {0x04, 0xFF, 0xFF, 0xFF} }; static u8 const vm_voltage_swing_hbr3_hbr2[4][4] = { {0x02, 0x12, 0x16, 0x1A}, {0x09, 0x19, 0x1F, 0xFF}, {0x10, 0x1F, 0xFF, 0xFF}, {0x1F, 0xFF, 0xFF, 0xFF} }; static u8 const vm_pre_emphasis_hbr_rbr[4][4] = { {0x00, 0x0C, 0x14, 0x19}, {0x00, 0x0B, 0x12, 0xFF}, {0x00, 0x0B, 0xFF, 0xFF}, {0x04, 0xFF, 0xFF, 0xFF} }; static u8 const vm_voltage_swing_hbr_rbr[4][4] = { {0x08, 0x0F, 0x16, 0x1F}, {0x11, 0x1E, 0x1F, 0xFF}, {0x19, 0x1F, 0xFF, 0xFF}, {0x1F, 0xFF, 0xFF, 0xFF} }; struct dp_catalog_io { struct dp_io_data *dp_ahb; struct dp_io_data *dp_aux; Loading Loading @@ -1440,11 +1469,12 @@ static void dp_catalog_ctrl_phy_lane_cfg(struct dp_catalog_ctrl *ctrl, } static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private *catalog; struct dp_io_data *io_data; u8 value0, value1; u32 version; if (!ctrl) { pr_err("invalid input\n"); Loading @@ -1455,9 +1485,21 @@ static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl, pr_debug("hw: v=%d p=%d\n", v_level, p_level); io_data = catalog->io.dp_ahb; version = dp_read(catalog->exe_mode, io_data, DP_HW_VERSION); if (version == 0x10020004) { if (high) { value0 = vm_voltage_swing_hbr3_hbr2[v_level][p_level]; value1 = vm_pre_emphasis_hbr3_hbr2[v_level][p_level]; } else { value0 = vm_voltage_swing_hbr_rbr[v_level][p_level]; value1 = vm_pre_emphasis_hbr_rbr[v_level][p_level]; } } else { value0 = vm_voltage_swing[v_level][p_level]; value1 = vm_pre_emphasis[v_level][p_level]; } /* program default setting first */ io_data = catalog->io.dp_ln_tx0; Loading drivers/gpu/drm/msm/dp/dp_catalog.h +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ struct dp_catalog_ctrl { void (*phy_lane_cfg)(struct dp_catalog_ctrl *ctrl, bool flipped, u8 lane_cnt); void (*update_vx_px)(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level); u8 p_level, bool high); void (*get_interrupt)(struct dp_catalog_ctrl *ctrl); u32 (*read_hdcp_status)(struct dp_catalog_ctrl *ctrl); void (*send_phy_pattern)(struct dp_catalog_ctrl *ctrl, Loading drivers/gpu/drm/msm/dp/dp_catalog_v200.c +1 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static void dp_catalog_panel_config_msa_v200(struct dp_catalog_panel *panel, } static void dp_catalog_ctrl_update_vx_px_v200(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private_v200 *catalog; struct dp_io_data *io_data; Loading drivers/gpu/drm/msm/dp/dp_catalog_v420.c +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ static void dp_catalog_ctrl_phy_lane_cfg_v420(struct dp_catalog_ctrl *ctrl, } static void dp_catalog_ctrl_update_vx_px_v420(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private_v420 *catalog; struct dp_io_data *io_data; Loading drivers/gpu/drm/msm/dp/dp_ctrl.c +5 −1 Original line number Diff line number Diff line Loading @@ -221,9 +221,13 @@ static int dp_ctrl_update_sink_vx_px(struct dp_ctrl_private *ctrl, static int dp_ctrl_update_vx_px(struct dp_ctrl_private *ctrl) { struct dp_link *link = ctrl->link; bool high = false; if (ctrl->link->link_params.bw_code == DP_LINK_BW_5_4 || ctrl->link->link_params.bw_code == DP_LINK_BW_8_1) high = true; ctrl->catalog->update_vx_px(ctrl->catalog, link->phy_params.v_level, link->phy_params.p_level); link->phy_params.v_level, link->phy_params.p_level, high); return dp_ctrl_update_sink_vx_px(ctrl, link->phy_params.v_level, link->phy_params.p_level); Loading Loading
drivers/gpu/drm/msm/dp/dp_catalog.c +45 −3 Original line number Diff line number Diff line Loading @@ -73,6 +73,35 @@ static u8 const vm_voltage_swing[4][4] = { {0xFF, 0xFF, 0xFF, 0xFF} /* sw1, 1.2 v, optional */ }; static u8 const vm_pre_emphasis_hbr3_hbr2[4][4] = { {0x00, 0x0C, 0x15, 0x1A}, {0x02, 0x0E, 0x16, 0xFF}, {0x02, 0x11, 0xFF, 0xFF}, {0x04, 0xFF, 0xFF, 0xFF} }; static u8 const vm_voltage_swing_hbr3_hbr2[4][4] = { {0x02, 0x12, 0x16, 0x1A}, {0x09, 0x19, 0x1F, 0xFF}, {0x10, 0x1F, 0xFF, 0xFF}, {0x1F, 0xFF, 0xFF, 0xFF} }; static u8 const vm_pre_emphasis_hbr_rbr[4][4] = { {0x00, 0x0C, 0x14, 0x19}, {0x00, 0x0B, 0x12, 0xFF}, {0x00, 0x0B, 0xFF, 0xFF}, {0x04, 0xFF, 0xFF, 0xFF} }; static u8 const vm_voltage_swing_hbr_rbr[4][4] = { {0x08, 0x0F, 0x16, 0x1F}, {0x11, 0x1E, 0x1F, 0xFF}, {0x19, 0x1F, 0xFF, 0xFF}, {0x1F, 0xFF, 0xFF, 0xFF} }; struct dp_catalog_io { struct dp_io_data *dp_ahb; struct dp_io_data *dp_aux; Loading Loading @@ -1440,11 +1469,12 @@ static void dp_catalog_ctrl_phy_lane_cfg(struct dp_catalog_ctrl *ctrl, } static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private *catalog; struct dp_io_data *io_data; u8 value0, value1; u32 version; if (!ctrl) { pr_err("invalid input\n"); Loading @@ -1455,9 +1485,21 @@ static void dp_catalog_ctrl_update_vx_px(struct dp_catalog_ctrl *ctrl, pr_debug("hw: v=%d p=%d\n", v_level, p_level); io_data = catalog->io.dp_ahb; version = dp_read(catalog->exe_mode, io_data, DP_HW_VERSION); if (version == 0x10020004) { if (high) { value0 = vm_voltage_swing_hbr3_hbr2[v_level][p_level]; value1 = vm_pre_emphasis_hbr3_hbr2[v_level][p_level]; } else { value0 = vm_voltage_swing_hbr_rbr[v_level][p_level]; value1 = vm_pre_emphasis_hbr_rbr[v_level][p_level]; } } else { value0 = vm_voltage_swing[v_level][p_level]; value1 = vm_pre_emphasis[v_level][p_level]; } /* program default setting first */ io_data = catalog->io.dp_ln_tx0; Loading
drivers/gpu/drm/msm/dp/dp_catalog.h +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ struct dp_catalog_ctrl { void (*phy_lane_cfg)(struct dp_catalog_ctrl *ctrl, bool flipped, u8 lane_cnt); void (*update_vx_px)(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level); u8 p_level, bool high); void (*get_interrupt)(struct dp_catalog_ctrl *ctrl); u32 (*read_hdcp_status)(struct dp_catalog_ctrl *ctrl); void (*send_phy_pattern)(struct dp_catalog_ctrl *ctrl, Loading
drivers/gpu/drm/msm/dp/dp_catalog_v200.c +1 −1 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static void dp_catalog_panel_config_msa_v200(struct dp_catalog_panel *panel, } static void dp_catalog_ctrl_update_vx_px_v200(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private_v200 *catalog; struct dp_io_data *io_data; Loading
drivers/gpu/drm/msm/dp/dp_catalog_v420.c +1 −1 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ static void dp_catalog_ctrl_phy_lane_cfg_v420(struct dp_catalog_ctrl *ctrl, } static void dp_catalog_ctrl_update_vx_px_v420(struct dp_catalog_ctrl *ctrl, u8 v_level, u8 p_level) u8 v_level, u8 p_level, bool high) { struct dp_catalog_private_v420 *catalog; struct dp_io_data *io_data; Loading
drivers/gpu/drm/msm/dp/dp_ctrl.c +5 −1 Original line number Diff line number Diff line Loading @@ -221,9 +221,13 @@ static int dp_ctrl_update_sink_vx_px(struct dp_ctrl_private *ctrl, static int dp_ctrl_update_vx_px(struct dp_ctrl_private *ctrl) { struct dp_link *link = ctrl->link; bool high = false; if (ctrl->link->link_params.bw_code == DP_LINK_BW_5_4 || ctrl->link->link_params.bw_code == DP_LINK_BW_8_1) high = true; ctrl->catalog->update_vx_px(ctrl->catalog, link->phy_params.v_level, link->phy_params.p_level); link->phy_params.v_level, link->phy_params.p_level, high); return dp_ctrl_update_sink_vx_px(ctrl, link->phy_params.v_level, link->phy_params.p_level); Loading