Loading Documentation/devicetree/bindings/drm/msm/sde-dp.txt +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ Optional properties: - compatible: Must be "qcom,msm-ext-disp" - qcom,dp-low-power-hw-hpd: Low power hardware HPD feature enable control node - qcom,phy-version: Phy version - qcom,pn-swap-lane-map: P/N swap configuration of each lane - pinctrl-names: List of names to assign mdss pin states defined in pinctrl device node Refer to pinctrl-bindings.txt - pinctrl-<0..n>: Lists phandles each pointing to the pin configuration node within a pin Loading drivers/gpu/drm/msm/dp/dp_catalog.c +26 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -830,6 +830,30 @@ static void dp_catalog_ctrl_lane_mapping(struct dp_catalog_ctrl *ctrl, 0xe4); } static void dp_catalog_ctrl_lane_pnswap(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap) { struct dp_catalog_private *catalog; struct dp_io_data *io_data; u32 cfg0, cfg1; catalog = dp_catalog_get_priv(ctrl); cfg0 = 0x0a; cfg1 = 0x0a; cfg0 |= ((ln_pnswap >> 0) & 0x1) << 0; cfg0 |= ((ln_pnswap >> 1) & 0x1) << 2; cfg1 |= ((ln_pnswap >> 2) & 0x1) << 0; cfg1 |= ((ln_pnswap >> 3) & 0x1) << 2; io_data = catalog->io.dp_ln_tx0; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV, cfg0); io_data = catalog->io.dp_ln_tx1; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV, cfg1); } static void dp_catalog_ctrl_mainlink_ctrl(struct dp_catalog_ctrl *ctrl, bool enable) { Loading Loading @@ -2441,6 +2465,7 @@ struct dp_catalog *dp_catalog_get(struct device *dev, struct dp_parser *parser) .state_ctrl = dp_catalog_ctrl_state_ctrl, .config_ctrl = dp_catalog_ctrl_config_ctrl, .lane_mapping = dp_catalog_ctrl_lane_mapping, .lane_pnswap = dp_catalog_ctrl_lane_pnswap, .mainlink_ctrl = dp_catalog_ctrl_mainlink_ctrl, .set_pattern = dp_catalog_ctrl_set_pattern, .reset = dp_catalog_ctrl_reset, Loading drivers/gpu/drm/msm/dp/dp_catalog.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -102,6 +102,7 @@ struct dp_catalog_ctrl { void (*config_ctrl)(struct dp_catalog_ctrl *ctrl, u8 ln_cnt); void (*lane_mapping)(struct dp_catalog_ctrl *ctrl, bool flipped, char *lane_map); void (*lane_pnswap)(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap); void (*mainlink_ctrl)(struct dp_catalog_ctrl *ctrl, bool enable); void (*set_pattern)(struct dp_catalog_ctrl *ctrl, u32 pattern); void (*reset)(struct dp_catalog_ctrl *ctrl); Loading drivers/gpu/drm/msm/dp/dp_catalog_v420.c +26 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -295,6 +295,30 @@ static void dp_catalog_ctrl_update_vx_px_v420(struct dp_catalog_ctrl *ctrl, } } static void dp_catalog_ctrl_lane_pnswap_v420(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap) { struct dp_catalog_private_v420 *catalog; struct dp_io_data *io_data; u32 cfg0, cfg1; catalog = dp_catalog_get_priv_v420(ctrl); cfg0 = 0x0a; cfg1 = 0x0a; cfg0 |= ((ln_pnswap >> 0) & 0x1) << 0; cfg0 |= ((ln_pnswap >> 1) & 0x1) << 2; cfg1 |= ((ln_pnswap >> 2) & 0x1) << 0; cfg1 |= ((ln_pnswap >> 3) & 0x1) << 2; io_data = catalog->io->dp_ln_tx0; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV_V420, cfg0); io_data = catalog->io->dp_ln_tx1; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV_V420, cfg1); } static void dp_catalog_put_v420(struct dp_catalog *catalog) { struct dp_catalog_private_v420 *catalog_priv; Loading Loading @@ -345,6 +369,7 @@ int dp_catalog_get_v420(struct device *dev, struct dp_catalog *catalog, catalog->panel.config_msa = dp_catalog_panel_config_msa_v420; catalog->ctrl.phy_lane_cfg = dp_catalog_ctrl_phy_lane_cfg_v420; catalog->ctrl.update_vx_px = dp_catalog_ctrl_update_vx_px_v420; catalog->ctrl.lane_pnswap = dp_catalog_ctrl_lane_pnswap_v420; /* Set the default execution mode to hardware mode */ dp_catalog_set_exe_mode_v420(catalog, "hw"); Loading drivers/gpu/drm/msm/dp/dp_ctrl.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -170,6 +170,8 @@ static void dp_ctrl_configure_source_link_params(struct dp_ctrl_private *ctrl, if (enable) { ctrl->catalog->lane_mapping(ctrl->catalog, ctrl->orientation, ctrl->parser->l_map); ctrl->catalog->lane_pnswap(ctrl->catalog, ctrl->parser->l_pnswap); ctrl->catalog->mst_config(ctrl->catalog, ctrl->mst_mode); ctrl->catalog->config_ctrl(ctrl->catalog, ctrl->link->link_params.lane_count); Loading Loading
Documentation/devicetree/bindings/drm/msm/sde-dp.txt +1 −0 Original line number Diff line number Diff line Loading @@ -100,6 +100,7 @@ Optional properties: - compatible: Must be "qcom,msm-ext-disp" - qcom,dp-low-power-hw-hpd: Low power hardware HPD feature enable control node - qcom,phy-version: Phy version - qcom,pn-swap-lane-map: P/N swap configuration of each lane - pinctrl-names: List of names to assign mdss pin states defined in pinctrl device node Refer to pinctrl-bindings.txt - pinctrl-<0..n>: Lists phandles each pointing to the pin configuration node within a pin Loading
drivers/gpu/drm/msm/dp/dp_catalog.c +26 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -830,6 +830,30 @@ static void dp_catalog_ctrl_lane_mapping(struct dp_catalog_ctrl *ctrl, 0xe4); } static void dp_catalog_ctrl_lane_pnswap(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap) { struct dp_catalog_private *catalog; struct dp_io_data *io_data; u32 cfg0, cfg1; catalog = dp_catalog_get_priv(ctrl); cfg0 = 0x0a; cfg1 = 0x0a; cfg0 |= ((ln_pnswap >> 0) & 0x1) << 0; cfg0 |= ((ln_pnswap >> 1) & 0x1) << 2; cfg1 |= ((ln_pnswap >> 2) & 0x1) << 0; cfg1 |= ((ln_pnswap >> 3) & 0x1) << 2; io_data = catalog->io.dp_ln_tx0; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV, cfg0); io_data = catalog->io.dp_ln_tx1; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV, cfg1); } static void dp_catalog_ctrl_mainlink_ctrl(struct dp_catalog_ctrl *ctrl, bool enable) { Loading Loading @@ -2441,6 +2465,7 @@ struct dp_catalog *dp_catalog_get(struct device *dev, struct dp_parser *parser) .state_ctrl = dp_catalog_ctrl_state_ctrl, .config_ctrl = dp_catalog_ctrl_config_ctrl, .lane_mapping = dp_catalog_ctrl_lane_mapping, .lane_pnswap = dp_catalog_ctrl_lane_pnswap, .mainlink_ctrl = dp_catalog_ctrl_mainlink_ctrl, .set_pattern = dp_catalog_ctrl_set_pattern, .reset = dp_catalog_ctrl_reset, Loading
drivers/gpu/drm/msm/dp/dp_catalog.h +2 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -102,6 +102,7 @@ struct dp_catalog_ctrl { void (*config_ctrl)(struct dp_catalog_ctrl *ctrl, u8 ln_cnt); void (*lane_mapping)(struct dp_catalog_ctrl *ctrl, bool flipped, char *lane_map); void (*lane_pnswap)(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap); void (*mainlink_ctrl)(struct dp_catalog_ctrl *ctrl, bool enable); void (*set_pattern)(struct dp_catalog_ctrl *ctrl, u32 pattern); void (*reset)(struct dp_catalog_ctrl *ctrl); Loading
drivers/gpu/drm/msm/dp/dp_catalog_v420.c +26 −1 Original line number Diff line number Diff line /* * Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -295,6 +295,30 @@ static void dp_catalog_ctrl_update_vx_px_v420(struct dp_catalog_ctrl *ctrl, } } static void dp_catalog_ctrl_lane_pnswap_v420(struct dp_catalog_ctrl *ctrl, u8 ln_pnswap) { struct dp_catalog_private_v420 *catalog; struct dp_io_data *io_data; u32 cfg0, cfg1; catalog = dp_catalog_get_priv_v420(ctrl); cfg0 = 0x0a; cfg1 = 0x0a; cfg0 |= ((ln_pnswap >> 0) & 0x1) << 0; cfg0 |= ((ln_pnswap >> 1) & 0x1) << 2; cfg1 |= ((ln_pnswap >> 2) & 0x1) << 0; cfg1 |= ((ln_pnswap >> 3) & 0x1) << 2; io_data = catalog->io->dp_ln_tx0; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV_V420, cfg0); io_data = catalog->io->dp_ln_tx1; dp_write(catalog->exe_mode, io_data, TXn_TX_POL_INV_V420, cfg1); } static void dp_catalog_put_v420(struct dp_catalog *catalog) { struct dp_catalog_private_v420 *catalog_priv; Loading Loading @@ -345,6 +369,7 @@ int dp_catalog_get_v420(struct device *dev, struct dp_catalog *catalog, catalog->panel.config_msa = dp_catalog_panel_config_msa_v420; catalog->ctrl.phy_lane_cfg = dp_catalog_ctrl_phy_lane_cfg_v420; catalog->ctrl.update_vx_px = dp_catalog_ctrl_update_vx_px_v420; catalog->ctrl.lane_pnswap = dp_catalog_ctrl_lane_pnswap_v420; /* Set the default execution mode to hardware mode */ dp_catalog_set_exe_mode_v420(catalog, "hw"); Loading
drivers/gpu/drm/msm/dp/dp_ctrl.c +3 −1 Original line number Diff line number Diff line /* * Copyright (c) 2012-2018, The Linux Foundation. All rights reserved. * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -170,6 +170,8 @@ static void dp_ctrl_configure_source_link_params(struct dp_ctrl_private *ctrl, if (enable) { ctrl->catalog->lane_mapping(ctrl->catalog, ctrl->orientation, ctrl->parser->l_map); ctrl->catalog->lane_pnswap(ctrl->catalog, ctrl->parser->l_pnswap); ctrl->catalog->mst_config(ctrl->catalog, ctrl->mst_mode); ctrl->catalog->config_ctrl(ctrl->catalog, ctrl->link->link_params.lane_count); Loading