All of lore.kernel.org
 help / color / mirror / Atom feed
From: 李云龙 <liyunlonga@uniontech.com>
To: "Neil Armstrong" <narmstrong@baylibre.com>,
	"Phong LE" <ple@baylibre.com>,
	"Andrzej Hajda" <a.hajda@samsung.com>,
	"Robert Foss" <robert.foss@linaro.org>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Laurent.pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Jonas Karlman" <jonas@kwiboo.se>
Subject: Re: [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment
Date: Thu, 10 Mar 2022 08:37:06 +0000	[thread overview]
Message-ID: <tencent_69C864C07353057630651273@qq.com> (raw)
In-Reply-To: <13a71cec-06ef-d4d1-948e-c62d4c91d80f@baylibre.com>

[-- Attachment #1: Type: text/plain, Size: 3506 bytes --]

I tested it on Loongarch and MIPS, and the results were fine。
&nbsp;
&nbsp;
------------------&nbsp;Original&nbsp;------------------
From: &nbsp;"Neil&nbsp;Armstrong"<narmstrong@baylibre.com&gt;;
Date: &nbsp;Tue, Sep 21, 2021 08:28 AM
To: &nbsp;"Yunlongli"<liyunlonga@uniontech.com&gt;; "Phong LE"<ple@baylibre.com&gt;; "Andrzej Hajda"<a.hajda@samsung.com&gt;; "Robert Foss"<robert.foss@linaro.org&gt;; "David Airlie"<airlied@linux.ie&gt;; "Daniel Vetter"<daniel@ffwll.ch&gt;; 
Cc: &nbsp;"Laurent.pinchart"<Laurent.pinchart@ideasonboard.com&gt;; "Jonas Karlman"<jonas@kwiboo.se&gt;; "Jernej Skrabec"<jernej.skrabec@gmail.com&gt;; "dri-devel"<dri-devel@lists.freedesktop.org&gt;; "linux-kernel"<linux-kernel@vger.kernel.org&gt;; 
Subject: &nbsp;Re: [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment

&nbsp;

Hi,

On 21/09/2021 09:54, Yunlongli wrote:
&gt; In the actual tests,&nbsp; the IT66121 chip sometimes misjudged whether
&gt; it had an external screen, so, reference the it66121_user_guid.pdf
&gt; about Audio/Video data is stable or not A typical initialization
&gt; of HDMI link should be based on interrupt signal and appropriate
&gt; register probing. Recommended flow is detailed in IT66121
&gt; Programming Guide. Simply put, the microcontroller should monitor
&gt; the HPD status first. Upon valid HPD event, move on to check
&gt; RxSENDetect register to see if the receiver chip is ready for
&gt; further handshaking. When RxSENDetect is asserted, start reading EDID
&gt; data through DDC channels and carry on the rest of the handshaking
&gt; subsequently.If the micro-controller makes no use of the interrupt
&gt; signal as well as the above-mentioned status&nbsp; registers, the link
&gt; establishment might fail. Please do follow the suggested
&gt; initialization flow recommended in IT66121 Programming Guide.
&gt; So, I add the IT66121_SYS_STATUS_SENDECTECT register status detection.

Ok, the RxSENDetect is the "rx-sense" detection bit as described in the same doc:

Receiver detection circuit reports the presence or absence of an active termination at the TMDS Clock Channel (RxSENDetect)

The usage of the rx-sense signal in hpd_detect() is not clear because this would break detection of "Fake" EDID dongles or idle monitors.

The dw-hdmi handles the rx-sense, but only to power-on/off the HDMI TX, but only returns the HPD status to DRM without the RX SENSE state,
so it only saves power and doesn't change anything on DRM HPD detection.

So not sure if we should merge this as-is.

Neil

&gt; 
&gt; Signed-off-by: Yunlongli <liyunlonga@uniontech.com&gt;
&gt; ---
&gt;&nbsp; drivers/gpu/drm/bridge/ite-it66121.c | 2 +-
&gt;&nbsp; 1 file changed, 1 insertion(+), 1 deletion(-)
&gt; 
&gt; diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
&gt; index 2f2a09adb4bc..9ed4fa298d11 100644
&gt; --- a/drivers/gpu/drm/bridge/ite-it66121.c
&gt; +++ b/drivers/gpu/drm/bridge/ite-it66121.c
&gt; @@ -523,7 +523,7 @@ static bool it66121_is_hpd_detect(struct it66121_ctx *ctx)
&gt;&nbsp; 	if (regmap_read(ctx-&gt;regmap, IT66121_SYS_STATUS_REG, &amp;val))
&gt;&nbsp; 		return false;
&gt;&nbsp; 
&gt; -	return val &amp; IT66121_SYS_STATUS_HPDETECT;
&gt; +	return ((val &amp; IT66121_SYS_STATUS_HPDETECT) &amp;&amp; (val &amp; IT66121_SYS_STATUS_SENDECTECT));
&gt;&nbsp; }
&gt;&nbsp; 
&gt;&nbsp; static int it66121_bridge_attach(struct drm_bridge *bridge,
&gt;

[-- Attachment #2: Type: text/html, Size: 4134 bytes --]

  reply	other threads:[~2022-03-10  8:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21  7:54 [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment Yunlongli
2021-09-21  8:27 ` Neil Armstrong
2022-03-10  8:37   ` 李云龙 [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-09-18  3:55 Yunlongli
2021-09-18  3:50 Yunlongli
2021-09-20  9:47 ` Robert Foss
2021-09-20  9:47   ` Robert Foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_69C864C07353057630651273@qq.com \
    --to=liyunlonga@uniontech.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=ple@baylibre.com \
    --cc=robert.foss@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.