Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751038AbdFTR5e (ORCPT ); Tue, 20 Jun 2017 13:57:34 -0400 Received: from mail-dm3nam03on0058.outbound.protection.outlook.com ([104.47.41.58]:26656 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750816AbdFTR5c (ORCPT ); Tue, 20 Jun 2017 13:57:32 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; From: Andrey Grodzovsky To: , , , , CC: , , , Andrey Grodzovsky Subject: [PATCH v2] drm/core: Fail atomic IOCTL with no CRTC state but with signaling. Date: Tue, 20 Jun 2017 13:57:06 -0400 Message-ID: <1497981426-27203-1-git-send-email-Andrey.Grodzovsky@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <0d603149-3fb0-3d48-89e5-77e3f7686415@amd.com> References: <0d603149-3fb0-3d48-89e5-77e3f7686415@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(39860400002)(39840400002)(39850400002)(39450400003)(39410400002)(39400400002)(2980300002)(428002)(189002)(199003)(9170700003)(86362001)(8676002)(101416001)(53936002)(76176999)(6666003)(2201001)(50986999)(81166006)(305945005)(2950100002)(54906002)(72206003)(356003)(77096006)(36756003)(50466002)(47776003)(2906002)(5003940100001)(105586002)(106466001)(189998001)(53416004)(50226002)(4326008)(5660300001)(478600001)(8936002)(5890100001)(38730400002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1589;H:SATLEXCHOV02.amd.com;FPR:;SPF:None;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft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VLIppF40gVZ8UEcwW93qjceUJguJAgH0E6PVttafXQIW?= =?us-ascii?Q?zT0ixivpBW/yH8ice3FlLeJ8XxZPh33isbcrWuoyuZDpyR1PG6hPkoWKNee8?= =?us-ascii?Q?Qmdp7hr3E868QaTjO+nmqSm+JJQsQjQVhd87U07Q=3D=3D?= X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9843253-4055-4913-31d1-08d4b805d0ea X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500055)(300135000095)(300000501055)(300135300095)(300000502055)(300135100095)(22001)(2017030254075)(300000503055)(300135400095)(201703131423075)(201703031133081)(300000504055)(300135200095)(300000505055)(300135600095);SRVR:CY4PR12MB1589; X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1589;3:lDK2C/78cfQqQzCDV0vK9hkcL/6bFKj0sQ2uDs6n8TU3ZqTcYtep/3egsJoCCThGGxRFirgieIS+KYPwaPoTCdSyXcmgJpruPP3PZtMliIBatv07pq+pio9ugJNm30mlR98IQXfrH/Rrxs5i4TOmN1y8SSpPQw9QVS9ecTYdEx3VL/P2ImFxzC4r/Nl4wezJ8dgUIhk1x0QO6vsHGE5gKnMEjSmNemgjlmYN39q20mhzOiVifxR3sM9bSAiXUdqO8I0VTc8yyytTXNDA5VVClvUkN+bTfqERiULgX7Rse/osaDQl1Mn5O70Dtjn1nNgsVVmjzLAFXbp4qeRILz4n9UuN1Pbi2KOXxU4jMhJNmUR5iRUeEWAqVaRGkdJAqecH9EXU5U2Hw4FKC5Hov4AoMm2EbG3PI2OGzIMx7JOD/VJzJV99mJOBCvuD/h/A8T/G8t/OonISbQ1XyB0+39ts6sapR4WPgjSYjWWeoHZoLzwlpjx4DtqeF3v/Xg4OnZxXd2ism25+xqwPIGeANc+chou4A09Zo2prU/jB4YKo53tqjAurmp9+m/w3f5ErwYzIsWxHRD3mp6G6qK71G2cOJYDBrHnyUhkwdgcZHQi0jfdVPnO7v8l2SdE5GUVt24sxe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VZDEFDk3RoXp08rTJyCX8CdULbOSIP3ODq/0Jtx0xI6tyHHLVUmQIiHig75YnYc0fzayxiIiBpovdgRWeBnI11178dpNJt8gQkAR8i6GDKtliY0pKDrZ0wunHz9vla3ubWs2EXf2QvUPewj2gEyV/qnehJrwj+K9ywNgLiNdN+H5CjHq+lhgEk6baNFCrx+sLJ3XgTRFLvsHMqqRn2c92LoD1Uwkf7wVx7tcNNLC7M+6VyeK29AhEmmMhPu+pCCl0FAmC9CKDgs3XMdk/hL/wSVrg1cGD+tOTZhk0MloEwTF1RjqSvnLOv5rNTfquh1E9/e28GOE26aE124 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(13016025)(5005006)(13018025)(93006095)(93003095)(3002001)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123560025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY4PR12MB1589;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY4PR12MB1589; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1589;4:b5ig39L8l2gaeURxOoR4pW+g3WCvYFaAJzoMYq3MsI?= =?us-ascii?Q?IjWm+98WSYQRjf7N9/TEXJgmcPFNvbMldGfHe+iMSotbbfu2oUCOUlQe4HGk?= =?us-ascii?Q?taMgwZeRs7H7pZgx1ceQLjUToNIaE9DwgLM+1HzSUisgVcn76aIHKYQYscAl?= =?us-ascii?Q?hah9LWrHBox0lTsRkE/MzVOAMrg9U9t+r6DxgKIUk574v5WvUQWDwNh6yXO1?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hH1m58XZQkig6b0QCjifam?= =?us-ascii?Q?6VMxj+b5hn8sVeqM+XNO1Ssnke7Vw0jabo1h3DuXqHxfqgiB03tRwxoPZxaq?= =?us-ascii?Q?OXjkoPhMaFBvrMQ1id28BkMfCt44HxwZKe1+83zOV00EBj97m3HoyOmA=3D?= =?us-ascii?Q?=3D?= X-Forefront-PRVS: 03449D5DD1 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1589;23:0pRx7xUE0SQRBfVNVHU5+NuFXPFKljE9RRdjzZ3nU?= =?us-ascii?Q?XbzDodQVKGGovwmx0FR4m1gCHTdZlkLETmH1XyGZVdUFdtVA2YhwPuzR6QaG?= =?us-ascii?Q?gdVtxFJVqYmlzkwk61ZzQPFJiqlneWsoewF8CO1UxsKq9Q0nrB8oY7aSrdp3?= =?us-ascii?Q?RKANXVggXer/4qFUoFJh5yYe7xa/WdeW52r85CX25O6xPd7EWS/eHvrVNNDm?= =?us-ascii?Q?6NzUN/+aY9p4aqc6mUjDzA6mldLcqo/GnkMf33uwQkwKAXYJIgWxQGjTYEy+?= =?us-ascii?Q?yiL+FaxwuDCEg1aHGvuo1jUwkUp0sPo4z7xZiRiZ3pgHmkEkVYwkD43sT+kq?= =?us-ascii?Q?JU7E7rk/Qk5nROSKDMT9bb6ATkJyoFZE8xmOsv1ozAElxQN2dby4IZ1r80YQ?= =?us-ascii?Q?NgEH9KjmD0M8pD0wliE96R28U3fvycitTe/F9kw4OC1XigQltxom2k0av/jl?= =?us-ascii?Q?o1gGzaSnEewL6h+TTRXFZDMcb4SOPK8gd8uFK9cRnuE17c40wuez52AFnw2Y?= =?us-ascii?Q?+LJZ8wvW1vj1EiYWSORbV2owH4sHv3FmEsDOhIjato6Ay6/9nD9rygb5kO9u?= =?us-ascii?Q?SDxmJ4+UxRAHZYS5GO7whiXYq5xUNOV8u3SfrlqgViFBS6eMh9B99lAph3AX?= =?us-ascii?Q?j4MyDrYht8YoPPGHZOFmZ/Q+vXVcUG0VUTzIjlidqykmGjQKBOk0Thr1gnyS?= =?us-ascii?Q?2KJ/uxfvobACfsAT3LF7jyuOYc8oxfPX4tA3wpph4Bvf0PTiaCtX2iBrR45V?= =?us-ascii?Q?L5KLxBqRyUsYYpwlCwEg9QaFz1CRgzAVln8JKTu15daxe43IdrHwa2cleSly?= =?us-ascii?Q?215Mb8VEjtcduma9hm9Q1RhEYyHWZvfhxCHxLdRALxFJnslXtTFdfvror8v6?= =?us-ascii?Q?wmwfveTDAbeU8T84pcaRInxIS/3FCZpvVYwn5k4BJ/JEZzcXeR/AGCyH4T64?= =?us-ascii?Q?J5GBgkHeWzzBS4VupWKIBMCO9HM+lJZzAlwNwHKgKp0ZeI2v8g02gCb4gYmS?= =?us-ascii?Q?J4iRH/Uzf9bRChajQqdjQ6zScO8iNGhxfiuXIJ8hrE3XEkQR9CkeQZjLr14r?= =?us-ascii?Q?88fpavrXKVw0Vu0zCrtJM+aHcwQhrfBC3d0pa4ZlUAusAlVSA=3D=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR12MB1589;6:zNP7jGSF36XfPqmBexw0svDj9pJtLuCiDjzajAYLub?= =?us-ascii?Q?tOBSpX+X0eQNOPaAPxZh7d8UQ4OjjMUEsIL41TqgjK9ztp1fpkco13SFdobU?= =?us-ascii?Q?XqJmI58nYifsCA7XAm0L7cnsZbMqKvfw9tObcw+7fyFQEnudK/6RWVw0LPp6?= =?us-ascii?Q?1nJ7SnS0wjCXaMjz+EOLKIrQrTwzUIY21Z4VAgi71yErBKBs9IrthFpWQg4T?= =?us-ascii?Q?KiTmLvp7CY9YQgEzGUcilTmXGBJdd8KA9lSABYL4PJtoL52FwAas/jV4AZUQ?= =?us-ascii?Q?R7DtEz+zck20qqxnVyBpi6NhbRhCpxdqOXowMDVBKtxmuuhES6eglOvekPaZ?= =?us-ascii?Q?E7xNZ0ml0I6sOipmJff+ZCmsy0RT27OfzTNxSO1E+tydbw/3nF8ly8bMuW7V?= =?us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dXMLeypzcy6NkQ+HZxoaiB3H5BIfAAOHUMSJkWcz2dmKrM0eZWPf9viF1b+RmN1xHlbdu7gq8vtzyo8Ax9szX0KxwlQyGJSqTadRX3TCHWn9AiX9s8fSJn+heIgmqLQqhCFKwtIrp3YuNDK53kVthk89IOgGuueD+nwq8= X-Microsoft-Exchange-Diagnostics: 1;CY4PR12MB1589;20:56JVew5+5bAYNemsF9ysrcRM8F1fShGhRMRTDd65OJTqvXN5N4bogBE/rug90veWQ0/U2ncOlhc/bH1/9htnDQM3g9g7Cv1g8LXvglMXcQ8yW9uQOEbOzzryJPESLZSLcAIfiBMzygKjYENeSssJ0kMyNfX+A/clYPPE6MRTFzZ6GG0QlOBsoFZ9glKAzvSWd01e2WMsE/iJttYDUdTBCk1IFdPir7yzN4XSOWsHqM1mpiVDsBjd/AU6kTk+4vMU X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2017 17:57:28.1532 (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.17];Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1589 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1691 Lines: 54 Problem : While running IGT kms_atomic_transition test suite i encountered a hang in drmHandleEvent immediately following an atomic_commit. After dumping the atomic state I relized that in this case there was not even one CRTC attached to the state and only disabled planes. This probably due to a commit which hadn't changed any property which would require attaching crtc state. This means drmHandleEvent will never wake up from read since without CRTC in atomic state the event fd will not be signaled. Fix: Protect against this issue by failing atomic_commit early in drm_mode_atomic_commit where such probelm can be identified. v2: Fix typos and extra newlines. Change-Id: I3ee28ffae35fd1e8bfe553146c44da53da02e6f8 Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_atomic.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index a567310..48145bf 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1933,7 +1933,7 @@ static int prepare_crtc_signaling(struct drm_device *dev, { struct drm_crtc *crtc; struct drm_crtc_state *crtc_state; - int i, ret; + int i, c = 0, ret; if (arg->flags & DRM_MODE_ATOMIC_TEST_ONLY) return 0; @@ -1994,8 +1994,17 @@ static int prepare_crtc_signaling(struct drm_device *dev, crtc_state->event->base.fence = fence; } + + c++; } + /* + * Having this flag means user mode pends on event which will never + * reach due to lack of at least one CRTC for signaling + */ + if (c == 0 && (arg->flags & DRM_MODE_PAGE_FLIP_EVENT)) + return -EINVAL; + return 0; } -- 2.7.4