[PATCH v14 06/10] drm/mediatek: Add MT8195 External DisplayPort support
CK Hu
ck.hu at mediatek.com
Mon Jul 25 02:51:11 PDT 2022
Hi, Bo-Chen:
On Tue, 2022-07-12 at 19:12 +0800, Bo-Chen Chen wrote:
> From: Guillaume Ranquet <granquet at baylibre.com>
>
> This patch adds External DisplayPort support to the mt8195 eDP
> driver.
>
> Signed-off-by: Guillaume Ranquet <granquet at baylibre.com>
> Signed-off-by: Bo-Chen Chen <rex-bc.chen at mediatek.com>
> ---
[snip]
> @@ -1489,13 +1543,34 @@ static int mtk_dp_init_port(struct mtk_dp
> *mtk_dp)
> static irqreturn_t mtk_dp_hpd_event_thread(int hpd, void *dev)
> {
> struct mtk_dp *mtk_dp = dev;
> + int event;
> +
> + event = mtk_dp_plug_state(mtk_dp) ?
> + connector_status_connected :
> connector_status_disconnected;
> +
> + if (event < 0)
> + return IRQ_HANDLED;
event is useless, so drop it.
Regards,
CK
> +
> + dev_dbg(mtk_dp->dev, "drm_helper_hpd_irq_event\n");
> + drm_helper_hpd_irq_event(mtk_dp->bridge.dev);
>
> if (mtk_dp->train_info.cable_state_change) {
> mtk_dp->train_info.cable_state_change = false;
>
> - mtk_dp_update_bits(mtk_dp, MTK_DP_TOP_PWR_STATE,
> - DP_PWR_STATE_BANDGAP_TPLL_LANE,
> - DP_PWR_STATE_MASK);
> + if (!mtk_dp->train_info.cable_plugged_in) {
> + mtk_dp_video_mute(mtk_dp, true);
> +
> + mtk_dp_initialize_priv_data(mtk_dp);
> + mtk_dp_set_idle_pattern(mtk_dp, true);
> +
> + mtk_dp_update_bits(mtk_dp,
> MTK_DP_TOP_PWR_STATE,
> + DP_PWR_STATE_BANDGAP_TPLL,
> + DP_PWR_STATE_MASK);
> + } else {
> + mtk_dp_update_bits(mtk_dp,
> MTK_DP_TOP_PWR_STATE,
> + DP_PWR_STATE_BANDGAP_TPLL_LA
> NE,
> + DP_PWR_STATE_MASK);
> + }
> }
>
> if (mtk_dp->train_info.irq_sta.hpd_inerrupt) {
> @@ -1597,6 +1672,24 @@ static int mtk_dp_dt_parse(struct mtk_dp
> *mtk_dp,
> return 0;
> }
>
More information about the Linux-mediatek
mailing list