mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Yakovlev <vovchkir@gmail.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: vovchkir@gmail.com
Subject: [PATCH] drm/bridge: lontium-lt9611uxc: start wake all thread when call detect()
Date: Wed,  3 Sep 2025 02:18:19 +0300	[thread overview]
Message-ID: <20250902231821.2943-2-vovchkir@gmail.com> (raw)
In-Reply-To: <20250902231821.2943-1-vovchkir@gmail.com>

The chip does not receive an interrupt if the monitor was connected
before powering up.
Therefore, you need to wake up the task if the necessary bits are set
when calling bridge_detect() after DRM is started.

Signed-off-by: Vladimir Yakovlev <vovchkir@gmail.com>
---
 drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index 748bed8acd2d..5051cdfe2fee 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -358,17 +358,24 @@ static enum drm_connector_status lt9611uxc_bridge_detect(struct drm_bridge *brid
 	unsigned int reg_val = 0;
 	int ret;
 	bool connected = true;
+	bool edid_read = true;
 
 	lt9611uxc_lock(lt9611uxc);
 
 	if (lt9611uxc->hpd_supported) {
 		ret = regmap_read(lt9611uxc->regmap, 0xb023, &reg_val);
 
-		if (ret)
+		if (ret) {
 			dev_err(lt9611uxc->dev, "failed to read hpd status: %d\n", ret);
-		else
+		} else {
+			dev_dbg(lt9611uxc->dev, "detect() reg[0xb023]=0x%02X\n", reg_val);
 			connected  = reg_val & BIT(1);
+			edid_read = reg_val & BIT(0);
+			if (edid_read)
+				wake_up_all(&lt9611uxc->wq);
+		}
 	}
+	lt9611uxc->edid_read = edid_read;
 	lt9611uxc->hdmi_connected = connected;
 
 	lt9611uxc_unlock(lt9611uxc);
-- 
2.34.1


  reply	other threads:[~2025-09-02 23:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 23:18 [PATCH] drm/bridge: lontium-lt9611uxc: disable audio capture for HDMI card Vladimir Yakovlev
2025-09-02 23:18 ` Vladimir Yakovlev [this message]
2025-09-02 23:18 ` [PATCH] drm/bridge: lontium-lt9611uxc: use irq as optional parameter Vladimir Yakovlev
2025-09-02 23:18 ` [PATCH] drm/bridge: lontium-lt9611uxc: use reset_gpio " Vladimir Yakovlev
2025-12-08 16:18 [PATCH] drm/bridge: lontium-lt9611uxc: start wake all thread when call detect() Vladimir Yakovlev

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=20250902231821.2943-2-vovchkir@gmail.com \
    --to=vovchkir@gmail.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®