From patchwork Wed May 25 16:08:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 9135819 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8B9F5607D7 for ; Wed, 25 May 2016 16:22:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DA7928255 for ; Wed, 25 May 2016 16:22:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 728FD282C0; Wed, 25 May 2016 16:22:59 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 74EA928255 for ; Wed, 25 May 2016 16:22:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 49FFC6E9B6; Wed, 25 May 2016 16:22:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0081.outbound.protection.outlook.com [207.46.100.81]) by gabe.freedesktop.org (Postfix) with ESMTPS id F28996E9B5 for ; Wed, 25 May 2016 16:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6yYUuY04KRqfJuC5KsaepN/1GoowqK9w/rkhygCFnK4=; b=btZV24UhXeZS2hrh5LsSyFLie0a0oHJKBkVPPvwjRdIuidDTUywMslpgvcsgHE94F7eSdK44OS2pApTNndDRVa3n0Ls/4mQGovPBzMtR0JD0WDxpzTzDWXxaBDagmg3Fdmyu9IfqrR70tkQ3m9MknXUjQShe9st3eHrNVV3U+78= Received: from CY1PR12CA0056.namprd12.prod.outlook.com (10.163.230.24) by SN1PR12MB0861.namprd12.prod.outlook.com (10.164.27.11) with Microsoft SMTP Server (TLS) id 15.1.497.12; Wed, 25 May 2016 16:08:36 +0000 Received: from BY2NAM03FT052.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::209) by CY1PR12CA0056.outlook.office365.com (2a01:111:e400:c42b::24) with Microsoft SMTP Server (TLS) id 15.1.501.7 via Frontend Transport; Wed, 25 May 2016 16:08:36 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.21) smtp.mailfrom=amd.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.21) by BY2NAM03FT052.mail.protection.outlook.com (10.152.85.223) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Wed, 25 May 2016 16:08:35 +0000 Received: from SATLEXDAG06.amd.com (10.181.40.13) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 25 May 2016 11:08:23 -0500 Received: from SCYBEXDAG01.amd.com (10.34.11.11) by satlexdag06.amd.com (10.181.40.13) with Microsoft SMTP Server (TLS) id 14.3.266.1; Wed, 25 May 2016 12:08:21 -0400 Received: from agrodzovsky-All-Series.amd.com (172.29.227.109) by SCYBEXDAG01.amd.com (10.34.11.11) with Microsoft SMTP Server id 14.3.266.1; Thu, 26 May 2016 00:08:17 +0800 From: Andrey Grodzovsky To: Subject: [PATCH] drm/dp/mst: Always clear proposed vcpi table for port. Date: Wed, 25 May 2016 12:08:23 -0400 Message-ID: <1464192503-26302-1-git-send-email-Andrey.Grodzovsky@amd.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.21; IPV:CAL; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(47776003)(2351001)(87936001)(92566002)(229853001)(19580405001)(50986999)(19580395003)(53416004)(106466001)(110136002)(105586002)(101416001)(86362001)(189998001)(4326007)(36756003)(5008740100001)(5003600100002)(6806005)(1220700001)(2906002)(586003)(5003940100001)(50466002)(48376002)(11100500001)(77096005)(8936002)(8676002)(50226002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0861; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-MS-Office365-Filtering-Correlation-Id: 073ed458-07e1-4843-5625-08d384b6d3a7 X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0861; 2:J6QeJNoM3gJomsyt1z5x+GRpFPRipcBgg+p3LQQq6TioHaTNmAzfCRIPHdaB4hKafbtifdubQHryaLUQaND7fvTsWZcnJG69J06B1rk4xH7qBVaJw/atY++rIg5+mm+Pj1DO1eTg12JEJ337fLFrP7KtkadRHf5Ohiiw8f/f7OGb5mcARkZykygy2uFguiz0; 3:/zjcp1HEm8b1U2261lR7KMqnTT4WHYKWnFoWGQpZTPm2SIXZzhAsinQNbH6eOeQ88JzSu/nPMno54NE87RdNwKxI1trFUyUaxPHIjiQjcE5WGaqqJ8xAD3+Zl5P6p7thSBOdZeEuFYfzfIPUWMZLWOz4KsHFtq4F73wlqF2DVK78c59W/EAPPg2nVpOalm1XKcU0GNOokKSQ5fbtCYkr/GiJKZqXhDD4NAWW/rY1pq4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0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BDcISHH/UQnnOwm3pP3gU3liGPtmsYFcUGaLDJa9KY0GzsN/DEUaN776gA5rTahLCMnsRew1J0NsWgrKAm6aR2R7hYVDfN5mDs+yb6pBXbvAhaSkA9cmPRTihWe7L/5nwv3+Y2V5C8sv4gfBXEpIxo0GQUzSUe3ddafdCxSYG46WuySy9Bjc4OiE10VmM5qEXz8U7rfjtW8BtlxuOmvh2t4SYiKJ3mLZnnM/oKmKcJXhasIaHL07/bSUo4g2sP3UyXSus2/BrAR6j3V218d3PAX/w/UturTgve1SqBQDaBEgiKFKC4ExIlplkTKCfeCJb4/vsrUvJ7jr475nRCb3h; 4:zAQBFk+YIsALiBUTGJM2dE1SsBlZNaRa3gdPem79qJ83U9nkSRbmH8DF5HD/zUY589xYWY/ccykfIVVJjUnFOoByUEZxcHdrlqzT3venWos1L24kFX71MtoXctV0mLs488p9uEsE/xy33VLXpJpRRrfZ3hV3OaSzmkXdbUqCfefoBsDC1ih2Cwl19FC1B/i4qc83rKpWXZ2JGu53GTjSaN7eqzE8V39BuKPbwrPBDyAgXhyomYg2ZNBGlvplC+N4PczouA53Z0MAqmogJGYdTgbb+8/645Hv2mN9y30300v1QKeZX0fFfnYwbSTJTmRLe+Ts4Jpz1emN4D52zkUhhAm8O1uovihDENBCKJMLg/D8J2laYK5iDPKTt8GxhqQutrDBCsq50Imq/ELOZb5lKIdD6xdSr10IXBDepvwktLkHT86r10vp/E70xAppDisz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13013025)(5005006)(8121501046)(13023025)(13021025)(10201501046)(3002001)(6055026); SRVR:SN1PR12MB0861; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0861; X-Forefront-PRVS: 09538D3531 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0861; 23:OlGJwg9Dk+/enh/DJm9dqvAiynmEWE3XUk/l/sAK9?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siUug64tv8/wUQOIsobiRvMmsUz/q?= =?us-ascii?Q?YxJv/ZlCfZgvBvQzs0mpALzY2B7VjWCukc42xmRNQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0861; 5:fUdv+JXlYcTYp7OYzJYg+a1dMDB5xMNAyYjVN/MHyG6zRFtw96cmrOH3YPzJEsU9s9hSQZ8U5txoQ5II3I0Os4NIrhzZcY4r5EiU6jxnMvJXjZGxn4TZdbU5XVw/riqJKqBV7jKZjAEao/tpnZzxrA==; 24:KTpvK4hCNATdCjR+57EJ+n6iYy9qmDEBGgDXc1tS30XAD6uKeuX/rEsArPMG24IOz191TtaDgYMWcxJg7M7xxGe/pB6QFk2Kp6UyyfYWplw=; 7:yWyy3+iBWlOtBvwXVlHjhIyGluY63iqr8TBHsVt+xU7uCKy0Psgm4tbuW4EEPfQdo6DRtXxW64ngc5Bqdds8BREdZAz+enEsjrTvR6Pqt9/NihDTVTT90LENKO10fOSVwz/0rJxhq//jgEbN0ImA6K6cNycRT3+mXCy7UlFxQcVxmXpEWYQEJf48kqtb+DbL; 20:mialcIQtiDOsTOxlUKWJDWS+nkFvMzlOokWs7MD+ZrotKonbTBZeJORvTEoKs0gRYU/iI6JCROfVenG3Nfgi19po5tRKET2q8Vys/9V4wpPpfsXpsVV2xFAI2gEvarSl6054TankX52HymLGqyFTAE52JbvhZLX4/KmSj3j87JKfGIOQpJOPIIj6kZLNXk1aLANEL0Ipm+VdOCgJOHVF6FB1QWNPIsMlcqvwBuzExixlvCfGoKoFrIw5vhlL3waB SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2016 16:08:35.7682 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.21]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0861 Cc: Alexander.Deucher@amd.com, Andrey Grodzovsky , Mykola.Lysenko@amd.com, stable@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Not clearing mst manager's proposed vcpis table for destroyed connectors when the manager is stopped leaves it pointing to unrefernced memory, this causes pagefault when the manager is restarted when plugging back a branch. Fixes: 91a25e463130 ("drm/dp/mst: deallocate payload on port destruction") Signed-off-by: Andrey Grodzovsky Reviewed-by: Lyude --- drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index 9971c46..cd6014b 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2881,11 +2881,9 @@ static void drm_dp_destroy_connector_work(struct work_struct *work) drm_dp_port_teardown_pdt(port, port->pdt); if (!port->input && port->vcpi.vcpi > 0) { - if (mgr->mst_state) { - drm_dp_mst_reset_vcpi_slots(mgr, port); - drm_dp_update_payload_part1(mgr); - drm_dp_mst_put_payload_id(mgr, port->vcpi.vcpi); - } + drm_dp_mst_reset_vcpi_slots(mgr, port); + drm_dp_update_payload_part1(mgr); + drm_dp_mst_put_payload_id(mgr, port->vcpi.vcpi); } kref_put(&port->kref, drm_dp_free_mst_port);