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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B29DDC004C0 for ; Mon, 23 Oct 2023 11:50:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234609AbjJWLu7 (ORCPT ); Mon, 23 Oct 2023 07:50:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234615AbjJWLu6 (ORCPT ); Mon, 23 Oct 2023 07:50:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDBFD7B for ; Mon, 23 Oct 2023 04:50:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 202A5C433C7; Mon, 23 Oct 2023 11:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698061855; bh=xs3UhhUNkyMmy132IV2mC+b+bQdGXmQsud9i4ITmrps=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DnfiuBEHWr/OQlahTZSoFJ05mEwsw8LCR+wPE78g5aZgXI2l9lZSdUasazZgncPk2 0PKPXooX6SE8r5HAtaTmOOBpKzRI2nH7lT8PHtyUXHgBrjwiSdHpot61v7mEgXTCwA rS4GmUt1+aBqhlSwzJSaenHhzSHoPxN54HTRLdEc= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, RD Babiera , Heikki Krogerus , Sasha Levin Subject: [PATCH 5.10 150/202] usb: typec: altmodes/displayport: Signal hpd low when exiting mode Date: Mon, 23 Oct 2023 12:57:37 +0200 Message-ID: <20231023104830.910896267@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104826.569169691@linuxfoundation.org> References: <20231023104826.569169691@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: RD Babiera [ Upstream commit 89434b069e460967624903b049e5cf5c9e6b99b9 ] Upon receiving an ACK for a sent EXIT_MODE message, the DisplayPort driver currently resets the status and configuration of the port partner. The hpd signal is not updated despite being part of the status, so the Display stack can still transmit video despite typec_altmode_exit placing the lanes in a Safe State. Set hpd to low when a sent EXIT_MODE message is ACK'ed. Fixes: 0e3bb7d6894d ("usb: typec: Add driver for DisplayPort alternate mode") Cc: stable@vger.kernel.org Signed-off-by: RD Babiera Acked-by: Heikki Krogerus Link: https://lore.kernel.org/r/20231009210057.3773877-2-rdbabiera@google.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/usb/typec/altmodes/displayport.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c index 8083d5faf0c98..def903e9d2ab4 100644 --- a/drivers/usb/typec/altmodes/displayport.c +++ b/drivers/usb/typec/altmodes/displayport.c @@ -285,6 +285,11 @@ static int dp_altmode_vdm(struct typec_altmode *alt, case CMD_EXIT_MODE: dp->data.status = 0; dp->data.conf = 0; + if (dp->hpd) { + drm_connector_oob_hotplug_event(dp->connector_fwnode); + dp->hpd = false; + sysfs_notify(&dp->alt->dev.kobj, "displayport", "hpd"); + } break; case DP_CMD_STATUS_UPDATE: dp->data.status = *vdo; -- 2.40.1