From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9A389CD37B9 for ; Sun, 10 May 2026 12:42:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZyXjV8RIEykXpQ/mO+NRxXhhNJY1zN/i06aVZnE2r3Y=; b=AUlq+bq5VD9Kuhnve9owGtS18c WtEu8iOuUraoC8uTcVlgPiI9vJBwJajhn5F20bQAGYPpoI0/Yp2bbXpcbtX/7Rla7W2eCzCpe7RWf Ppl0z4886CX8iB++kzOKODnXlLQ3ho1wM/J8UAsCs1lx1p7AHlPNnmT9nwuGpRYYDLk34tduCe0GR X0kXn+EYltZgEfXJ/4mYYN1JCcAljRy5QI+OOiouT9ZLujCYG+t2ocgKi7c+ylVlyLA+Kk6wH2w1Q 1+cYekWbr4p7Gsmd42pgLT7WjuwTkWDg++Tb3L1HtJhNEp7MVWn/F+YLUMXF28iQnxNOnDl2EMzEe J8Kyd2NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wM3Ub-0000000AkYu-16SR; Sun, 10 May 2026 12:42:45 +0000 Received: from smtp.forwardemail.net ([121.127.44.66]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wM3UV-0000000AkJi-0kE5 for linux-arm-kernel@lists.infradead.org; Sun, 10 May 2026 12:42:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1778416957; bh=ZyXjV8RIEykXpQ/mO+NRxXhhNJY1zN/i06aVZnE2r3Y=; b=PMPY976nuUnq8aacIWF6Xf0YnswzP3FwYi4HXrdlX9GvtpCNlqcW70DIzj+bVVU5F07XMddJe KtPKhDRJEWNywXPDzDO+i4qxA/8crsVrwSgBa34dpgAMWbyUTdIvpF79YYWq7+ZznyXnRmlurm7 78Od5F07KBkQpKFqsv6jHfBD8e9AHwmUyOPkwrhU0mJn7gpoySNFB69qUmppj+XXjj1eohvVmna pX2ciEILhKzfleqwbzoGESfZMXDrQ4XjJzZmTRWH+RY03WC3fv9XOnacqIP7uP6XTb2KltdkzoX JIDNc1hnNGwUMYriFAD0RyISnfJxIfNDCy8hKJB/YUZQ== X-Forward-Email-ID: 6a007d240d91f03a31a0bc92 X-Forward-Email-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 121.127.44.66 X-Forward-Email-Version: 2.8.0 X-Forward-Email-Website: https://forwardemail.net X-Complaints-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Report-Abuse-To: abuse@forwardemail.net From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong , Robert Foss , Heiko Stuebner , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Liu Ying , Sandy Huang , Andy Yan , Chen-Yu Tsai , Christian Hewitt , Diederik de Haas , Nicolas Frattaroli , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, imx@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v5 12/21] drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update() Date: Sun, 10 May 2026 12:40:56 +0000 Message-ID: <20260510124111.1226584-13-jonas@kwiboo.se> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260510124111.1226584-1-jonas@kwiboo.se> References: <20260510124111.1226584-1-jonas@kwiboo.se> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260510_054239_340350_201B967E X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Update connector EDID and CEC phys addr from detect and force funcs to ensure that userspace always have access to latest read EDID after a sink use a HPD low voltage pulse to indicate that EDID has changed. With EDID being updated in detect and force funcs, there should no longer be a need to re-read EDID in get_modes funcs, so drop it. This change make the dw-hdmi connector work more closely like the bridge connector does with a hdmi bridge. Reviewed-by: Nicolas Frattaroli Signed-off-by: Jonas Karlman --- v5: No change v4: Move last_connector_result assign in force ops to this patch, Collect r-b tag v3: Reworked 'Update EDID during hotplug processing' patch --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 25 ++++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 71f90a5f5e8b..006eaf3fb8cb 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2473,33 +2473,36 @@ dw_hdmi_connector_status_update(struct drm_connector *connector, struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); const struct drm_edid *drm_edid; + if (status == connector_status_disconnected) { + drm_edid_connector_update(connector, NULL); + cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); + return; + } + drm_edid = dw_hdmi_edid_read(hdmi, connector); drm_edid_connector_update(connector, drm_edid); drm_edid_free(drm_edid); - cec_notifier_set_phys_addr(hdmi->cec_notifier, - connector->display_info.source_physical_address); + if (status == connector_status_connected) + cec_notifier_set_phys_addr(hdmi->cec_notifier, + connector->display_info.source_physical_address); } static enum drm_connector_status dw_hdmi_connector_detect(struct drm_connector *connector, bool force) { - struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, - connector); + struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); enum drm_connector_status status; status = dw_hdmi_detect(hdmi); - if (status == connector_status_disconnected) - cec_notifier_phys_addr_invalidate(hdmi->cec_notifier); + dw_hdmi_connector_status_update(connector, status); return status; } static int dw_hdmi_connector_get_modes(struct drm_connector *connector) { - dw_hdmi_connector_status_update(connector, connector->status); - return drm_edid_connector_add_modes(connector); } @@ -2529,13 +2532,15 @@ static int dw_hdmi_connector_atomic_check(struct drm_connector *connector, static void dw_hdmi_connector_force(struct drm_connector *connector) { - struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, - connector); + struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi, connector); mutex_lock(&hdmi->mutex); hdmi->force = connector->force; + hdmi->last_connector_result = connector->status; dw_hdmi_update_phy_mask(hdmi); mutex_unlock(&hdmi->mutex); + + dw_hdmi_connector_status_update(connector, connector->status); } static void dw_hdmi_connector_destroy(struct drm_connector *connector) -- 2.54.0