From patchwork Mon Apr 1 09:58:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 10879567 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 243F314DE for ; Mon, 1 Apr 2019 09:58:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E6D228739 for ; Mon, 1 Apr 2019 09:58:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02C3C2876C; Mon, 1 Apr 2019 09:58:56 +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 9FA0028740 for ; Mon, 1 Apr 2019 09:58:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD4156E11A; Mon, 1 Apr 2019 09:58:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-eopbgr770047.outbound.protection.outlook.com [40.107.77.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6ED8A6E11A; Mon, 1 Apr 2019 09:58:52 +0000 (UTC) Received: from SN1PR12CA0109.namprd12.prod.outlook.com (2603:10b6:802:21::44) by BY2PR12MB0583.namprd12.prod.outlook.com (2a01:111:e400:52dd::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.17; Mon, 1 Apr 2019 09:58:50 +0000 Received: from DM3NAM03FT010.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::202) by SN1PR12CA0109.outlook.office365.com (2603:10b6:802:21::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1750.16 via Frontend Transport; Mon, 1 Apr 2019 09:58:50 +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 DM3NAM03FT010.mail.protection.outlook.com (10.152.82.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1750.16 via Frontend Transport; Mon, 1 Apr 2019 09:58:49 +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; Mon, 1 Apr 2019 04:58:48 -0500 From: Chunming Zhou To: , , , Subject: [PATCH libdrm 1/8] new syncobj extension v3 Date: Mon, 1 Apr 2019 17:58:31 +0800 Message-ID: <20190401095838.10165-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)(979002)(136003)(376002)(39860400002)(396003)(346002)(2980300002)(428003)(189003)(199004)(5820100001)(36756003)(7696005)(26005)(426003)(77096007)(478600001)(97736004)(8676002)(106466001)(86362001)(81166006)(50226002)(105586002)(2201001)(5660300002)(8936002)(305945005)(2906002)(316002)(72206003)(54906003)(110136005)(1076003)(53936002)(81156014)(486006)(2870700001)(2616005)(476003)(186003)(53416004)(126002)(47776003)(50466002)(68736007)(356004)(336012)(6666004)(4326008)(104016004)(23676004)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0583; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e4f44042-673b-4056-d086-08d6b688a3c6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:BY2PR12MB0583; X-MS-TrafficTypeDiagnostic: BY2PR12MB0583: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0994F5E0C5 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 83qdFIV4xcjvfWPuoYkDB+tpZ7XohU5eNuuk90JdZ5S39G6JpM2SEiZClYeoenniMFOoGmQlanIx0WT3/mCsC1B7QdFt6KBA1FsuSyGGN+H/I8fjthU5XXslSUOXSlitpF/soyGBjYwZdj2LMM5A8A+TE4L34hRMhS9Th8grmrEOJ05tbpTv/UxKwvWldJfVlre2OyHjTnyxOat4aCatQeH7ShwycR9Bt3Tu5DF5hB4rhR3GCDmCMwNZ2OxXWOfWtJbnwoRDjmhlxZoZn+tTCOQmF2E5EhX3jszlsvXhFMnr7tNLF5CsAgmtpXsg+haM1V7wV8vHkG77o5hQmBYJgS4A7neTPVpXmw2/CbxuP0Qzh9XAaABDQEqOflLSCCtIvXlUoyT1zdz9INNXEPFJaJxH3/jB4rER0ARnLQkN+4E= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2019 09:58:49.7025 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e4f44042-673b-4056-d086-08d6b688a3c6 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: BY2PR12MB0583 X-Mailman-Original-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:X-MS-Exchange-SenderADCheck; bh=yDMMW9KRPVsMDuSzZChqjVLalKgHDo4YKzwUjfsNiB4=; b=xHMhEuoYZiAWXnNM4/JRWTdgp9QTZBCXo50kSDh9IprqP3YiMUApLcNWVcnnItG2eTZPNnI0OktNFWux29SSQvx+5fU4srDLFbr2G1n7wH1TIvMlqhf26JZNhUe+fnbXoHAPTDHk1dgwckCiz9hCdwgjtC8VmAeGFt0hNUMu/1M= X-Mailman-Original-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; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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.