Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933167AbbHXOEz (ORCPT ); Mon, 24 Aug 2015 10:04:55 -0400 Received: from mail-bn1bon0134.outbound.protection.outlook.com ([157.56.111.134]:6240 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932184AbbHXOEv convert rfc822-to-8bit (ORCPT ); Mon, 24 Aug 2015 10:04:51 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NTLAFM-08-4HN-02 X-M-MSG: From: "Deucher, Alexander" To: Jerome Glisse , "cpaul@redhat.com" CC: "Koenig, Christian" , David Airlie , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" , Jerome Glisse , "Benjamin Tissoires" , "stable@vger.kernel.org" Subject: RE: [PATCH] DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd Thread-Topic: [PATCH] DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd Thread-Index: AQHQ3D2aryCAxWOUb0yLAvdnXj+rjp4bcXeA//+9gvA= Date: Mon, 24 Aug 2015 13:50:11 +0000 Message-ID: References: <1440180972-29580-1-git-send-email-cpaul@redhat.com> <20150824134740.GA1941@gmail.com> In-Reply-To: <20150824134740.GA1941@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.180.168.240] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD027;1:64ahJjS1sfSKC/fjXie/HSg66buV8Q5AW4Uq6ULd/W1Z47e2g1BRFZCcSntTKyfjzstXSDU8MdDYhzXFtSurrPMXXmWxfBhjH67UcanNyYeltuU/zUtjk8UsugfPTcvxU2oX+qMtgtzVun3kok4/hX7kBDVS8JzvLlVP5gEsVrh/cigQuQ+km6RrUIgK81mRGWTd59zTsN6U7ZOID7kZJqS+sPUKyycEJi1KJcQT53rtIbOe2QK/Qxy1ttCvW4xZ5T1Zqca/EPonN9IuofXS/1oH6FFMS1RplQDsz3su2bs7XALtDEsJNCQPuoCPFeOuP4y3eMS32YrBFGWurVfp0A== X-Forefront-Antispam-Report: CIP:165.204.84.222;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(2980300002)(428002)(3050300001)(24454002)(189002)(199003)(164054003)(377454003)(13464003)(53416004)(68736005)(47776003)(5250100002)(62966003)(19580405001)(87936001)(189998001)(2656002)(19580395003)(64706001)(106466001)(5001860100001)(77156002)(105586002)(5001830100001)(50986999)(54356999)(106116001)(92566002)(76176999)(55846006)(46102003)(4001540100001)(102836002)(86362001)(5001920100001)(50466002)(46406003)(33656002)(2900100001)(101416001)(2501003)(5001770100001)(23726002)(97736004)(97756001)(2920100001)(5003600100002)(5004730100002)(2950100001)(5007970100001)(15583001);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR02MB1152;H:atltwp02.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;CY1PR02MB1152;2:sc55LdrkjqhypEN3wIs4MLM9oc7RvY8q/uYvC36WyhetfENERZuGRelbRjU563W5SuYee2Y4Tmgj8O5rP8dMlUixSj7SkI5ZqPThxz1mTiFOcrPVgmH/4DW1gJLT+xb4ZcJM/XOmP2F2HDeV/Q5BVzib+LWkP/S6rKhUmsxhMLM=;3:p5TmrsszG/lJWSwdwc5H3t6Emo9X/dy1BV+zz471gbp+1KyKmzD3txFSl7TE72SQocX4pdQ4H1UrX9jOoOqvDl697Oy1wAgxioAsemyOwwa3okLF19iVhaOIWW1LEBgJm3C02zIwlD0A4b/wZyi1Ub3aGqLyC6p8p9TMtO6LUbRWIZeKB6L0iyFYnC9yyS/4S5wGIxiuW63c8eT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EznpciFOq2Fg/9LlIc65HABKGlzGTSSaCsw/RA0ixxOLI39qY1QPNjP7/NInVQ6uDwF7Az8c+0ZBO9LGFv3vGMly1VUGGo6eeeDMFopKchb7YRaRXlTc+2uxyxWhUgHdQ+SqDKGtMxIqc5NUfAk1a9mLhfcPzxGrmvPJHDvXP5R2 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:CY1PR02MB1152;BCL:0;PCL:0;RULEID:;SRVR:CY1PR02MB1152; X-Forefront-PRVS: 06780E24F8 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR02MB1152;23:eYdKAXTxg0ye7srW8QvQrIctZ4fKzbPeyfolxF29R?= =?us-ascii?Q?0/ZayvapaYc/RC5CEpflWiidvCuyZoxjrWHfX05+MEZ//VeyWAG2mb92TnUV?= =?us-ascii?Q?J3cZv2z2HIo20gkUJktN/W0DcnPgHZE11sx/I7/PEIJUt05pNZ56LE98FlH3?= =?us-ascii?Q?dpeCiR7VVyTzaDzyE1nSRrxsAbzF82fBvpR44LS6ME2ccVrW0ARBMEKT1rb5?= =?us-ascii?Q?iBCanpnWBxGm3vTr1Y7OacNX/vMMGUoNMtRPd3jY0ILEMWexHerISwDwLpwM?= =?us-ascii?Q?awK7UNQEmfBp7x5Hua97ceuQ/wKC4r0Q2BH2Hun2YbcFGr8GWWUfbw/g3ovG?= =?us-ascii?Q?Wm7vIxO0advXlW3lxhlEvA7KEPM6yjKQPv735bXChwLVwg+yUruNtHRCRQpV?= =?us-ascii?Q?BP6raGXDuAU2AY+9YWJiWsM+M3ErRShYJ91oGioaN3MtF+qHpaviPXMMvPGd?= =?us-ascii?Q?GeZ86AetOITRf0PfxMjmy8CB4aSvIaGI/odgUcjRUljOAbWaRbhcciss0iVZ?= =?us-ascii?Q?rnaK83xPk8kMeqis+S1A0N+oqyw5q3Q8L740q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1;CY1PR02MB1152;5:J9dMePDyhMvnH+W3ZR2Tl4INtvn01Yv65aPYctg8qAw9+76PCZFJhPdWeGv+nrXWJ40iqWSoR2MkoA8fvwP2ynx5d4pKDFrYcDJLI4m9Nba1g0BqymP8JfTcs94Yy/1dZZusPouIttSshUdDPAC33Q==;24:ScXV71u/i3wl8nnmNnq1SB4tiBUtesJZOiSS2Us8HjS955BjtGoPZSMRQkIFyBPJ65sYXuQ+ftwDC8AzaYtelqb/aKxdYrNqJ/oz8JhdaEo=;20:l0Mv5iMw1aCQjB117sRbJG0XGsbvZnDHlLN3vigSJbktdPvpivp3+tibQb+bMIpQBtmc5bwD+mhJbcaO/oiAfw== SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2015 13:50:13.9796 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.222];Helo=[atltwp02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR02MB1152 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4228 Lines: 106 > -----Original Message----- > From: Jerome Glisse [mailto:j.glisse@gmail.com] > Sent: Monday, August 24, 2015 9:48 AM > To: cpaul@redhat.com > Cc: Deucher, Alexander; Koenig, Christian; David Airlie; dri- > devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; Jerome Glisse; > Benjamin Tissoires; stable@vger.kernel.org > Subject: Re: [PATCH] DRM - radeon: Don't link train DisplayPort on HPD until > we get the dpcd > > On Fri, Aug 21, 2015 at 02:16:12PM -0400, cpaul@redhat.com wrote: > > From: Stephen Chandler Paul > > > > Most of the time this isn't an issue since hotplugging an adaptor will > > trigger a crtc mode change which in turn, causes the driver to probe > > every DisplayPort for a dpcd. However, in cases where hotplugging > > doesn't cause a mode change (specifically when one unplugs a monitor > > from a DisplayPort connector, then plugs that same monitor back in > > seconds later on the same port without any other monitors connected), we > > never probe for the dpcd before starting the initial link training. What > > happens from there looks like this: > > > > - GPU has only one monitor connected. It's connected via > > DisplayPort, and does not go through an adaptor of any sort. > > > > - User unplugs DisplayPort connector from GPU. > > > > - Change in HPD is detected by the driver, we probe every > > DisplayPort for a possible connection. > > > > - Probe the port the user originally had the monitor connected > > on for it's dpcd. This fails, and we clear the first (and only > > the first) byte of the dpcd to indicate we no longer have a > > dpcd for this port. > > > > - User plugs the previously disconnected monitor back into the > > same DisplayPort. > > > > - radeon_connector_hotplug() is called before everyone else, > > and tries to handle the link training. Since only the first > > byte of the dpcd is zeroed, the driver is able to complete > > link training but does so against the wrong dpcd, causing it > > to initialize the link with the wrong settings. > > > > - Display stays blank (usually), dpcd is probed after the > > initial link training, and the driver prints no obvious > > messages to the log. > > > > In theory, since only one byte of the dpcd is chopped off (specifically, > > the byte that contains the revision information for DisplayPort), it's > > not entirely impossible that this bug may not show on certain monitors. > > For instance, the only reason this bug was visible on my ASUS PB238 > > monitor was due to the fact that this monitor using the enhanced framing > > symbol sequence, the flag for which is ignored if the radeon driver > > thinks that the DisplayPort version is below 1.1. > > > > Signed-off-by: Stephen Chandler Paul > > Reviewed-by: Jerome Glisse > > This should be added to stable > > cc: > I already added that when I pulled it into my tree :) Thanks, Alex > > > > --- > > drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c > b/drivers/gpu/drm/radeon/radeon_connectors.c > > index 94b21ae..5a2cafb 100644 > > --- a/drivers/gpu/drm/radeon/radeon_connectors.c > > +++ b/drivers/gpu/drm/radeon/radeon_connectors.c > > @@ -95,6 +95,11 @@ void radeon_connector_hotplug(struct > drm_connector *connector) > > if (!radeon_hpd_sense(rdev, radeon_connector- > >hpd.hpd)) { > > drm_helper_connector_dpms(connector, > DRM_MODE_DPMS_OFF); > > } else if > (radeon_dp_needs_link_train(radeon_connector)) { > > + /* Don't try to start link training before we > > + * have the dpcd */ > > + if (!radeon_dp_getdpcd(radeon_connector)) > > + return; > > + > > /* set it to OFF so that > drm_helper_connector_dpms() > > * won't return immediately since the current > state > > * is ON at this point. > > -- > > 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/