From patchwork Tue Dec 11 10:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 10723465 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B0FEB1869 for ; Tue, 11 Dec 2018 10:36:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0AA62A0AA for ; Tue, 11 Dec 2018 10:36:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93D1D2A0DC; Tue, 11 Dec 2018 10:36:43 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 3E8272A0AA for ; Tue, 11 Dec 2018 10:36:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 85A8089E0C; Tue, 11 Dec 2018 10:36:42 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-eopbgr730049.outbound.protection.outlook.com [40.107.73.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27C6789E0C; Tue, 11 Dec 2018 10:36:41 +0000 (UTC) Received: from DM5PR12CA0019.namprd12.prod.outlook.com (2603:10b6:4:1::29) by DM6PR12MB2634.namprd12.prod.outlook.com (2603:10b6:5:4a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.23; Tue, 11 Dec 2018 10:36:39 +0000 Received: from BY2NAM03FT047.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::202) by DM5PR12CA0019.outlook.office365.com (2603:10b6:4:1::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.21 via Frontend Transport; Tue, 11 Dec 2018 10:36:39 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by BY2NAM03FT047.mail.protection.outlook.com (10.152.85.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1425.16 via Frontend Transport; Tue, 11 Dec 2018 10:36:39 +0000 Received: from zhoucm1.amd.com (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server id 14.3.389.1; Tue, 11 Dec 2018 04:36:37 -0600 From: Chunming Zhou To: , , , Date: Tue, 11 Dec 2018 18:36:20 +0800 Message-ID: <20181211103627.25985-1-david1.zhou@amd.com> X-Mailer: git-send-email 2.17.1 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)(396003)(376002)(39860400002)(346002)(136003)(2980300002)(428003)(199004)(189003)(50466002)(54906003)(106466001)(2906002)(6666004)(104016004)(2201001)(2870700001)(68736007)(356004)(86362001)(1076002)(47776003)(426003)(97736004)(305945005)(126002)(2616005)(476003)(5660300001)(486006)(450100002)(53936002)(186003)(53416004)(4326008)(26005)(105586002)(7696005)(23676004)(8676002)(50226002)(5820100001)(478600001)(81156014)(81166006)(110136005)(36756003)(336012)(72206003)(316002)(77096007)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM6PR12MB2634; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT047; 1:yQ1r8zko0x0dwf66ZW1PBjaAd5P09KswMoCgLSu3l2kJHv4eH8h2RqMGa2qnJAxmExJgec3I+913TJFWW5LIELfSxGNoJfy7rztDTt2BzkmVz3/iAZa2lp0EXpcsNqsw X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da35a7c4-8cb9-4101-54dd-08d65f54889c X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060); SRVR:DM6PR12MB2634; X-Microsoft-Exchange-Diagnostics: 1; DM6PR12MB2634; 3:6GhuvRMkV3uCRKy2E7KZu8zZ+EIrhDnd9LkOv4kkDwWAtnVg/eUNKK6sngL+kUCNhEZOFQTTntgRorSJrFkAwX5zkgNHHSrxFAfoDDl84xmShL+D41dJjZrVkzRTdahjnYiR5/9XNUfLUP+MZinp6o7cm/zVcr4t3rveSX3yQromyGUNNv/ROp37DqAD2R/rM07QGxSHrG1Ww5hkD5Cg9p+XGfxhdRpsoH961BDOcvDoaGUv7LQXtuIsIfge/iBza1on/UR85ODopzWapIYdlc6nmzxKZuH2+vB5f0NrikGqNLlX9lg6QjItIJHrgjnQfHei7s4ibQ3r/DcxQWgKexiP/zVDyowcpEs9OT/nk80=; 25:/Bf3IMalNz+VaoaVV2oFQci599XU8UF9ID3g8ZFGE3oHND+w5Pv1HeagKZzMSRa/qyDS+JkIkZpuqEhUdE/P47BaqfotNKLezU8XihNn8Hoz7hwVeial/dMEobXMKvhi1DsEHdDts6oX2JfGpACT/Ysz8VA7yRa8EHSKDVomUfc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-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231455)(999002)(944501520)(52105112)(10201501046)(93006095)(93003095)(3002001)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123558120)(20161123560045)(201708071742011)(7699051)(76991095); SRVR:DM6PR12MB2634; BCL:0; PCL:0; RULEID:; SRVR:DM6PR12MB2634; X-Microsoft-Exchange-Diagnostics: 1; DM6PR12MB2634; 4:JT0LDun7kT2/5prW62aMRmW/ouvv6h2bofQGUlZgMQ3Wyt8PLKLn5QdR2Fuh8JvYPs+pwCf1QGpudeF5IM2ptvGm2uv/BMmzLdVev5iZjT/z63CHhvhvxgxxu09jFyPN4i47Z+K5JnGuIuMj6uaLDaEXNaIB43p1wfdLBJ05b6QUd2Y7wqHLvWnjoxOwVLEeyiDGRnsvkUj8kvw+icyAgHuwwDTPiYfl3ilY4ONNSV/S0E3XmNSVwKEgBLySu+HuPdvPcxTppchkVS+IyUJ1jg== X-Forefront-PRVS: 08831F51DC X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BDM6PR12MB2634=3B23=3A/Y+o2N0?= =?utf-8?q?1ryCKw/45rPf12fGIdmjnHj32YSGMsEvwx3DAQ5ZwWEoxhnxrWAGeATwrIE3CgO2b?= =?utf-8?q?NTJzzTEjEKifvw6dYHW7HfS0BEZCA9os7I7LkuSLHZ3wEa4KNjsb8EYoxT9ZzA+4l?= =?utf-8?q?gAbsG8TtvGPQ5dXJTpfDgTzn6KOIzUfbfIrPsCM7uGxfRaVc9oo8hPG7jySXaesDJ?= =?utf-8?q?COioJVyWheLbzVsc7p/6gfx4hgtejwWh8tes9yYKP+3wVnHNEkklwY3lz4BxfGQzR?= =?utf-8?q?H67Fyxy/JvjF7w+3wgg5lZnbREbRUhy/pXXMj1qAheMyBrxgcKwV7n4fa/Vgr1Yz+?= =?utf-8?q?r/Dy4k8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3MlG9TSnbN5wQeV6va5Fp11plfyb2dZMOkbcQLpRvMUlrOkaEEbqVAi8A== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM6PR12MB2634; 20:rdpGRxS+bCEdkfFB3POe3RPCcFS2x07M9/T5mYXLlVwOq5quS6cBMM7l1X8FcAhewZA9444hewzchRHuZh0GSCZ0pj1ChPeIcHfboD+2V85YT/lJKFC6ubJKh5NtywgN29uvS0OJdHrIyyULjMvh6kGz3RAa9iP9biC6X7krhkdlbYgAdrVAAwUckJU7JBznrU7r0GfZgkd6M1xJ0g/hJSInRxwzhsFKzmpL4Cr6iMwq+xDahFnBtB2wJR0reicx X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2018 10:36:39.1310 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da35a7c4-8cb9-4101-54dd-08d65f54889c 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2634 Subject: [Intel-gfx] [PATCH libdrm 1/8] new syncobj extension v3 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chunming Zhou , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP v2: drop not implemented IOCTLs and flags v3: add transfer/signal ioctls Signed-off-by: Chunming Zhou Signed-off-by: Christian König --- include/drm/drm.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/drm/drm.h b/include/drm/drm.h index 85c685a2..26f51bca 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h @@ -729,8 +729,18 @@ struct drm_syncobj_handle { __u32 pad; }; +struct drm_syncobj_transfer { + __u32 src_handle; + __u32 dst_handle; + __u64 src_point; + __u64 dst_point; + __u32 flags; + __u32 pad; +}; + #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) #define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) +#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) struct drm_syncobj_wait { __u64 handles; /* absolute timeout */ @@ -741,12 +751,31 @@ struct drm_syncobj_wait { __u32 pad; }; +struct drm_syncobj_timeline_wait { + __u64 handles; + /* wait on specific timeline point for every handles*/ + __u64 points; + /* absolute timeout */ + __s64 timeout_nsec; + __u32 count_handles; + __u32 flags; + __u32 first_signaled; /* only valid when not waiting all */ + __u32 pad; +}; + struct drm_syncobj_array { __u64 handles; __u32 count_handles; __u32 pad; }; +struct drm_syncobj_timeline_array { + __u64 handles; + __u64 points; + __u32 count_handles; + __u32 pad; +}; + /* Query current scanout sequence number */ struct drm_crtc_get_sequence { __u32 crtc_id; /* requested crtc_id */ @@ -903,6 +932,12 @@ extern "C" { #define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) #define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) +#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) +#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) +#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) +#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) + + /** * Device specific ioctls should only be in their respective headers * The device specific ioctl range is from 0x40 to 0x9f.