Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3798312ybi; Mon, 29 Jul 2019 12:50:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNViyxZeEpHjT8Eq2FFQuUVEHZ1WWmH5Rt5/hzeieenHonQP8ZITt7eT7mgk6/gxWqSQel X-Received: by 2002:a17:902:2a69:: with SMTP id i96mr110403860plb.108.1564429831901; Mon, 29 Jul 2019 12:50:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429831; cv=none; d=google.com; s=arc-20160816; b=ZMkLWwm6o+juWd0Co+doAvMnYxp6lpp9Y5SqrFNGm8bsT9jexrLq6dGSzIbImTe3qi JR1yQG+wpMSKAW4pAR2f19EAVjjrrcz++30pUtLyOecqx4xHwZ54cGNuZwGGG0O8Glts evIIPh0Ak+YbnRxRsLpAqHuljJhnIkqVwILntREZy/sLDFzEC1H82EFtLJEU5oGo0/dY ItYaq0IeySAz6aT+nWpdIqdS6m+PSWen1qvwqdLRfMg06sI8KO1j/xaYW7p3kS+amBgp oHgDn5XrLuuHMeABSyZj80g7d6upl9smlIIusjLVj24m4iSEKxH2Ba2aRsU6BdWlDhRd dqWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dRKo93JIKAG5qzHaa08I1oGf13NpA/5JmBtRLYw4P9g=; b=Evm/lyBnkXYmaOjTupqP22rF+xK2X1PcwbhURFYA0S5G5jc49jvE8ai4YmLHh+zwoT S9TxK9xZTjYEeQkTT3FPdlKcimUQrYlASZ2RBbosiVDeGOrhdx8vl0Y91O/FTCVrQlWy I8ngzEsG+H4ZUn5+Js3bmb4UIkmzl/277vD/6RxbEE+nlF1ggmRatSZliLNqfbndQRdj MvisrhOI/4ETPg4ZOFTvoWjvRe8H77D/joiA97kH5F4VlyIgTjKvpreLl1hbvCGJuVa/ Vm+CFarOta3Po6q4iHo6LpHYbgqJSnOXt0y0nUGBHo1H720o+8Pyk6+Wg3Asxkz/5Znl cdqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WNkZZ8xf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m68si31998840pfb.75.2019.07.29.12.50.17; Mon, 29 Jul 2019 12:50:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WNkZZ8xf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389657AbfG2Try (ORCPT + 99 others); Mon, 29 Jul 2019 15:47:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:37706 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389961AbfG2Trw (ORCPT ); Mon, 29 Jul 2019 15:47:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E87E2054F; Mon, 29 Jul 2019 19:47:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429671; bh=BHGsMctAAKajpWPyduF1Vy/iq5jNO/ew+a7KQB/4AGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WNkZZ8xf6UZUrrOAlnVPjvK5eOAv1xRn1GUfVX2OCnh3btBzKgZ2nHIczbzOKaBxq fX+8P//Pa4V+Cy4ebWTRVgU/VK7bBaBL7sEOWRit+Z40hmDR8NbRV6sYLbOvGqtyk7 hEuOzkYd8fdGlr8L4zoSCJBdRG6Sed2CiKCzC9o4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Samson Tam , Jun Lei , Bhawanpreet Lakha , Alex Deucher , Sasha Levin Subject: [PATCH 5.2 057/215] drm/amd/display: set link->dongle_max_pix_clk to 0 on a disconnect Date: Mon, 29 Jul 2019 21:20:53 +0200 Message-Id: <20190729190750.398062385@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 233d87a579b8adcc6da5823fa507ecb6675e7562 ] [Why] Found issue in EDID Emulation where if we connect a display using a passive HDMI-DP dongle, disconnect it and then try to emulate a display using DP, we could not see 4K modes. This was because on a disconnect, dongle_max_pix_clk was still set so when we emulate using DP, in dc_link_validate_mode_timing(), it would think we were still using a dongle and limit the modes we support. [How] In dc_link_detect(), set dongle_max_pix_clk to 0 when we detect a hotplug out ( if new_connection_type = dc_connection_none ). Signed-off-by: Samson Tam Reviewed-by: Jun Lei Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c index b37ecc3ede61..a3ff33ff6da1 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c @@ -960,6 +960,12 @@ bool dc_link_detect(struct dc_link *link, enum dc_detect_reason reason) link->type = dc_connection_none; sink_caps.signal = SIGNAL_TYPE_NONE; + /* When we unplug a passive DP-HDMI dongle connection, dongle_max_pix_clk + * is not cleared. If we emulate a DP signal on this connection, it thinks + * the dongle is still there and limits the number of modes we can emulate. + * Clear dongle_max_pix_clk on disconnect to fix this + */ + link->dongle_max_pix_clk = 0; } LINK_INFO("link=%d, dc_sink_in=%p is now %s prev_sink=%p dpcd same=%d edid same=%d\n", -- 2.20.1