From patchwork Fri Dec 7 15:54:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 10718419 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 C999015A6 for ; Fri, 7 Dec 2018 15:55:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B6FEF2DADC for ; Fri, 7 Dec 2018 15:55:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA15B2E5F6; Fri, 7 Dec 2018 15:55:39 +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=BAD_ENC_HEADER,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 39B882DADC for ; Fri, 7 Dec 2018 15:55:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7E87D6E7CC; Fri, 7 Dec 2018 15:55:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from NAM05-BY2-obe.outbound.protection.outlook.com (mail-eopbgr710077.outbound.protection.outlook.com [40.107.71.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29A126E7C8; Fri, 7 Dec 2018 15:55:37 +0000 (UTC) Received: from CY4PR12CA0035.namprd12.prod.outlook.com (2603:10b6:903:129::21) by DM2PR12MB0061.namprd12.prod.outlook.com (2a01:111:e400:3c11::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.17; Fri, 7 Dec 2018 15:55:35 +0000 Received: from BY2NAM03FT060.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::203) by CY4PR12CA0035.outlook.office365.com (2603:10b6:903:129::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.19 via Frontend Transport; Fri, 7 Dec 2018 15:55:35 +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 BY2NAM03FT060.mail.protection.outlook.com (10.152.85.85) 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:55:34 +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:55:34 -0600 From: Chunming Zhou To: , , , Date: Fri, 7 Dec 2018 23:54:20 +0800 Message-ID: <20181207155422.15967-8-david1.zhou@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181207155422.15967-1-david1.zhou@amd.com> References: <20181207155422.15967-1-david1.zhou@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)(39860400002)(136003)(396003)(376002)(346002)(2980300002)(428003)(189003)(199004)(97736004)(2616005)(486006)(126002)(476003)(426003)(36756003)(11346002)(446003)(2906002)(1076002)(53936002)(478600001)(72206003)(336012)(5660300001)(16586007)(305945005)(8676002)(77096007)(26005)(50226002)(68736007)(76176011)(110136005)(81156014)(81166006)(8936002)(53416004)(48376002)(575784001)(51416003)(47776003)(14444005)(106466001)(105586002)(7696005)(186003)(316002)(104016004)(450100002)(86362001)(4326008)(6666004)(356004)(2201001)(50466002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0061; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT060; 1:3seVPZlwYEvrF0Yr7P6Dz+O7RVXK92sgRuMsBkZ2rnOfPuGvoK7Aw3kxGE7UaR3Z5yV0qEEYV4h+dynrAlxNEKF3E5siCL0lnf3Gp70kcyE2Pr037b1Qs4+BU+wnaeL6 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bc7aca2-68f2-4da8-f5ea-08d65c5c6ccf X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060); SRVR:DM2PR12MB0061; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0061; 3:Y5T82KXcBJ1k6lwhW8BnqbFmJA9re1egRGRmdSP/Ia988OwdLIbIKsrnEG47CLuZddkeTSY6OgQvOoi0HFnYyRDGfp63zya2Ai/I37fOZu0UjIMzsZ2BBaq8SYroU+DTIIFznD1mDUnuqwnPCW0onK1rKHRNui8ZcPP/6cwU90E2WKEgi7lzRsHhidLyz+wfZO4nvBjGKg+2iLF8zinOkiQjX1rqpt1sU2KIC9HabbwvD52m/s6P7aPXYlaHA4cqkWtJbMpYrpP3LB+rl2xED29LBB3zYXdJZrI1iacoDy6WIuX445bgnt5Hbe6ytJrDaq2bjM4H7As2vPPGQoKz3883YadZBHh4I2sZeDTLapw=; 25:Jok5QqUQx5p10L47dETaAFxX0kB6AhIdyXDhL3m5N2Xp7BRz3ESB0LnuMLO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6X1rTPNyffoM+uEEGZpY 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)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(201708071742011)(7699051)(76991095); SRVR:DM2PR12MB0061; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0061; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0061; 4:hU3lEOOp60JuWLg63QNXh2vI0JSQBCDvgW6/O/YVnMW2wGSVNsgo59g3d0S2rJbkUGliLRL7P6ikFXDTGaOOcgfEAbO9H6pVNa7vnNwsjYvTHJnBQoVsGRoCWIfsSMPV01jB9GxlcGkbIFWS9bMp5gHnlCU1HCeki2kZYtp367fjz094FIhYGP6LzWydRs7IjdpmOpFmKhD85TUfCXMYGAdyg6BgAl/MHLeGtb1MdQuzwKQUIBQOYn8ZKzD1wVEmbLvSFD3vGrHsUC9V1H+nHA== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0061; 23:OOzIetsFCWkzP4bvQ1GuyxFlk3vEIFOBM9kIn41mv?= gU57uIZNxMvdgWZ+FJzBEErzS9vBViK+uFJzepcwnWH7Yjrw3LG1F8iTAs1+TOKc0G+3cVzMEfZGutkVnoxH7dLB/sMgmh3NoZzWWAFujkArzDlkgmeohee5C7j4fhIwsQB0x6EW0pTLM14dkBe4VVBXWhxcakYCuavGcTxLO8DRdPkJDpX1CAGcWC1JMQh1Fh6tIRUDCJSZiphE/eC36nQNxrDtSXfjxFW7k1UQomZzjdT07nl6EWKHH+VL+4phYr5TQP7agBlVDsRIOmkfB7m3u6JK2VQVFV2171ptJXzNloQ+0w9epw1yRl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M X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0061; 20:1/lRcpsaHnsBn5JN8yFr30hGEFEOEEcJ4e3/T890GDaDXaR7ujeswNdxnGV35eBqCPt+JJ7sYEFMkQLzdIf3/iRx6Jv2gUNnIbtPTNnNMfsmY7NmXUEWnPiaMKvBQACQRWPWepc8P6HtlpFOz2C74BO/MhRFcODcLpTcbm80j0KDSL/UAKVXCu4eSOd5NUK/2vfCVU3S0wFhwgjGJ21/Wv2qh2CxWj7NEBrGSkHZdYz0ViRc5flm+oRIXndEddCW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 15:55:34.9943 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bc7aca2-68f2-4da8-f5ea-08d65c5c6ccf 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: DM2PR12MB0061 Subject: [Intel-gfx] [PATCH 08/10] drm/syncobj: add transition iotcls between binary and timeline v2 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 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP we need to import/export timeline point. v2: unify to one transfer ioctl Signed-off-by: Chunming Zhou --- drivers/gpu/drm/drm_internal.h | 2 + drivers/gpu/drm/drm_ioctl.c | 2 + drivers/gpu/drm/drm_syncobj.c | 79 ++++++++++++++++++++++++++++++++++ include/uapi/drm/drm.h | 10 +++++ 4 files changed, 93 insertions(+) diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index dab4d5936441..06c2adc4950e 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -176,6 +176,8 @@ int drm_syncobj_handle_to_fd_ioctl(struct drm_device *dev, void *data, struct drm_file *file_private); int drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data, struct drm_file *file_private); +int drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_private); int drm_syncobj_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file_private); int drm_syncobj_timeline_wait_ioctl(struct drm_device *dev, void *data, diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 7578ef6dc1d1..e9d4bed12783 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -673,6 +673,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = { DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE, drm_syncobj_fd_to_handle_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_TRANSFER, drm_syncobj_transfer_ioctl, + DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_WAIT, drm_syncobj_wait_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT, drm_syncobj_timeline_wait_ioctl, diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 282982e58dbd..82f0ab96813e 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -670,6 +670,85 @@ drm_syncobj_fd_to_handle_ioctl(struct drm_device *dev, void *data, &args->handle); } +static int drm_syncobj_binary_to_timeline(struct drm_file *file_private, + struct drm_syncobj_transfer *args) +{ + struct drm_syncobj *timeline_syncobj = NULL; + struct dma_fence *fence; + struct dma_fence_chain *chain; + int ret; + + timeline_syncobj = drm_syncobj_find(file_private, args->dst_handle); + if (!timeline_syncobj) { + return -ENOENT; + } + ret = drm_syncobj_find_fence(file_private, args->src_handle, 0, 0, + &fence); + if (ret) + goto err; + chain = kzalloc(sizeof(struct dma_fence_chain), GFP_KERNEL); + if (!chain) { + ret = -ENOMEM; + goto err1; + } + drm_syncobj_add_point(timeline_syncobj, chain, fence, args->dst_point); +err1: + dma_fence_put(fence); +err: + drm_syncobj_put(timeline_syncobj); + + return ret; +} + +static int +drm_syncobj_timeline_to_binary(struct drm_file *file_private, + struct drm_syncobj_transfer *args) +{ + struct drm_syncobj *binary_syncobj = NULL; + struct dma_fence *fence; + int ret; + + binary_syncobj = drm_syncobj_find(file_private, args->dst_handle); + if (!binary_syncobj) + return -ENOENT; + ret = drm_syncobj_find_fence(file_private, args->src_handle, + args->src_point, args->flags, &fence); + if (ret) + goto err; + drm_syncobj_replace_fence(binary_syncobj, fence); + dma_fence_put(fence); +err: + drm_syncobj_put(binary_syncobj); + + return ret; +} +int +drm_syncobj_transfer_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_private) +{ + struct drm_syncobj_transfer *args = data; + int ret; + + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + return -ENODEV; + + if (args->pad) + return -EINVAL; + + if (args->src_point && args->dst_point) + return -EINVAL; + + if (!args->src_point && !args->dst_point) + return -EINVAL; + + if (!args->src_point) + ret = drm_syncobj_binary_to_timeline(file_private, args); + else + ret = drm_syncobj_timeline_to_binary(file_private, args); + + return ret; +} + static void syncobj_wait_fence_func(struct dma_fence *fence, struct dma_fence_cb *cb) { diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index b2c36f2b2599..4c1e2e6579fa 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -735,6 +735,15 @@ 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) @@ -933,6 +942,7 @@ extern "C" { #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) /** * Device specific ioctls should only be in their respective headers