From patchwork Fri Dec 7 15:56:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 10718435 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 4363815A6 for ; Fri, 7 Dec 2018 15:57:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DF5C2E4DD for ; Fri, 7 Dec 2018 15:57:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BBD92DADC; Fri, 7 Dec 2018 15:57:01 +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 BBD8B2DADC for ; Fri, 7 Dec 2018 15:57:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E43916E7D0; Fri, 7 Dec 2018 15:56:58 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750084.outbound.protection.outlook.com [40.107.75.84]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E3166E7CD; Fri, 7 Dec 2018 15:56:57 +0000 (UTC) Received: from DM5PR12CA0063.namprd12.prod.outlook.com (2603:10b6:3:103::25) by BN7PR12MB2627.namprd12.prod.outlook.com (2603:10b6:408:29::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19; Fri, 7 Dec 2018 15:56:55 +0000 Received: from DM3NAM03FT065.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::208) by DM5PR12CA0063.outlook.office365.com (2603:10b6:3:103::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.17 via Frontend Transport; Fri, 7 Dec 2018 15:56:55 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT065.mail.protection.outlook.com (10.152.82.254) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.17 via Frontend Transport; Fri, 7 Dec 2018 15:56:55 +0000 Received: from zhoucm1.amd.com (10.34.1.3) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Fri, 7 Dec 2018 09:56:54 -0600 From: Chunming Zhou To: , , , Date: Fri, 7 Dec 2018 23:56:36 +0800 Message-ID: <20181207155642.16063-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)(39860400002)(376002)(346002)(136003)(396003)(2980300002)(428003)(189003)(199004)(7696005)(23676004)(77096007)(86362001)(50226002)(104016004)(1076002)(8676002)(2201001)(478600001)(72206003)(126002)(68736007)(2616005)(50466002)(4326008)(26005)(336012)(476003)(450100002)(36756003)(81156014)(8936002)(81166006)(486006)(426003)(97736004)(186003)(5660300001)(5820100001)(47776003)(53416004)(106466001)(53936002)(316002)(2906002)(305945005)(105586002)(6666004)(356004)(110136005)(54906003)(2870700001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN7PR12MB2627; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT065; 1:rPZvPz6HDFNuiZvN9cqvun02M6VrGseqj3yapl2SVHb5vWeQR5yQWAYlia9VcPqT3B0/t/qCK3NKp3ywc7dKA7ezU/g3XS/6BnAcbYw+RVrLw1DEJaTAJnqPkFq8blED X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7be6c87-db29-4a1d-f9c4-08d65c5c9cb2 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:BN7PR12MB2627; X-Microsoft-Exchange-Diagnostics: 1; BN7PR12MB2627; 3:OAqRGg3cNkBWtQH4BNYD5khbh8tI5M7lXKFJhPi9ZOJmm3iFCY+4PA9CEQxI8etg93IFZ+w499J/4ld2ENAQvDcS1CmONYxi9OlZeu1v/Hz7uZ2gQPGetJ16sSHITotYVDpbpeKt6a0UHHFEJvd6MTS+cdKzWij39sJ4vavfUVr0y7IuaB4NZQsTodHeyB9TufDO30ORTlXLGMdpepmPlDsEuhI5ZPTAW8kJl31Fhpgg3zB1ReQ0LF/mVB9dcq0535PXV3en/li7gBvI02DUB5V1x9GChtoyexMSLJuKffW2Y08retionyLgXtu3UoahTXBICw+op0k2k8f20FozSlsQTdPoh4zc/hxXdAZeedY=; 25:c7lv6DOyDWK2qsSiHH3BQX3QaKdXerDv+muzwN52PXSwH9u4xybfimAUEpHYwe923RIhndChQ/dEuOdbxzBHo2/RHwJEuYcSeA9BhzKvP0RQz6jxBVHR9D80L3qR5NKdW19micxFySZ1NC/upDpzZnvyTRYMGm5wqQoCtIogizsG+pazv9b1GV5xyzPtrnD3en774WVOtLyCR/21U06R4Ni90uzYxS3sOS/NJsEo7CMGhmuYlVT6f7tWoXHO7H/q5BorC9B5wHENeDh4nt/P22Uhno9KU2JEw1gASmkgSfPz9DFS2mZj6HLl3i+ssOGVUEXy2jr5NJwtGX9/r9fMgQ== X-MS-TrafficTypeDiagnostic: BN7PR12MB2627: X-Microsoft-Exchange-Diagnostics: 1; BN7PR12MB2627; 31:APsShmlY7DUrnXOVvgSOLBC9Kzjbo8CrwGxVHaZVydqc47GGI0J9HrV/LgIYEnwqMKPfHetykzYUEoARno3Fac0Ubhizoq+WQjG6BfbRpxWm8qwhgbesFpJj8PylOL6nn0viW+x0eAFc2YFCGCTJOHmUpBXel0eV7Ba4DHH7wgTvEFgtbj1ZU5FKWnW+lnaxI/0csPggEZ7w1NDLH3HWuUSM4ZeuarkrItFNrhQBQVw=; 20:ktBNefAN9t7mngYV4c52Kcge2N8HDuGZWeyLxvSolaZsHnbcTZ/nzAr+Xei8IiwVPABqCnCF8v+x4lTlbfGI3Azv2KL4Z8JSf0ziVFFWBsy9tyGiNnSeUTwKT4eQKyuEClCBPKwVZn3vHXHkPX5cRcuLdbpM19Y+jFArcGLMoCf+AlDBbPdLWeWP+cUDJAIXSCy3xuLluRE75ympQv/dfAAqr+Wtn1ugpwFiQXuJ02hD9F9OIdStae//fXCMLqLSogDwTvwy06aP52RnCgFninqodNByT7fAhBlrmp5g6NDSzDi3Si6yLZwqoV09+tQqz/gxcY8x2JlnhshsQU813/O8rHkLVjetexk/aAvt6KfOY10sZ0xs9dbQsEFNMxdaFR3uEnlPfwk8RY8UWMeIzDZ/m8SEtdJ8m81ETvWB8ajLcNHYWmFjnoNUh/HVcxHIcOB1exXT5RHP7i9rheOc3VwaIMCt8IQBBKeAf6MWBxBRk6V4MLLPyPTyQSbf3sJk X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93003095)(3231455)(999002)(944501520)(52105112)(6055026)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(20161123560045)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:BN7PR12MB2627; BCL:0; PCL:0; RULEID:; SRVR:BN7PR12MB2627; X-Microsoft-Exchange-Diagnostics: 1; BN7PR12MB2627; 4:Z7Q1/7xNpxZ+ymurcUmZVF9rwoph84mc5hjhLvwdTLTVs3ZZ0RDS08q6Da1gN6YrXwJgKj0GbKGEdzceOXs008R41jvlpnmhY6pIHdWEO0boy9sNB9POXRJbYlhldumH9KIQtO1TFnYHxf9j5bhRGNZ+j6c9TlMuQM1UztRyllmdCBxD2lAFRCCNiAbqHItt11z5Net/viPbZQU09ahQ/OT3Hpx+jIdYZYWx02Yjb0TXBt4rZbw1NURBsQgjVxQJEasQc+rlM1vkTn4jyDiilg== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BBN7PR12MB2627=3B23=3A4vwWgII?= =?utf-8?q?ZVO1d8tgamzxX8IFOhOFC6d09QINNIbScrGKQJ8y8Sqok13vkkuOslXNiUDUzveXf?= =?utf-8?q?NW7mZ1vnPz/RTVPbGg3BRPqMZesOiIJZYMoozMDjI9ziQgzgsXCbOwks/lrW3n3y1?= =?utf-8?q?FVXs79CaynCaleCWav1+ofoW/gBpyB1q700WgfalP5Q+cpG0jlncyu4VLWSURIG+Y?= =?utf-8?q?/WBIrS/NGXZz8trDg6Vu1yvqPyqQwXn+1fxS8t/aPZ9etpyaBW5bhKeMudse4XPLh?= =?utf-8?q?lkDErRulzx27C1TP1CVB+RP/bIsjITULFywJemIWF8MEUKW9Hq9umxCGqjwWyDea1?= =?utf-8?q?047VVrw6Vivimc8X446xgBgs1IjZrCAlpm6aZSBaiwII2t9Y4j5eN2d33CQW5E45r?= =?utf-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agnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN7PR12MB2627; 20:ceDOP+Lm5OgJBqb/h2XCaXvFbllR3qiwXNKmxJdsl+qEOv5mVhCK+t3idtnhVmm5c+4fAUv5GVqnCKBxwXbmz+VwM+Vyhvx5semuGKG7590WcLYb/bFdvhVxVvoBVxV2QueF5MUQP+fUsqdfjkH3z2cS0xDsVsnaVW7AZL/eSQaG+Ut8aEyYDSfOO/r/fnkxWLK/GkoV36/Kg9xSQYKf5bcDY2UHSJffdQo7McTuLqVTCaYa/Jd7/DNQgqZXpdih X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 15:56:55.3350 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7be6c87-db29-4a1d-f9c4-08d65c5c9cb2 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: BN7PR12MB2627 Subject: [Intel-gfx] [PATCH libdrm 1/7] 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.