[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3cd66cc0adc84619150bc96416974bceb0b4e917.camel@mediatek.com>
Date: Tue, 5 Jul 2022 17:51:54 +0800
From: Rex-BC Chen <rex-bc.chen@...iatek.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>,
"mripard@...nel.org" <mripard@...nel.org>,
"tzimmermann@...e.de" <tzimmermann@...e.de>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"deller@....de" <deller@....de>,
"airlied@...ux.ie" <airlied@...ux.ie>
CC: "msp@...libre.com" <msp@...libre.com>,
"granquet@...libre.com" <granquet@...libre.com>,
Jitao Shi (石记涛)
<jitao.shi@...iatek.com>,
"wenst@...omium.org" <wenst@...omium.org>,
CK Hu (胡俊光)
<ck.hu@...iatek.com>,
"LiangXu Xu (徐亮)"
<LiangXu.Xu@...iatek.com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-fbdev@...r.kernel.org" <linux-fbdev@...r.kernel.org>,
Project_Global_Chrome_Upstream_Group
<Project_Global_Chrome_Upstream_Group@...iatek.com>
Subject: Re: [PATCH v13 06/10] drm/mediatek: Add MT8195 External DisplayPort
support
On Fri, 2022-07-01 at 16:14 +0800, AngeloGioacchino Del Regno wrote:
> 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
Hello Angelo,
Thanks for your review.
We do not support fec currently, so I will drop them.
Thanks!
BRs,
Bo-Chen
Powered by blists - more mailing lists