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 A0F55E7E368 for ; Fri, 3 Apr 2026 18:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=R8kBpJ7ZeuFSOjCjTzBI6sXQvLoU6tJeqKD5pP7hexI=; b=bZjJH/XrMOPer1 Hc1vP0OltD1fyR8lTSMFwVePFcuYc3IISLxscN/VQh/v2clZFsoR+nMPslOfYE/zmLHqAHYzJwIMV CxLFugyLnzJyUCTQoOrdn3Q9xSWLajR77QhT0ss5Z/TIXUKaUeqkTVE0slZgGA3isWi0v/kxQAzGl CFwIlLjkIVP6EmseaDLVOoG2D/6dGAu6TQWRpjimUEka84trRWBdD5yRMC68hey/5Bw7joREIGp+r iuwe1Razj3htrHoBM46i2zlAd05vuxzglkycS+FAf7zPwsv+4cIQOdEPQ3Wki7GyUN+36v9b+RajB JyaVPPnEVfEWmAC3nCPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1w8jf4-00000002SNj-2nqp; Fri, 03 Apr 2026 18:54:30 +0000 Received: from smtp.forwardemail.net ([149.28.215.223]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1w8jf2-00000002SMV-0bgf for linux-rockchip@lists.infradead.org; Fri, 03 Apr 2026 18:54:29 +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=1775242467; bh=nIExr6iDGsDdBSnhO/V+GvTLLv5LVYrkOA1x0N8PkF4=; b=nkO1H0E8/aC4O6MDeu5k5waWL1jEZoDzCChrG+5HIZu45ub07aXbLWtUyvF6nSiOgliYPzc1C J8zOZUe79V8LYC8MBy27FjlN/ysjov60R7sacJS9V4O3MIxUGalPAFe07PxXWchJtSU+2jlb46C OVGwT5+3H4H8SvhMkqPoGz212aCw7uz1/9OTCee9pLHj0JI3fhSeTsJdQQ8NAaI9idDFeUlsdEh zTYHygEEHy2ZYIhAYWFUJyzpzQcjvdQ8ieTCiK0tL2srM0jKC+XV6TVEikeOq/lq0iYNllVe1+k ppkVF34Kxh7/J3FNvk4b9m8wKmvb6PdG443ubQCzkRrA== X-Forward-Email-ID: 69d00cdbdc98192b40b89432 X-Forward-Email-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-Forward-Email-Version: 2.6.68 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 , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Christian Hewitt , Diederik de Haas , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 12/13] drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update() Date: Fri, 3 Apr 2026 18:52:58 +0000 Message-ID: <20260403185303.80748-13-jonas@kwiboo.se> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260403185303.80748-1-jonas@kwiboo.se> References: <20260403185303.80748-1-jonas@kwiboo.se> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260403_115428_185913_E5EB0356 X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=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. Signed-off-by: Jonas Karlman --- v3: Reworked 'Update EDID during hotplug processing' patch --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 24 +++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 0d42fdf9a386..5b5654ef6015 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2474,33 +2474,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); } @@ -2530,14 +2533,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 const struct drm_connector_funcs dw_hdmi_connector_funcs = { -- 2.53.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip