From patchwork Tue May 24 10:10:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9133381 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 EF47D607D5 for ; Tue, 24 May 2016 10:26:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8D9928233 for ; Tue, 24 May 2016 10:26:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC32028258; Tue, 24 May 2016 10:26:46 +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 6FEE928233 for ; Tue, 24 May 2016 10:26:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C93C6E6FB; Tue, 24 May 2016 10:26:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 916 seconds by postgrey-1.35 at gabe; Tue, 24 May 2016 10:26:35 UTC Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0084.outbound.protection.outlook.com [207.46.100.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD2846E6F7 for ; Tue, 24 May 2016 10:26:35 +0000 (UTC) Received: from BN3PR0301CA0054.namprd03.prod.outlook.com (10.160.152.150) by BLUPR03MB469.namprd03.prod.outlook.com (10.141.78.141) with Microsoft SMTP Server (TLS) id 15.1.501.7; Tue, 24 May 2016 10:11:34 +0000 Received: from BN1AFFO11FD043.protection.gbl (2a01:111:f400:7c10::105) by BN3PR0301CA0054.outlook.office365.com (2a01:111:e400:401e::22) with Microsoft SMTP Server (TLS) id 15.1.501.7 via Frontend Transport; Tue, 24 May 2016 10:11:34 +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 BN1AFFO11FD043.mail.protection.outlook.com (10.58.52.190) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Tue, 24 May 2016 10:11:33 +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 u4OABCM8024148; Tue, 24 May 2016 03:11:31 -0700 From: Liu Ying To: Subject: [PATCH 09/14] drm/imx: atomic phase 3 step 1: Atomic updates for planes Date: Tue, 24 May 2016 18:10:48 +0800 Message-ID: <1464084653-16684-10-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: 131085582937087165; (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)(86362001)(19580395003)(19580405001)(76176999)(50986999)(81166006)(189998001)(61266001)(47776003)(8936002)(92566002)(110136002)(5003940100001)(8676002)(83322999)(81442002)(73972006)(15650500001)(50226002)(73392002)(87936001)(87572001)(11100500001)(77096005)(82202001)(2950100001)(6806005)(1220700001)(50466002)(104016004)(48376002)(105596002)(5008740100001)(4326007)(36756003)(2906002)(33646002)(76482005)(106466001)(586003)(2351001)(229853001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB469; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD043; 1:lv3Hz+uXVFV85LMXaZnMP+38lwgldeizSvdatdQd4LOleyfBJdUfncjZp34uuCcR+IgkIgIKjy8GD4Mzx3tWIaGdGQkbbfVltXW25kHv2BdcrLxMZa3zNMQHxuHXbUjQVGwujz/98wbOvh8HgTlXELgfTdoV7aGaBVnldUPxdQi3RzXn+dDSb3Nx7RgwLXJkiOzW15wqpk/bZoqpBFtmXqpNyidHIrZtsxKkSG8ml023L+7TEvOKuN6McH3FAnCHHXcrrWSp40lSODuWzhkuCzgOONv+9VW+oTTe/QM2Kb+mjE6uJ2yjj5LjX+YLXtYtXFx0G9MrOMJ51XpqqV7zvNqifLGhoZwu5BlyVTmVzTmttWu+89LNLikY3iBLbTGLVBrLdYRFoZH85WSCYkQFu6EZTfKbnFCiK2KCBS3pW/wSMN5yG55I4VeVIdPO3WDyyQ8TdcNmU1uKLNBXIxdYXHj32WFOxC8VI+m1dYS4w3wBSjgVQrP2DCJCRKOFhe1r6lUBiejfDw3umH1GcmuvNbHDBqZawz+fd1EPzJ0BtJXnQR/RIJmV2ElyOxFzzaXr MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: de56adaf-6565-4f3b-d1b5-08d383bbc887 X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB469; 2:E+aSbTr6oIzMxVlWl+NJFkuCWwWP47ohNrmKeAYnlb71Jdk/PkOo60TXHWqyinFcKeGCUb8+GmByjecY0RQK7RqjA9EX7KOW7QS1+hnW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83HqubleqUBYr8kuIn58rQqBPTRt6bQZlGHmRfjBQ5OqIOHuZGRBuqKW8EUIoiRus1YPEugIWNFDNUtq8iZtfXPM4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13017025)(13015025)(5005006)(13018025)(8121501046)(13024025)(13023025)(10201501046)(3002001)(6055026); SRVR:BLUPR03MB469; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR03MB469; X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB469; 4:C6X6oecodX5/OrNwTC/KBX/6cPHz5QKQRLXeBZybRLvYPIADf/8JJ0Rtb/401tkAKy8pHxfJyv32UK3KjzlZwedgaH2bQYB8oPUQs+Y4drRdTmhvChWwpvSvsRmfc5OQHtu4M8seh1ig5eN7L535+sx8yABzXpmxJx+awOfqLPj0JA5zAsJqWWGN38ARHSJx2SM6QlEDkQsG8qWYclNinr/1KikC7F4hZCO0mjMEfWrECyzMg/3na0EcjKG0MRbBXZaI/+HvTI/wbebS6KjfzpcdaPzKvdaiub9v8IwGgokpH1c8z645ZNTLv1dISDzmAYd3IK4ED98chCCfpCOY2wt5hKU/daPnCoAbWc9jTuLxfXZ4saA6iok2HLgRNmievPWVaK/KtFVLUR8tZFr+Rct4U0PaQ417L83BKwWoZVD93VTiEVVWGzCrcFtUiRFqVF3Rpl4G7WYTQnmQd+OlEYbfOBodHnVrqh8XBqFA3mA= X-Forefront-PRVS: 09525C61DB X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR03MB469; 23:Ktq4m7IkUKtyGZ22t2bVk5drHpLuWS8RQivW3YHXvJ?= =?us-ascii?Q?/c4e4nk5qkfSb8JvBmfF4LsQaVEAvFAbMd42l5nRJQ2X6D3BsFegMiH2WWct?= =?us-ascii?Q?umRZMlbuEg5xKkePWfdhUt289pObKIeFcgGcZF668HudiOc2OxI7LnhA87M4?= =?us-asc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icl7TWwX9UWKhkfYqTUvhswqjbyi4YXv?= =?us-ascii?Q?xofjs5LOlSo49BnP1MtH3qyOXc7CNW9xKqIvi/rXkqy0Xw8reZzYZZn8gt4g?= =?us-ascii?Q?EnbFlvRs6Kt86WxMFnOffl37qX/U6o9Foy4pkaMJr6+G5ydrCiTavbYERkBD?= =?us-ascii?Q?poAOpPMjcrHvFkzEdyy1ian0VWEFoiXLqk?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR03MB469; 5:KXyqkAZV6teGGbxEjI33CYwYBOJfe4IzmKUFnjdAkgELAHCcked371J7DYAgR955J5tRjrnnKfUhaymyIgsQGn1wo1ShxKOO5qsEPvj/skAtoDmGgaz7fNgVmZYTyVBKsWdWsQn1BDBGeZmi7b4eDGCwBm7mH9/2aTMHMqAmKcA=; 24:ZKpSGa6fHIT7ikz7CGkjwCydcKOFy+pwNseNFoTtdVbaX1gBJ0N9jUXQ/WHH5m0OhY97vTd0ZDox5qaPUWS/fVtdczuRz5GsdnLRNgr/cFE=; 7:McNFpqNKQrluggHoS3zSLkDJ81EeerNT36QMk4+6J+X5MtKFWmNOCxCnbvaSED7XOFKYI1UL7kcSn5sdPyYicoK+iMI4598eUF6Bil35L3pjO8VaGO/zyLpVHSF1asQmvT/oVtrH3U4+cRSMrWBlgXNFbgg2PsLeceEA3DnkfeipGC8juL9B258hCsmS34NI SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 10:11:33.3967 (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: BLUPR03MB469 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 This patch switches the update/disable_plane callbacks to their atomic version. Also, use the default atomic helpers to implement the atomic_check/commit callbacks for mode configuration. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 3 +++ drivers/gpu/drm/imx/ipuv3-plane.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index e15f887..7e058ea 100644 --- a/drivers/gpu/drm/imx/imx-drm-core.c +++ b/drivers/gpu/drm/imx/imx-drm-core.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -205,6 +206,8 @@ static void imx_drm_output_poll_changed(struct drm_device *drm) static const struct drm_mode_config_funcs imx_drm_mode_config_funcs = { .fb_create = drm_fb_cma_create, .output_poll_changed = imx_drm_output_poll_changed, + .atomic_check = drm_atomic_helper_check, + .atomic_commit = drm_atomic_helper_commit, }; /* diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 347b581..8419cc1 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -360,8 +360,8 @@ static void ipu_plane_destroy(struct drm_plane *plane) } static const struct drm_plane_funcs ipu_plane_funcs = { - .update_plane = drm_plane_helper_update, - .disable_plane = drm_plane_helper_disable, + .update_plane = drm_atomic_helper_update_plane, + .disable_plane = drm_atomic_helper_disable_plane, .destroy = ipu_plane_destroy, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,