From patchwork Wed Oct 19 08:27:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 4703 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp213757wrs; Wed, 19 Oct 2022 02:11:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZE7BzxudUQGaW12rYhn4JoPuZXD4WV5kd3n/RFF1mqQiJPRDdZ3c5iynKu/AYdjyeOMBP X-Received: by 2002:a05:6402:3988:b0:44e:6f08:ddfb with SMTP id fk8-20020a056402398800b0044e6f08ddfbmr6393702edb.89.1666170660280; Wed, 19 Oct 2022 02:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666170660; cv=none; d=google.com; s=arc-20160816; b=hvtdwBimkRcSS3rmksbzKc9DaJxkNEEbN6vwy7GE7m7vTJxZcg8nmcWG4D3xYve2bG 7FOjQsRuYYEz4Uo9zg+CXovS761vZbc7TGiwGUsDIai+QmeAIdNyIS3aNkCIkLAsXr/f wyIvRKu8w443vbYl8vReKU3nPHwPaeLPwX7J+Gn9S8EMfpI9QSYXeQc9gG6tW0NkK4qa WK6rKRpuWVGKatSYH+YcjAvi6oR2M+r4MMvgI8hKp/vkAnPJivUCxxjsC0C55Z6/Ba7m UznroIoFEjjWpalfxzfnZrLaMOLsHq/DeyaOb/IaiNIVdaqnCr9MC5+n4jjU31zVcnMX K1ag== 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=WQnbJ1RZn4P3xJiuv5KXh4oqP8+sCeJzDONTRA7TuGbe7N7SdDoo7gBb/yEmaM3EaB ZRIYI5hxPNt2IvE4Ao+/RLg9XrG/lDwpKbG8P8DEheJ+AdUVmw/T7YhW6l4CQNnwruZA zsppyC0y/58BViSEYGPp8r6RizCYdRFrmxpsxxeSNXQJVYYdR+1S+1VDdEuO/6Irwn93 Vie3rsGfEBxHhMWM7o/+q8VUDrawlDz9sMNxecJrCXxK32x+887PTdNo7nmkYovuuEeU bFmYRt+dy2BhV6JEFW1tw3CwqPMbO3+1H+zYmlVUW3+AwFAudWAK4wg9aX8ic3NjlZAq wRSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YcKERcxL; 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 n19-20020a170906165300b0077c5ec87ec2si9685932ejd.297.2022.10.19.02.10.34; Wed, 19 Oct 2022 02:11:00 -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=YcKERcxL; 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 S232186AbiJSJGX (ORCPT + 99 others); Wed, 19 Oct 2022 05:06:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232568AbiJSJEg (ORCPT ); Wed, 19 Oct 2022 05:04:36 -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 7F190B03E6; Wed, 19 Oct 2022 01:57:57 -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 BEFE0617E4; Wed, 19 Oct 2022 08:56:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CF3E7C433D6; Wed, 19 Oct 2022 08:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169795; bh=CKtuwDOYPsb0DMnuLbGcnbkAajbl8yEKG+j15wLGQfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcKERcxLYLXpMghenyV6GXX2eaLVYJ91YPcOHTItha1JgdyjFwSUA3upkUWENBvc8 cHsYg/7QYN+SSzpTg2pKgAB3fAekuJRyIrJsat1LdGi53ggWG/b7XLHMDAxnq193l6 QD0g43NXPCVAGcdIKZeTym3FwMc9ln+xId5E+X78= 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 6.0 379/862] drm/bridge: it6505: Fix the order of DP_SET_POWER commands Date: Wed, 19 Oct 2022 10:27:46 +0200 Message-Id: <20221019083306.719583623@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747106566309353105?= X-GMAIL-MSGID: =?utf-8?q?1747106566309353105?= 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); } }