From patchwork Sat Oct 22 07:23:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7787 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1122250wrr; Sat, 22 Oct 2022 02:30:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM45nJe/kpxY3DHL68cHTXojCpj0y7YKMcJl8NEo+3EEPQIdqbBB2jOcPs3TLOf1jIetkSEB X-Received: by 2002:a17:902:c948:b0:186:7baa:10ef with SMTP id i8-20020a170902c94800b001867baa10efmr6521623pla.73.1666431039409; Sat, 22 Oct 2022 02:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666431039; cv=none; d=google.com; s=arc-20160816; b=cXS+hCWNyuBMokJ3VGItbUuqAC/+SRYq6s5Ujy4CJPoXenchJ9qnSc+3+6Jkjiz5I9 xvqXT48ZlsCbLbkiS40iIAGWqJqX4n48JI499BxqF3d01uh28/4Dx3DqQ5/9xUHCGEib nqHdiN07Lrm4wobvWWu+0JGRWaryc4VNsmPItITSjytoIkljLjxnFET1W4eqKrv16bMi pQttfM7xjlNlK+Fhb+fl/ITz5rTb0aTzsDKn1Q7ES0whKX3i06Z844eUQPfXEAKXo5+b 1vfDtbH12fMmDam2ZqcF8bApmIUaiAjFw4+9R7EGEhrGWDiP1Vrnq3XHAJiloRE590Tq Z2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fhpuDQ2nH0LSgh8M6dGSNDvkPRO2mW78msTpYQRkbhg=; b=GS58uqeiR1qfa2uU4i1R0S2bRvyg98xuTdqWNpCEA0QmrqQPvJR6VcmqnYabhdoS14 n0KVvE7EusJsa7lXvISfTizVs5wpxS8/PLzbCSU8ioX/XHJzxKBhvfyEA9SFk/zMrKsb rYMuS7S+9CKibgMqoG3EVf6XNCXf+WkIzI9kMZ4ANMbeq2JcqXeM4HG+8zQQMhmmDM4x huzesEhMh7/5CdVnDd4w4tlcs3JxoxRQnfri2bJkVPDrUflPeWPLQtToC5nl5mPLvtPL UwL4IzrtpgtE7Czc3DOQvQ3Utz+NHmhMRRfw/eifSAHJgNUDNWcxp2Ovzk6PrxpjoqTY VvYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u3yjSkGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a6555cb000000b00438b7cb3311si30533338pgs.501.2022.10.22.02.30.25; Sat, 22 Oct 2022 02:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u3yjSkGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232022AbiJVJLy (ORCPT + 99 others); Sat, 22 Oct 2022 05:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232165AbiJVJLa (ORCPT ); Sat, 22 Oct 2022 05:11:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02BD32514E3; Sat, 22 Oct 2022 01:25:42 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 6564560B0C; Sat, 22 Oct 2022 07:48:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 766DCC433C1; Sat, 22 Oct 2022 07:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424902; bh=CKtuwDOYPsb0DMnuLbGcnbkAajbl8yEKG+j15wLGQfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u3yjSkGKQ1+NLzAf42T76EK+ulDzpZarpQjMrYhqKF3aqP6Z7nvtgtU3JO2YemP3b N3pE6TpE5XhflqeJKXpCWP7Lf+3aTC2sZ6NwK9oQvJ+hH381gFqfy7reMIesbdpPtQ 7J48jMsXzJVCZ63Hp6ut5hzCdwrZ9ehIiigLfW/Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pin-yen Lin , Robert Foss , Sasha Levin Subject: [PATCH 5.19 319/717] drm/bridge: it6505: Fix the order of DP_SET_POWER commands Date: Sat, 22 Oct 2022 09:23:18 +0200 Message-Id: <20221022072508.422913883@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747379593585221804?= X-GMAIL-MSGID: =?utf-8?q?1747379593585221804?= From: Pin-yen Lin [ Upstream commit 7c1dceaffd99247bf443606730515b54d6285969 ] Send DP_SET_POWER_D3 command to the downstream before stopping DP, so the suspend process will not be interrupted by the HPD interrupt. Also modify the order in .atomic_enable callback to make the callbacks symmetric. Fixes: 46ca7da7f1e8 ("drm/bridge: it6505: Send DPCD SET_POWER to downstream") Signed-off-by: Pin-yen Lin Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20220830045756.1655954-1-treapking@chromium.org Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/ite-it6505.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c index e5626035f311..a09d1a39ab0a 100644 --- a/drivers/gpu/drm/bridge/ite-it6505.c +++ b/drivers/gpu/drm/bridge/ite-it6505.c @@ -2945,9 +2945,6 @@ static void it6505_bridge_atomic_enable(struct drm_bridge *bridge, if (ret) dev_err(dev, "Failed to setup AVI infoframe: %d", ret); - it6505_drm_dp_link_set_power(&it6505->aux, &it6505->link, - DP_SET_POWER_D0); - it6505_update_video_parameter(it6505, mode); ret = it6505_send_video_infoframe(it6505, &frame); @@ -2957,6 +2954,9 @@ static void it6505_bridge_atomic_enable(struct drm_bridge *bridge, it6505_int_mask_enable(it6505); it6505_video_reset(it6505); + + it6505_drm_dp_link_set_power(&it6505->aux, &it6505->link, + DP_SET_POWER_D0); } static void it6505_bridge_atomic_disable(struct drm_bridge *bridge, @@ -2968,9 +2968,9 @@ static void it6505_bridge_atomic_disable(struct drm_bridge *bridge, DRM_DEV_DEBUG_DRIVER(dev, "start"); if (it6505->powered) { - it6505_video_disable(it6505); it6505_drm_dp_link_set_power(&it6505->aux, &it6505->link, DP_SET_POWER_D3); + it6505_video_disable(it6505); } }