From patchwork Thu Jul 18 01:48:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lyude Paul X-Patchwork-Id: 11048425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C31406C5 for ; Thu, 18 Jul 2019 01:49:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B406428753 for ; Thu, 18 Jul 2019 01:49:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A80FC28796; Thu, 18 Jul 2019 01:49:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 645A228753 for ; Thu, 18 Jul 2019 01:49:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6A3DE6E2D7; Thu, 18 Jul 2019 01:49:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0414E88BBA; Thu, 18 Jul 2019 01:49:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6DE8F8E225; Thu, 18 Jul 2019 01:49:14 +0000 (UTC) Received: from whitewolf.redhat.com (ovpn-120-112.rdu2.redhat.com [10.10.120.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DDFB5D71A; Thu, 18 Jul 2019 01:49:10 +0000 (UTC) From: Lyude Paul To: amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu/dm: Remove unneeded hotplug event in s3_handle_mst() Date: Wed, 17 Jul 2019 21:48:56 -0400 Message-Id: <20190718014858.9257-1-lyude@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 18 Jul 2019 01:49:14 +0000 (UTC) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Li , Bhawanpreet Lakha , David Francis , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Nicholas Kazlauskas , David Airlie , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Anthony Koo Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The DRM DP MST topology manager will send it's own hotplug events when connectors are destroyed, so there's no reason to send an additional hotplug event here. Signed-off-by: Lyude Paul --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 0242d693f4f6..156eeacee2ae 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -812,7 +812,6 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend) struct drm_connector *connector; struct drm_dp_mst_topology_mgr *mgr; int ret; - bool need_hotplug = false; drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); @@ -831,15 +830,15 @@ static void s3_handle_mst(struct drm_device *dev, bool suspend) ret = drm_dp_mst_topology_mgr_resume(mgr); if (ret < 0) { drm_dp_mst_topology_mgr_set_mst(mgr, false); - need_hotplug = true; + mutex_lock(&aconnector->hpd_lock); + aconnector->dc_link->type = + dc_connection_single; + mutex_unlock(&aconnector->hpd_lock); } } } drm_modeset_unlock(&dev->mode_config.connection_mutex); - - if (need_hotplug) - drm_kms_helper_hotplug_event(dev); } /**