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 DA52CCD4F3C for ; Sat, 16 May 2026 18:39:11 +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: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:In-Reply-To:References:List-Owner; bh=dfndXVidH5RTMM2gW7UV1tiuYgAvxvnGyXF5eGwtDzI=; b=VRleS5hOF+Sbh0DbM+EVWWbAb6 y3n5MtXstKavU8zLLTBd9HJ0D2b1LnBZyfCZZkwoSbdxMC7OvI3vk8VWQ3kZ9EhIbpkD9fySTTUsr gSkthb/WeQHqxttI2uwybDM0KZqKjv1bo6fSyrpUWmV5Lvto4ZI96744kHel92Kaqv/50R7MR0TAb Xi/B1G6b6e03G6qDRb0gXHhNZ/BxSUaMMyYVigWR9myP6vbIrCYhpEe9+DwmlF0zxQWFPLZla9rzj 5YxZNSEbfUg1i0z17x0pfbitxCNTVv8g75D/yOm+XJWqkB/LPdCp9qzrc5pYd5R2zPmmgtZJIDWu/ Nivc00YA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wOJui-0000000BEgE-1QMe; Sat, 16 May 2026 18:39:04 +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 1wOJua-0000000BEb7-1bmj for linux-arm-kernel@lists.infradead.org; Sat, 16 May 2026 18:39:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1778956735; bh=dfndXVidH5RTMM2gW7UV1tiuYgAvxvnGyXF5eGwtDzI=; b=R+G3914Tx3FMEP6MTZrtLMn2BXCU80uEFcuoUmQfgTBEiRwd6TTy/mPGKctPCYalakpV9Rg9/ Tu1sD8vUGy+CzkwX351V1M6s7gxkkZ8+x2ZsFVd6sjzrUnxAaXUnN8rw/r9tBT3IFmXc7D2hwEv +NVcsSNO2NAqAS63c21swn6CxyZBbxt9hlUZNc0L+zEA96bquDT3h7rarqpOvTHvrKCIDVbC7fc nOD/Vw7muzPuw5XbmEpaYkvhU2dVW8q/qsecGsr0hkAOFu3wxpRlLOAeMRHAbwznILZ6bVuPMD/ 9STMClwKYb/9Xehk0zmuIcXtSP2ZDtYf590AU0Cv0Ssw== X-Forward-Email-ID: 6a08b9b479c7625f20eeecec X-Forward-Email-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 121.127.44.66 X-Forward-Email-Version: 2.8.12 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 Cc: Laurent Pinchart , Jernej Skrabec , Luca Ceresoli , Liu Ying , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , 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, Jonas Karlman Subject: [PATCH v6 00/22] drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup Date: Sat, 16 May 2026 18:38:10 +0000 Message-ID: <20260516183838.2024991-1-jonas@kwiboo.se> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260516_113856_819895_2DED32D4 X-CRM114-Status: GOOD ( 15.92 ) 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 This is a revival of an old dw-hdmi series and is the first series part of a new effort to upstream old LibreELEC HDMI 2.0 patches for Rockchip RK33xx devices. This series ensure poweron/poweroff and CEC phys addr invalidation is happening during normal DRM funcs, ensures EDID and CEC phys addr is updated in detect() similar to how the bridge connector works with a HDMI bridge attached, and also changes to debounce hotplug processing to prevent a full disable/enable cycle during a HPD low voltage pulse. After this series HPD, EDID and CEC handling should work very similar regardless is the dw-hdmi connector or the bridge connector is used. It should also help ensure a smoother transition when dw-hdmi is fully converted into a HDMI bridge in a future series. These changes have mainly been tested on Rockchip RK3328, RK3399 and RK3568 devices using both the dw-hdmi connector and also using a basic convert to use a bridge connector. The changes has also been tested on a Amlogic S905X device that uses the bridge connector. Testing with a Rock Pi 4 (RK3399) using a Reaspberry Pi Monitor with Linux kms client console using drm.debug=0xe should log something like following: Power cycle monitor using the power button: [CONNECTOR:68:HDMI-A-1] CEA VCDB 0x4a [CONNECTOR:68:HDMI-A-1] HDMI: DVI dual 0, max TMDS clock 0 kHz [CONNECTOR:68:HDMI-A-1] ELD monitor RPI MON156 [CONNECTOR:68:HDMI-A-1] HDMI: latency present 0 0, video latency 0 0, audio latency 0 0 [CONNECTOR:68:HDMI-A-1] ELD size 36, SAD count 1 [CONNECTOR:68:HDMI-A-1] Same epoch counter 10 Cable unplugged: [CONNECTOR:68:HDMI-A-1] EDID changed, epoch counter 11 [CONNECTOR:68:HDMI-A-1] status updated from connected to disconnected [CONNECTOR:68:HDMI-A-1] Changed epoch counter 10 => 12 [CONNECTOR:68:HDMI-A-1] generating connector hotplug event [CONNECTOR:68:HDMI-A-1] Sent hotplug event Cable connected: [CONNECTOR:68:HDMI-A-1] CEA VCDB 0x4a [CONNECTOR:68:HDMI-A-1] HDMI: DVI dual 0, max TMDS clock 0 kHz [CONNECTOR:68:HDMI-A-1] ELD monitor RPI MON156 [CONNECTOR:68:HDMI-A-1] HDMI: latency present 0 0, video latency 0 0, audio latency 0 0 [CONNECTOR:68:HDMI-A-1] ELD size 36, SAD count 1 [CONNECTOR:68:HDMI-A-1] status updated from disconnected to connected [CONNECTOR:68:HDMI-A-1] Changed epoch counter 12 => 13 [CONNECTOR:68:HDMI-A-1] generating connector hotplug event [CONNECTOR:68:HDMI-A-1] Sent hotplug event This series has evolved into an initial part of a larger multi series effort to: - drm: bridge: dw_hdmi: Misc enable/disable, CEC and EDID cleanup [v6] - drm/bridge: dw-hdmi: Improve input/output bus format handling - drm/bridge: dw-hdmi: Convert to a HDMI bridge and use of bridge connector - drm/bridge: dw-hdmi: Add and use tmds_char_rate_valid() plat data ops - drm/meson: hdmi: Misc cleanup and use CEC notifier helpers - phy: rockchip: inno-hdmi: Change TMDS rate handling to configure() ops [v3] - drm/rockchip: dw_hdmi: Misc cleanup and propagate bus format [v1] - drm/rockchip: dw_hdmi: Enable YCbCr and Deep Color modes Link to snapshot: https://github.com/Kwiboo/linux-rockchip/commits/next-20260508-rk-hdmi-v4/ Changes in v6: - Update EDID and CEC phys addr in the bridge detect() func - Add CEC notifier bridge op for the bridge connector - Change back to disable_delayed_work_sync() in hpd disable ops, a possible deadlock is avoided by not using drm_bridge_hpd_notify() - Drop use of a suspend helper now that hpd disable ops use sync() calls - Ensure HPD interrupt is masked and IRQ handler is disabled early in dw_hdmi_remove() to prevent any irq re-arming of delayed work - Update a few commit messages and cover letter - Collect t-b tags Link to v5: https://lore.kernel.org/dri-devel/20260510124111.1226584-1-jonas@kwiboo.se/ Changes in v5: - Add patch that holds a bridge ref until connector cleanup, to fix a use-after-free issue during connector cleanup - Add patch that unregister CEC notifier during connector cleanup - Add patch that adds a common suspend helper - Add patch that drops call to drm_bridge_hpd_notify() - Collect r-b tag - Rebased on next-20260508 Link to v4: https://lore.kernel.org/dri-devel/20260504191059.275928-1-jonas@kwiboo.se/ Changes in v4: - Change to use generic CEC notifier helpers - Disable/mask hpd_work until enable_hpd()/hpd_enable() - Read connector status directly from HW regs in hpd_work - Continued rework of HDP and RXSENSE interrupt handling - Collect r-b tags - Rebased on next-20260430 Link to v3: https://lore.kernel.org/dri-devel/20260403185303.80748-1-jonas@kwiboo.se/ Changes in v3: - Rework EDID refresh handling to closer match bridge connector - Use delayed work to debounce HPD processing - Update commit messages - Collect r-b tags - Rebased on next-20260401 Link to v2: https://lore.kernel.org/dri-devel/20240908132823.3308029-1-jonas@kwiboo.se/ Changes in v2: - Add patch to disable scrambler feature when not supported - Add patch to only notify connected status on HPD interrupt - Update commit messages - Collect r-b tags - Rebased on next-20240906 Link to v1: https://lore.kernel.org/dri-devel/20240611155108.1436502-1-jonas@kwiboo.se/ Jonas Karlman (22): drm: bridge: dw_hdmi: Disable scrambler feature when not supported drm: bridge: dw_hdmi: Only notify connected status on HPD interrupt drm: bridge: dw_hdmi: Call poweron/poweroff from atomic enable/disable drm: bridge: dw_hdmi: Use passed mode instead of stored previous_mode drm: bridge: dw_hdmi: Fold poweron and setup functions drm: bridge: dw_hdmi: Remove previous_mode and mode_set drm: bridge: dw_hdmi: Hold bridge ref until connector cleanup drm: bridge: dw_hdmi: Unregister CEC notifier during connector cleanup drm: bridge: dw_hdmi: Invalidate CEC phys addr from connector detect drm: bridge: dw_hdmi: Remove cec_notifier_mutex drm: bridge: dw_hdmi: Extract dw_hdmi_connector_status_update() drm: bridge: dw_hdmi: Use dw_hdmi_connector_status_update() drm: bridge: dw_hdmi: Use generic CEC notifier helpers drm: bridge: dw_hdmi: Update EDID and CEC phys addr in bridge detect() drm: bridge: dw_hdmi: Declare bridge CEC notifier support drm: bridge: dw_hdmi: Use display_info is_hdmi and has_audio drm: bridge: dw_hdmi: Drop call to drm_bridge_hpd_notify() drm: bridge: dw_hdmi: Use delayed_work to debounce hotplug event drm: bridge: dw_hdmi: Rework HDP and RXSENSE interrupt handling drm: bridge: dw_hdmi: Remove the empty dw_hdmi_setup_rx_sense() drm: bridge: dw_hdmi: Remove the empty dw_hdmi_phy_update_hpd() drm: bridge: dw_hdmi: Merge top and bottom half IRQ handlers drivers/gpu/drm/bridge/imx/imx8mp-hdmi-tx.c | 1 - drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 498 ++++++++------------ drivers/gpu/drm/meson/meson_dw_hdmi.c | 3 - drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 2 - drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c | 2 - include/drm/bridge/dw_hdmi.h | 6 - 7 files changed, 187 insertions(+), 326 deletions(-) -- 2.54.0