From patchwork Tue May 24 10:10:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9133379 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 081C2607D5 for ; Tue, 24 May 2016 10:26:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0166D28233 for ; Tue, 24 May 2016 10:26:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA81D28258; Tue, 24 May 2016 10:26:23 +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.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED 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 A15C228233 for ; Tue, 24 May 2016 10:26:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 609C16E6FF; Tue, 24 May 2016 10:26:19 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0094.outbound.protection.outlook.com [157.56.110.94]) by gabe.freedesktop.org (Postfix) with ESMTPS id F1F4B6E6FA for ; Tue, 24 May 2016 10:26:06 +0000 (UTC) Received: from BY2PR03CA011.namprd03.prod.outlook.com (10.255.93.28) by CY1PR0301MB1193.namprd03.prod.outlook.com (10.160.165.24) with Microsoft SMTP Server (TLS) id 15.1.492.11; Tue, 24 May 2016 10:11:26 +0000 Received: from BN1BFFO11FD003.protection.gbl (10.255.93.4) by BY2PR03CA011.outlook.office365.com (10.255.93.28) with Microsoft SMTP Server (TLS) id 15.1.497.12 via Frontend Transport; Tue, 24 May 2016 10:11:26 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; arm.linux.org.uk; dkim=none (message not signed) header.d=none; arm.linux.org.uk; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD003.mail.protection.outlook.com (10.58.144.66) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Tue, 24 May 2016 10:11:26 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u4OABCM4024148; Tue, 24 May 2016 03:11:24 -0700 From: Liu Ying To: Subject: [PATCH 05/14] drm/crtc_helper: Disable and reenable primary plane in drm_helper_crtc_mode_set Date: Tue, 24 May 2016 18:10:44 +0800 Message-ID: <1464084653-16684-6-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464084653-16684-1-git-send-email-gnuiyl@gmail.com> References: <1464084653-16684-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131085582865072539; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(9170700003)(77096005)(2950100001)(8936002)(61266001)(50466002)(36756003)(73972006)(81442002)(73392002)(47776003)(110136002)(83322999)(229853001)(189998001)(8676002)(81166006)(1220700001)(48376002)(2906002)(50226002)(4326007)(82202001)(19580405001)(19580395003)(86362001)(5003940100001)(92566002)(6806005)(33646002)(11100500001)(5008740100001)(50986999)(586003)(76176999)(76482005)(104016004)(105596002)(106466001)(87936001)(2351001)(87572001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB1193; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD003; 1:Yv6AEubvClLb01fOYej1qCC15mPEfA1QZImraekzaI0d0j8G8UNGbFJpAb55iy4JdH2u7gJcEwCX1Ufg00LoJFCrGViwYo7wWZoKiIaBJ++WtU/mtE+agjb3i4NdtBr/h8nyNy105RU4CHhvRETxzxMl9ubDeMRry1/LfzKtnpR7XtWAnMY1JnWSzsZl7dTv+8QFOJZUSordvsRw1V/1aiWveRpF3RHnVdzWskYHx0aafpmC+7SrQBEF26BUfJURiFn0qLworqrF59OuhM9oCftHxJqprFn/mI012KWj1nzRGXh4pNpspmP+FDt+cJDp93I6akRj10zkATQwjhcWYWFSdYi/asQOQkSIXiM9AGErgB3lv2q9uqC3CU50r7whHqJNGJ1Hl9goAQZlYzYNccdNqfAbt2odWTSsZm6CPz7BBqac+y+XVL5MIl1Ui0LSG9+RqFwpIHRoAS3Xzn8zLGM0LGKJgEu4jpZsjzTcJJbXQjAsk30WYwG1qZHNow6DuMQ9Z8zvjneP/jii3OTxuh4BB0FRhzfIXflyUAo9HeiU8FnmHPVs18nm70t+dwe7 MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: a4074ec6-c511-43ca-a03a-08d383bbc44d X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1193; 2:c2Y8aUwkccV79Oi5biF8CmqeH2BnRERsveAmceJbLcllbfYUI9a7UkW+W/uZPdEhU6qIsGFtA+HV8Sl2DJop9miryZg/S5GpVcv6YDx7trpdLR6dyMrwvhB2hU8f5EwwtFBBlqp1gkNocAag3PONk1rivjGd3dToopns06ZE+knZsTksN+ThCosYYi9yOouk; 3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/cFgSlyhDVW99JnGGW39ib8CJLpc6jXPYU52d X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13015025)(13024025)(13023025)(13018025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:CY1PR0301MB1193; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB1193; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1193; 4:DoPP3QfxhXoY7NmCRDtYx8HLgei5OUEUTrrs9yViA6U3NVE+wxuCX2hNOxb3ZcYJKS3ZVaw+wjpCoHtSaJCVtBCzyBPZjWm6y1okWpJljpf9JO+cGUz+9w7XuSgWcqyvbIJqM2GpteABcvsrYLo9ApnXYUUtVLufbRD+4QkSaO6hDGTMxN9r2qWBm5OJ2fmP/AhIEYzqDW3CkWSaZYDE4QgT24wCWiv0a8NEjtAN/+7wMfJO6yA+w4DRjteGWU9uJ2+4ncB0d0Vc0Pt2aNbrTwfOnrfBZqnTQBO9GFAHb/Ho7q4cL2MTLL2xiNjuBs/PlPnW6qjVCio6AZInIoWcOJ8jS/1OYVeff06vsKGDNQ3TJ7v1pvY48BQGEu7CE9MVxmbVsolT1asjGLS27gb0FXpJp0+ive9D3r87AE5+OroPeyGQiDJLESEW8kHtnwODSP6HZASkOwmSdemcL8ITMqCVz/ur5QF5GuhfYzhrBEw= X-Forefront-PRVS: 09525C61DB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB1193; 23:hfMI31ZCWImEUlGFA45pabR9Lzs7fUrfbYWsvnG?= =?us-ascii?Q?L13jRlbkLu8dS6/Y4uslkIvmkHctKQt1G2sF/LJ9eStA0sZw8DaUWqzcZ0Qz?= =?us-ascii?Q?X+YGE8VkUyi2NhD7YhJq5kYoo5QLq7PwcAnrzNrtw7TFFcfWTC493vwu/TyQ?= =?us-ascii?Q?CzsE3z5lUf2Crmd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TBiscm?= =?us-ascii?Q?7LyP2NccnVNJ8DucP5//hQZiFtNaROcXe1ZvPbbdgsFK355bkv/nwAyWn/q0?= =?us-ascii?Q?4rLSV6km79lo2iklj9pIqIydAoFfHStpCuPRa+F2G6VWD2rUVz9WcIZrCGyK?= =?us-ascii?Q?Cy7nGccr1F3+o43c=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB1193; 5:MwvDdY17szWkSsIZzXJwp0KSP5Hrpe0pBHkCTQLJrCb4UH2XfgoGw+KNrWz5/AMCAgu+3CiUvuLyj2D9MOjLY/kK62IPsVOHN7hYwI50Pl5iPLBvzo6vJ6tkdm/HK//qKdouQNCs5OyRiRMaqW0ULmtcunRx8+vGICXLmqyDoRk=; 24:V6psBIdjLi7s6kr6A6MMmaYH64hSc9meTyJXzTJogHRJnKDKvJMv/4I6Nkv1G1mpdjmVJ2HDdN/ap8FViIoFOnqiSswg6rPsDrAaoLPJfK0=; 7:gOzlk6S5EbTYeXnIf9WlLAkqGwkHBbkuQ7OPg1QfH8PNYtwp9P572NmdhksB8uXm8b0LdMEBdSFh/ehcEJFPaqARxKDirTvu9em0DsuN69AJCMHaoLpwTnSJiJ5MFhlX2pjno4SQUpBam6OMni2rBvqL75iTaiFw7XNy0NNGln6wWKIQXlYqjc1wakQ97jY3 SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 10:11:26.3200 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1193 Cc: Russell King 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 Since CRTC has already been disabled in crtc_funcs->prepare(), it doesn't hurt to disable the primary plane in drm_helper_crtc_mode_set() before enabling it in drm_helper_crtc_mode_set_base(). This makes those who reject active plane update in plane_funcs->atomic_check() happy. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc_helper.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 79555d2..7fabcd7 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -1013,6 +1013,15 @@ int drm_helper_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mod goto out; } + /* + * It doesn't hurt to disable primary plane here since crtc is off + * and we'll enable it again in drm_helper_crtc_mode_set_base() + * below soon. + */ + ret = drm_plane_helper_disable(crtc->primary); + if (ret) + goto out; + swap(crtc->state, crtc_state); crtc_funcs->mode_set_nofb(crtc);