[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5971f465-9514-d830-8467-e722475ecc7f@collabora.com>
Date: Fri, 1 Jul 2022 10:14:02 +0200
From: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>
To: Bo-Chen Chen <rex-bc.chen@...iatek.com>, chunkuang.hu@...nel.org,
p.zabel@...gutronix.de, daniel@...ll.ch, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org, mripard@...nel.org,
tzimmermann@...e.de, matthias.bgg@...il.com, deller@....de,
airlied@...ux.ie
Cc: msp@...libre.com, granquet@...libre.com, jitao.shi@...iatek.com,
wenst@...omium.org, ck.hu@...iatek.com, liangxu.xu@...iatek.com,
dri-devel@...ts.freedesktop.org,
linux-mediatek@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-fbdev@...r.kernel.org,
Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH v13 06/10] drm/mediatek: Add MT8195 External DisplayPort
support
Il 01/07/22 08:28, Bo-Chen Chen ha scritto:
> From: Guillaume Ranquet <granquet@...libre.com>
>
> This patch adds External DisplayPort support to the mt8195 eDP driver.
>
> Signed-off-by: Guillaume Ranquet <granquet@...libre.com>
> Signed-off-by: Bo-Chen Chen <rex-bc.chen@...iatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dp.c | 197 +++++++++++++++++++++-----
> drivers/gpu/drm/mediatek/mtk_dp_reg.h | 1 +
> 2 files changed, 161 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> index b672d5a6f5bd..c3be97dd055c 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> @@ -105,6 +105,7 @@ struct mtk_dp {
> struct regmap *regs;
>
> bool enabled;
> + bool has_fec;
You're introducing this has_fec variable here....
>
> struct drm_connector *conn;
> };
> @@ -1018,6 +1074,8 @@ static void mtk_dp_initialize_priv_data(struct mtk_dp *mtk_dp)
> mtk_dp->info.depth = DP_MSA_MISC_8_BPC;
> memset(&mtk_dp->info.timings, 0, sizeof(struct mtk_dp_timings));
> mtk_dp->info.timings.frame_rate = 60;
> +
> + mtk_dp->has_fec = false;
.... setting it as false here ....
> }
>
> static void mtk_dp_setup_tu(struct mtk_dp *mtk_dp)
> @@ -1498,15 +1562,38 @@ 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;
> u8 buf[DP_RECEIVER_CAP_SIZE] = {};
>
> + event = mtk_dp_plug_state(mtk_dp) ?
> + connector_status_connected : connector_status_disconnected;
> +
> + if (event < 0)
> + return IRQ_HANDLED;
> +
> + dev_info(mtk_dp->dev, "drm_helper_hpd_irq_event\n");
P.S.: This should be a dev_dbg().
> + 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);
> - drm_dp_read_dpcd_caps(&mtk_dp->aux, buf);
> + 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);
> + if (mtk_dp->has_fec)
...and you're checking it here, but there's nothing ever setting that as true!
Is there anything you forgot? :-)
Cheers,
Angelo
Powered by blists - more mailing lists