From patchwork Sun Jan 29 02:26:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Grodzovsky X-Patchwork-Id: 9543815 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 0CE95604AA for ; Sun, 29 Jan 2017 02:27:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F084127FBC for ; Sun, 29 Jan 2017 02:27:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4E64281C3; Sun, 29 Jan 2017 02:27:27 +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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 65D6827FBC for ; Sun, 29 Jan 2017 02:27:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D37E26E0CC; Sun, 29 Jan 2017 02:27:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0086.outbound.protection.outlook.com [104.47.38.86]) by gabe.freedesktop.org (Postfix) with ESMTPS id EEC786E0CC; Sun, 29 Jan 2017 02:27:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OSa+OfIPSsZYkdYRK8wSj6z9eLwMQ4UcYWXYR16CE90=; b=4Ni18lJ2RiNNyZ8c6PBrW2+yetDKqxSZQ1kzZHBRMiG0Aori/7u4LWXamz6Pg6OjQIGSy+YYrNuX9vN1w9Xxy8ykwR76gOdEVcNPhwpBqRNs9I6Qew4jtJs8wLRzlRy4qDHV2roxJJDnCooZFpQQ+UP/OkUlqnL5Fd5sl2u79xk= Received: from DM5PR12CA0003.namprd12.prod.outlook.com (10.172.32.141) by CY1PR12MB0012.namprd12.prod.outlook.com (10.160.158.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12; Sun, 29 Jan 2017 02:27:23 +0000 Received: from CO1NAM03FT029.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by DM5PR12CA0003.outlook.office365.com (2603:10b6:4:1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.874.12 via Frontend Transport; Sun, 29 Jan 2017 02:27:23 +0000 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; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by CO1NAM03FT029.mail.protection.outlook.com (10.152.80.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.7 via Frontend Transport; Sun, 29 Jan 2017 02:27:22 +0000 Received: from SCYBEXDAG03.amd.com (10.34.11.13) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sat, 28 Jan 2017 20:27:21 -0600 Received: from agrodzovsky-All-Series.amd.com (172.29.227.109) by SCYBEXDAG03.amd.com (10.34.11.13) with Microsoft SMTP Server id 14.3.319.2; Sun, 29 Jan 2017 10:27:16 +0800 From: Andrey Grodzovsky To: Subject: [v3 PATCH 1/3] drm/atomic: Save flip flags in drm_crtct_state Date: Sat, 28 Jan 2017 21:26:49 -0500 Message-ID: <1485656811-4211-2-git-send-email-Andrey.Grodzovsky@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485656811-4211-1-git-send-email-Andrey.Grodzovsky@amd.com> References: <1485656811-4211-1-git-send-email-Andrey.Grodzovsky@amd.com> MIME-Version: 1.0 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)(7916002)(39410400002)(39860400002)(39850400002)(39840400002)(39450400003)(2980300002)(428002)(199003)(189002)(53936002)(48376002)(2906002)(101416001)(356003)(53416004)(77096006)(47776003)(50986999)(76176999)(305945005)(97736004)(106466001)(105586002)(92566002)(4326007)(54906002)(2351001)(50466002)(8676002)(38730400001)(2950100002)(6666003)(36756003)(5660300001)(110136003)(6916009)(50226002)(68736007)(86362001)(626004)(8936002)(81156014)(81166006)(5003940100001)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0012; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT029; 1:6yVwtsgSTcrWTE1dR4xM7ylLIlEebb8XCUBqyeuX5YzKEjRuMAcnlBiYoZXRp8YpidqY0EiU9t/b1zZo7zfc1JpI86IAX0l0vhf7ntvz2Ncpb5X96F02pcatT0bCDAwdoXaQCuS0jb9Ij0yWDToA3Cx71JAghe+0ndyX45UM4VzKiw7QhETr354FPp4BSVwLYOCAR/w+w7Kiy3v9Pay+TbCZ8uzPjkg/O6yKfLdxPq8XDp417101h3jQujzHIUqtJVnsyEE4+D8Z/DySVuLLEvE6BvrEfhmavGFLxWBkW4vApqk73D7ZZ9zZStA5RO1QmbABwNiupEHRx6xoaWZKxwqzZw4ztfpmpigDkT6PpQk0lww6HTyq0cqetBGzpYpJ7lDdFvJ3Z1Br5IK8Qn09YxKQXCFgFigUf3cFSKTj51lDQULmYtfEoThkT3yxu/2AjYqpXf6KqwxdYZ4tHcotRGHwimIZEyVYuPG3VTusLmQsyGRilOBMbXSBY4fEnuCz X-MS-Office365-Filtering-Correlation-Id: 9f77486e-cd8a-4f86-46d9-08d447ee5b8a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR12MB0012; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0012; 3:rWrWmQkTSeCxY+ZeaYxs90Um0Do9PVXkBzMis4wXLdRYrhNXGzRx/diuIDnU3hEPkUbcYENzIXG/YOhYsoOr2cKjI24RNHM+Ts1hxRg4SR/sYaubWnMT54hTc665z4ju9pC7++JJ3NeTpzmlRy/n+GLmCoKhxMBLiC9zSslfPW8Rep6WJSEiP21PageBchXRDxtJWbQYoi5mMgo4ePDaOQP+tdwsSIRAl3AOhkL6EWxo5Gk9Kor9vTElLSI44WmI/KYUjAPXGjLUtrLPL9ZblAB5eM5guQoj/Zm88tTCVCOpbpnicvZHzeIJx4T9TCHOvYksk6qKCfGnMboJwIcRfg7MCwJH0+8GUJfzb9qRqhZsXaEJpMTOItd7QHChH9jr X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0012; 25:6zNfZv7hmgln6N0xo+pXaBIu0QT5l2SY+c+2+ChG9nnBHG+sABx2uR4K43kvDcxk5CIzMDSJrDz+cnrs+aH7RM1bYVYvxdlxe9EqWvW+iV5HSKBEcraU3RF3NQMLoO1G8icjw+Ujx5UtAVuBeZfe/0rTXJaVzCIwUlfWsZb8k3FUgmpEQIC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iN1SQ1JulP5jz+BKcVDQMzLhEZwoKFEsanVZScAun1yOSY2e1V8AkzDKX9wKlgdl0mRNiiZiUgrtA+XZvUtMu4WFGSCPx4OaM+4sUdzaygiKTTJCVHDiz0r6UmuJCArPxB2Orf6olGy57GqZGJBRFq5FOZsjyq50ZKaMVaLql2T/1c8tZmfOoqXGorWq+0XMk/jD7kBGnGZ8P3HQN2y6E7n1hr9p9k1Iomr2eeU3ugGgsliyU5M0edT6LSdaCWekABa3onNSPPe8Wcbn3B0www7DexhwDSKstP2MzbEBfafomcW0nrjpWDviv0TK0ZwkEvuFT8PBUde37QnIW90wHtJjLb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(13016025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123562025)(20161123555025)(20161123560025)(20161123564025)(6072148); SRVR:CY1PR12MB0012; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0012; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0012; 4:5YpEXGMpiLwC8y1XZeGcttTzAd+nMxHBvaW+CuxgHYQaXvIyCZLmqUDtXAmcqlmzRB+bvtx9ykcMhSIiQyGh0fmkAfxtBs1O1Ze5YsNdchbUolN23LQL8D4mE6a8B0C4tESGkgGZJm0acK2ZGP7mTOHhsrBQPnyI8H02MzopfFiuIhDAEbrSBug2lT3oZjsdOsoFuXHrmrkwKRqU/9621J3h6NuAo8bksNp8AH0dUxekhVarhX0ISqYTtiAhrHg/rbbKMDjD6Md0ByfpOpyzC/FiaayAso/A1isQuS0NljyiWz/ae9Jo47clQ3kUveMUi0eTngRETYjNVCzennjLyg267bwkXG/Rj0djH9yMw5EALxI8DAS7zfUgcqd3+IA6lCRK1rSFjtAlYGd1uL3F6JV6XV0ctxRnYF1pWykho1jkzLdTwSpbdQDEcptJ10yoMouHGIJqjlzCaw6K29DCs77JHeWUbCTk/mCcuD9cjmM/v3vh5uYXncZlSmKSaEKjRKECiGlecpI37KttzvA3WDPKMIgnFCmU+Pr/HTh5AxLjGNsGVC3haKKjvLFKpiekCZ22S6nGph8OtLoA+ZgH/JxPBAsxUIlDqXhCcx+mNIDPAeBnAs4FOsend4Xw5ln+qgfQjYoLpI3FXwgRSWPEae44r2jdK44PKKOYXpic7UY= X-Forefront-PRVS: 0202D21D2F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR12MB0012; 23:pSNW7+22sPsTdgL9cTI3FgQiKquTEvdDsI/26EKfE?= =?us-ascii?Q?2RpVssw+sMg3hO3CDS3nBIEd1wgFKrnaIB5J+CfFSpkNujjsnZKTIuDXHs1Q?= =?us-ascii?Q?nEp2bptFaQ9pAWX/vdKPI+JA3PSrFcPGEl2WL0U0sQs3CyMcJDcp+TsoWSWd?= =?us-ascii?Q?A4ox7rQ4ToPDcBeR+FMq3rDoOiiESBTqNLpJRyNHKJiGnMoFF9SYQ+QudJST?= =?us-ascii?Q?1XbxipVa/aqbaVp5Ult40ZlA26ZhLG9peoe3Ms5YhqvNG4ols3DL05UjhRaR?= =?us-ascii?Q?EXNyPHGDcjhCiLMXolIazBDl6ssrBT5Si37WUjEoWJOIebHDlQKT5fWPef+L?= =?us-ascii?Q?0ZybqdXvec5pkd9YVT1qFLRqq7jno2Jpnsme/KUOzfK6yk5BOMK4mR921k5C?= =?us-ascii?Q?5ysTvMIpG6QLSLxlBMonSuB1R6ZLPJcM0S/TY+VWOrDRgt2c4RoKBfaAvief?= =?us-ascii?Q?J5CHKxKNlUFiWIFqN1+JLDJnvwplHxJESyi4pqclp69N8vmQF51cA8q3lNH6?= =?us-ascii?Q?cakjeQQBq5Ni87nef8Ar66E0tn3vjMo7E9ZfabmvyFMK9cVYcvoELEOC3GGf?= =?us-ascii?Q?2C6KZ8YkDs7DiIGpx3ygoCNplazpmwPwbquNC/GDskZfuOWNP4C+y9EUvucy?= =?us-ascii?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Hl0B3q98tLrITIq72ZO+Hd77+f1ZN5JGpRpECT4GhmBsr3TMNUX1ILrJ7GajWJgYUfYUOwTY/cw1ue0onPg1STZ0Ov3DeTPzyF1F X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2017 02:27:22.6378 (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: CY1PR12MB0012 Cc: dc_upstream@amd.com, nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, laurent.pinchart@ideasonboard.com, daniel.vetter@intel.com 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 Allows using atomic flip helpers for drivers using ASYNC flip. Remove ASYNC_FLIP restriction in helpers and caches the page flip flags in drm_crtc_state to be used in the low level drivers. v2: Resending the patch since the original was broken. v3: Save flag in crtc_state instead of plane_state Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/drm_atomic_helper.c | 19 +++++-------------- include/drm/drm_crtc.h | 8 +++++++- include/drm/drm_plane.h | 1 + 3 files changed, 13 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index a4e5477..28065ee 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -2737,7 +2737,8 @@ static int page_flip_common( struct drm_atomic_state *state, struct drm_crtc *crtc, struct drm_framebuffer *fb, - struct drm_pending_vblank_event *event) + struct drm_pending_vblank_event *event, + uint32_t flags) { struct drm_plane *plane = crtc->primary; struct drm_plane_state *plane_state; @@ -2749,12 +2750,12 @@ static int page_flip_common( return PTR_ERR(crtc_state); crtc_state->event = event; + crtc_state->pflip_flags = flags; plane_state = drm_atomic_get_plane_state(state, plane); if (IS_ERR(plane_state)) return PTR_ERR(plane_state); - ret = drm_atomic_set_crtc_for_plane(plane_state, crtc); if (ret != 0) return ret; @@ -2781,10 +2782,6 @@ static int page_flip_common( * Provides a default &drm_crtc_funcs.page_flip implementation * using the atomic driver interface. * - * Note that for now so called async page flips (i.e. updates which are not - * synchronized to vblank) are not supported, since the atomic interfaces have - * no provisions for this yet. - * * Returns: * Returns 0 on success, negative errno numbers on failure. * @@ -2800,9 +2797,6 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc, struct drm_atomic_state *state; int ret = 0; - if (flags & DRM_MODE_PAGE_FLIP_ASYNC) - return -EINVAL; - state = drm_atomic_state_alloc(plane->dev); if (!state) return -ENOMEM; @@ -2810,7 +2804,7 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc, state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); retry: - ret = page_flip_common(state, crtc, fb, event); + ret = page_flip_common(state, crtc, fb, event, flags); if (ret != 0) goto fail; @@ -2865,9 +2859,6 @@ int drm_atomic_helper_page_flip_target( struct drm_crtc_state *crtc_state; int ret = 0; - if (flags & DRM_MODE_PAGE_FLIP_ASYNC) - return -EINVAL; - state = drm_atomic_state_alloc(plane->dev); if (!state) return -ENOMEM; @@ -2875,7 +2866,7 @@ int drm_atomic_helper_page_flip_target( state->acquire_ctx = drm_modeset_legacy_acquire_ctx(crtc); retry: - ret = page_flip_common(state, crtc, fb, event); + ret = page_flip_common(state, crtc, fb, event, flags); if (ret != 0) goto fail; diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 5c77c3f..76457a4 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -162,10 +162,16 @@ struct drm_crtc_state { * Target vertical blank period when a page flip * should take effect. */ - u32 target_vblank; /** + * @pflip_flags: + * + * Flip related config options + */ + u32 pflip_flags; + + /** * @event: * * Optional pointer to a DRM event to signal upon completion of the diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index db3bbde..57414ae 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -122,6 +122,7 @@ struct drm_plane_state { */ bool visible; struct drm_atomic_state *state; }; -- 1.9.1