From patchwork Tue May 31 09:24:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9144035 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 0714660761 for ; Tue, 31 May 2016 09:25:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED80825D97 for ; Tue, 31 May 2016 09:25:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E29D62796F; Tue, 31 May 2016 09:25:11 +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 9350425D97 for ; Tue, 31 May 2016 09:25:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5EE1E6E36A; Tue, 31 May 2016 09:25:06 +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-bn1on0067.outbound.protection.outlook.com [157.56.110.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C4006E366 for ; Tue, 31 May 2016 09:25:03 +0000 (UTC) Received: from CH1PR03CA005.namprd03.prod.outlook.com (10.255.156.150) by SN1PR0301MB1598.namprd03.prod.outlook.com (10.162.130.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.506.2; Tue, 31 May 2016 09:25:01 +0000 Received: from BL2FFO11OLC004.protection.gbl (10.255.156.132) by CH1PR03CA005.outlook.office365.com (10.255.156.150) with Microsoft SMTP Server (TLS) id 15.1.501.7 via Frontend Transport; Tue, 31 May 2016 09:25:01 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.158.2) smtp.mailfrom=gmail.com; ffwll.ch; dkim=none (message not signed) header.d=none; ffwll.ch; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.158.2 as permitted sender) Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11OLC004.mail.protection.outlook.com (10.173.161.188) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Tue, 31 May 2016 09:24:58 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id u4V9OfRQ013844; Tue, 31 May 2016 02:24:55 -0700 From: Liu Ying To: Subject: [PATCH v2 06/10] drm/imx: atomic phase 3 step 1: Atomic updates for planes Date: Tue, 31 May 2016 17:24:27 +0800 Message-ID: <1464686671-20299-7-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1464686671-20299-1-git-send-email-gnuiyl@gmail.com> References: <1464686671-20299-1-git-send-email-gnuiyl@gmail.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131091603004634790; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(189002)(199003)(9170700003)(86362001)(61266001)(47776003)(77096005)(87936001)(2950100001)(73392002)(81442002)(11100500001)(19580405001)(19580395003)(83322999)(5003940100001)(73972006)(6260500002)(55446002)(76482005)(586003)(92566002)(76176999)(50226002)(189998001)(110136002)(104016004)(6806005)(4326007)(15650500001)(2906002)(5008740100001)(2351001)(36756003)(87572001)(82202001)(8936002)(229853001)(105596002)(50986999)(106466001)(33646002)(48376002)(81166006)(8676002)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB1598; H:az84smr01.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC004; 1:5YzSUQp2LzTR9cD+mHw4JQMPrU9072AonRGvfyf3OUT2cUBQslE1T+/oc3+q7IHcIoYyPqQOfCMCL6o+17nGh5vaGEUNmvFp88uxreQLZ8dolOHRi80bPcsGCNdn3xtv0O4ij+SHbdJnyCbd+eMtsHikKM7pmy4f1FtB8+wARutKxIjt6Tyw//c5LFyFDDOlWWHFim6MgZnrryyNAs7BWZ6Lr9tpv71rymPEt+Z7KIKhFBPMoW5crxUbyOR3aTKcMgFtnAPsH21xsXKfMdqyE0UEgZHXR3Z2SQxQcoz+juTPd38BWUrlV8pbNdXBNC5ynKnFe0OyX5lRclMaBfeXNBunsjXQ5h4b6z6Mn0f7QsupAiOypX3yRmBXa+Vw5eTHu05u1CiEAm4wI/YQ5lGXHq6Cc+tIvqibDB6TtF3DoRty8GqQIoE0sLDZHXajUnFfESFhMyTdtTFkN4LfeprzY3bssPl2Tp/GJ+w9Ocnk2fBa2PHltXWe4ARoYU+/m9HuEwN5gjTxyC7kH+zIq1W6ZaocFOV8wKoFHZGRe+U5bvgIWUcnffmEa6Sk6um1XRfX MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 2e7bba61-8a60-43e2-b6a6-08d389357097 X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1598; 2:GTiVdaKZBDcA/3mqeZ9esfOrEv62xOh8et3Ffw3Kq5tkHl3Fr8yRNcAT6w/afkOm1xQjYmyqlyVCbtz8IVuqQ5SgfEBBqL/xEi5hBp0lhOWq8qyQvwgN/ffDmIZmXF6Y6G9MU8lg9WFqW79ke/NtZwBuTWLJwBTrRHmsrZy9rolqOaFIckyPbzYxpFzfPGmu; 3:pf6Lt48sOQvuE3I+399M61OecinT/Aa/qzRi9zG6WvRd+FlomMSrLTW6OQ9llH2O3XtTerK+jviEuDnHlciG6CFjZudGJXNjsB7Y8/+QqECRVSfJoclatYp6u5MYZHjOiAHCgNsfFvaonguP2I0MkHfcK367dsN0qPL4rT1udR0YuLjPvtYkWCUOfeHU6rmCYG5EpYqMxMZ3I9QmeTHqLXdfLRYo2XWOWXxmz+1sq10=; 25:W4e9UQV9UvOxjas4Z8XAVJRvPMBdKMBGFWyLr8cDatg+oR9yXspxIZAHu5eSxTfekKpomlkT/jzJB6/Upg1NnMkJlB07xzeFriiTUBaVXETHmKVQvj+JvqrD2uzwY6m6oELkgTo7ELXGmJioabY04z8oMEUCq3WQlvGhzJUF6m1S6OhnJUS7e20ETZsjIJaGy9k+R7bArR+JjkOC6M0yc7ebAkcVJu/N0pgSox3+82BtndK0OKsgTRAJA4cCCxB+j3nDOYV8NGCSZ10T7K6OGMpro23AZq/LGWDSzW7HMuCdGMO4IAnBFJWhT5hzR00+1nbPJE8gv38oTaHoPoNlpP63gDXOc8uXlm2cBihuYNLsVQQ9wwLQGX9WovCsexbSJdtBuDKDDEub57oQ+u/m8jH5Z19yNjOxA7VSivY1Tjk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR0301MB1598; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13024025)(13018025)(13015025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:SN1PR0301MB1598; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB1598; X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1598; 4:tosIEqDA7x+zXU/XBUCiDUvS3NI9Ydr8DQWE8NE79HgInalTD8g+8sq8wdrgpZrkMe6Za78sZL2haefb+dtWPPWowMO97zZCmtBnT53VNlZ8ft5lv0CMLXDDMy7h5rouRTTwd9/0CgIPbrhNckVvevL5YsGaffizBW12XEmoGWifRk6/8TA7mqgY3lgiH2xwl0AeGphlzm6VcVIihJyE5lyNnR9Bm7EvMnkQfUZQ8jV72DZZLjRMNamLtpAytK3gWbnALStlzUdl4Je76uaViazNj7w+RV1MUfAhO+zRey5HOIZDr04eBSTdoIx5UWfWDWzDeA5jj1fkw9GQW9J99RiVSI35f26q0wJfygurmXp3xV2BoPwwfNAY0Q7LcNxzhokEbpXJ1sT5DKe7bGoZl+4mbDLUBTGk+F09zw9cFFPRf4VNVVY5cYBi4QOYPe706ofX7cBdGCeAqXEItmgEeau0L6l29Qww5jWQT/5rvZE= X-Forefront-PRVS: 095972DF2F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB1598; 23:Y7id35z8Az+mL2ovTV3gfgsuLWl/mBX5NmqbVyw?= =?us-ascii?Q?zBnx6/Jxc5MsDZJffxGTEpP3sFkldkt61c/S2ZDyd5UmE8UKU0pxgxhC4c5f?= =?us-ascii?Q?nKCbrZNzVDYNeOIcSVk5NYNtT6hG7WOl8UzIYsF5v068KQrIGdxvpKgTxkZv?= =?us-ascii?Q?HxeQ5N3h4IHtyZONKp9RoozlXoDt2CR0JHgTSemQC3088LBh8OAz0aNV3o2c?= =?us-ascii?Q?c4OJLBS1iEGowf922VyR3rhtC8nCxsg6JcGAC1mkGB1ntekt6e5c7YBAA3nM?= =?us-ascii?Q?iL9DtY8EZQ7T0TQ/EtwKQD0xXYoropXzmhUqvE8W4dxkkPsu6LM83L6oGPq2?= =?us-ascii?Q?+LcYtDc/ovOjg3UZw9kAT4iglrYmJ4TtW/TNnvJr/H8sgHcOnFKwOCRt05Rl?= =?us-ascii?Q?bicSMIvEfgVAERaSfBIZgh7SLBkhAOpdTOUV9Y8MTzG/HF99kiyYvAIAAfLb?= =?us-ascii?Q?ZNbUiv4jErEnrKyNOzb/QjUWIRxxdKbFbD2OS6l0xoy45tBO0Gulx1HxziFs?= =?us-ascii?Q?3lHouxPll+zw9dSM3KnOi4jUw5T9HclsdyDxweF0Y5eMTEgTnsX2awxujGgh?= =?us-ascii?Q?lvnLc646yK0wtGQK26buh6rOGlLI2GI6zT6kT8n31/n2MueCN/5ZC+I64iqx?= =?us-ascii?Q?7Q/cqHgE89oIL7Iiy06yc3j8LTsXwJXY2NelNdaHzknUeCmH/sI+zwwhELNt?= =?us-ascii?Q?uEqbWFcLcK9U+ITX7Rqe6oK5I9JV1bzDnIXrDAomli5n0o3Ktxqq6mtAtsJc?= =?us-ascii?Q?9pFsJt/nenQHblVKO4ZRdOPnjAm/H489Wn6mS29j53D4R2G5s9AvFeXXQACE?= =?us-ascii?Q?Xu+NXN4kWPcDLELg2pp664r8KCvsrXto5OUXx6+7H8cMebtAdhn6EZs7XYyM?= =?us-ascii?Q?0pQ4fHT+2eB0V17qqzmo2f4YKxA2zS52J+mubqbjIYA3ceQe4OMmAA70ifkt?= =?us-ascii?Q?K1RLYXbY7BMso9MS1AgFp4ORH7QB5frP7/rl0OJ1fjJxpNRghGWA53atEFI3?= =?us-ascii?Q?zvUAnx76PU81GlPJTUk3APT4PjtwGuR5lpbPq/Wc0R3Nc4waEe5iveDDzN+Z?= =?us-ascii?Q?ftdf7+ih6o3AgISLYOR/Cajh1Nu7Ul8WhHoB/YVKrd30AKJLSojxq1KUda2d?= =?us-ascii?Q?p4TAPA57/T2hwZzk8l5fMIR4LAMRG1aMegKDRWVPDsiQvYefn/uKgukyqGNG?= =?us-ascii?Q?0SDVKcudnHvc9midp3JznZrCc3kMsUgYQYh16pLSN+tVokJ6qAbB8KA76DQ?= =?us-ascii?Q?=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB1598; 5:B1kBvin8jdBH0esHsBfiF5oMi6Z5Xwt0MJkhLCI36WKy4D2dO/R6OAvg4iHZYMbBEuityNqa24PcdOr3LFCsZEoB9U71994YaOK0jT+itfwYQUks5msYqMCHSkBnPxpWAThsx8qLuIQBQhNylqfi1BZyL4fcfNW/tugDz8+KBx4=; 24:ybAFrSXBMIbV1UgYhdANMncXI09LIPFBztDDCqlMiCm7zdHqHknpsHwZCVuTzA+vaq5OdIApEZ3VLdYWL69/HUYo398rJWe2s5dFxQezwAE=; 7:C0nhbQmbOh1PefwLE/rVL9mKqIUy4/My3FaH6FAube7rvHkq7XhqwcqQUJx1jo+aeVUDxVBa/kd1FRrdHsmwnTX/45Q8Ati9kxhiVLbV4oF35LjcgJV4fzwpDW0OWf5WoA9ieAPZSlv7B4HueYwuc+QKU6jW2v20J4XoWFr8JrsPv949npiHkpo4ThRCjOfE SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2016 09:24:58.5135 (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.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR0301MB1598 Cc: Russell King , Daniel Vetter 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 --- v1->v2: * None. 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 3c83590..5893cbc 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 @@ -208,6 +209,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 a9e6da9..fc1ff7c 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,