From patchwork Fri Dec 7 15:54:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chunming Zhou X-Patchwork-Id: 10718411 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 AB97814E2 for ; Fri, 7 Dec 2018 15:55:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 976742DADC for ; Fri, 7 Dec 2018 15:55:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8803C2E5F6; Fri, 7 Dec 2018 15:55:20 +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 13AB22DADC for ; Fri, 7 Dec 2018 15:55:20 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C8166E7C7; Fri, 7 Dec 2018 15:55:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on060d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe49::60d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75DBC6E7C7; Fri, 7 Dec 2018 15:55:17 +0000 (UTC) Received: from CY4PR1201CA0004.namprd12.prod.outlook.com (2603:10b6:910:16::14) by CY1PR12MB0059.namprd12.prod.outlook.com (2a01:111:e400:4c2a::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1382.22; Fri, 7 Dec 2018 15:55:14 +0000 Received: from BY2NAM03FT059.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::206) by CY4PR1201CA0004.outlook.office365.com (2603:10b6:910:16::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1404.19 via Frontend Transport; Fri, 7 Dec 2018 15:55:14 +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 BY2NAM03FT059.mail.protection.outlook.com (10.152.85.111) 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:13 +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:11 -0600 From: Chunming Zhou To: , , , Date: Fri, 7 Dec 2018 23:54:17 +0800 Message-ID: <20181207155422.15967-5-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)(376002)(39860400002)(396003)(136003)(346002)(2980300002)(428003)(189003)(199004)(4326008)(47776003)(316002)(2870700001)(77096007)(86362001)(50226002)(5820100001)(68736007)(305945005)(76176011)(14444005)(8936002)(104016004)(53416004)(486006)(2201001)(5660300001)(81166006)(126002)(106466001)(54906003)(110136005)(81156014)(2906002)(356004)(426003)(2616005)(336012)(50466002)(11346002)(186003)(23676004)(36756003)(446003)(8676002)(7696005)(26005)(478600001)(476003)(105586002)(1076002)(72206003)(97736004)(53936002)(66574011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0059; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; BY2NAM03FT059; 1:RHTN+qXK+yi2TPUAuICgdcS3V2xMlM0ugEoC4kOiiKZiP4izPFSw+WHdLI5ZDb1YccqRgJTAmQPoiRsvme2bFwsMOaRdR++GgL85TCPZE4O88ybMlZy76qt7VuxFDqGC X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 367db1a4-d59b-4ea4-b34d-08d65c5c6007 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060); SRVR:CY1PR12MB0059; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0059; 3:Dbh7HEBZvyCDvPtLgVzefm+CpVS7YELXPznZFi8Cy8uyho4rr55wK9v6y2NhGVvsQQCAv64Gfu8Wii508Ua618ch/7a0jwrgYNuwVtK/SsoX+pKIai3AUQT6vbbjPTWHNHalB04r1zt2xmDof34LB3wIZQJjFe7sabo6fA/j4rXFsK6i2owest+bqHvmKQcHsqadyJ1CjGPSGMrvp+nbHWIzY+1sOeBDukVvZBTnSlfbPMW8iJyDTYHc1vYhLynnbCsHJJjdLevQOQcjEEtw9OrWr4LKJttHYGUvWmWuq77WZRW6Q/qj4d0UfEXwT/y4lKrx8ZStzPnGRI9kqIP4exzkE40eJEzLIMgCXg90fRE=; 25:sHhYEdVUt+bkGq3X7E7ASEBnOORfUV47lLpeYmuZPJmMoOo0wXEsUH6hrrwCMBnRkHuX3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C4P2TvOCTSLg0osHraSuHH+qdeXR X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93003095)(3231455)(999002)(944501520)(52105112)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:CY1PR12MB0059; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0059; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0059; 4:UWtOElKJ9+VPBHuosCby+eHmWCgysTmqg3ejF8UHHRVQ3CyzWbxq82IQBMPH9dbaf3d9SeBWjPKsEjH/GtYsGgOu5oXMjt6ulWsQhcth4iSRIKoYzv4mLj0sEnq5/Nc+VHGpkk+eZAja1It6ygb9J+i7L3xuFd5SwApC1NFrOC2FcBLxFwgd41ufS8AzKLF8z8fKIoCkF89/9zZDlE8+K9JvRQHmhJfiAb7sD1f3jEHDFxsX0765JVUwbqIPVb6JKJ+Ynzk0FiEcdywXBX6mVg== X-Forefront-PRVS: 0879599414 X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BCY1PR12MB0059=3B23=3ALlGp7XN?= =?utf-8?q?9ndTMTtETGYNuLtzQcQmf3h2Fq5AjKbDCOrFoEQ4/An3XPRD20pecArGp0Y3EpA9t?= =?utf-8?q?kxSfpNrEiRcWw7KIF3gms7EHUSKLZBtwlNUgUxyhuD/0Y95hpVx4/C+Yppr1JpB0T?= =?utf-8?q?txJJiGJLhVtnfF5/tnsgKdp0my7WwvzwyT1GHL6KzUlb2IqweY4DkBLPkEH0GDX6O?= =?utf-8?q?cIf9F/0I9iSdU6YVEGZlssvvOBJLqy/0nwxzESVD9tMM6vuU4VoRZnlgg2byd4Paj?= =?utf-8?q?UMkV2FWaG0sxM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dqEImKi+vjYQTyqEdhYYPkbFNbDsA+QCkMJ2/gLkXbosKsYuKswu4zp2Z5jeOAYkOluV9ZfQ=; 7:jqWiFJzjXbsihVgYZmym4X0WF0HLd6sHFED4FhjRj/3m98xPxyCPpH65EUpRvcWN++3V5u/lAnriW/s8jG1X4JZJEf3/ocpkQoTPzZFArjWTggFp2FR7LMUqiVOlQwp98RnvYKYA2XmHimlzyO0ctQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0059; 20:eIfN3BuHUTyAEPLblG1wZy61h3jZItcxyEPu0x1nY51/LkB5XDBXZV+YK6Vq/R3zLGOxnSRcxvvQYaq/Moi8K+4zt/gZmXgyyE6AjD8sUGry3jSXrozoty03iAeAuH4WRTgN05KmIEFiyymCrriW+xPc+mOhfq+xyIlK0xNWtUZusUnzRB66bqcr4MbPq/+YvM7SiJToHM0tHGovisiea8DhJkJNuoKiw++pYYsognK8bItrTqkdsFLYnjYbzFif X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2018 15:55:13.5492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 367db1a4-d59b-4ea4-b34d-08d65c5c6007 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: CY1PR12MB0059 Subject: [Intel-gfx] [PATCH 05/10] drm/syncobj: add timeline payload query ioctl v4 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 , Daniel Rakos , Bas Nieuwenhuizen , Dave Airlie , =?utf-8?q?Christian_K=C3=B6nig?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP user mode can query timeline payload. v2: check return value of copy_to_user v3: handle querying entry by entry v4: rebase on new chain container, simplify interface Signed-off-by: Chunming Zhou Cc: Daniel Rakos Cc: Jason Ekstrand Cc: Bas Nieuwenhuizen Cc: Dave Airlie Cc: Christian König Cc: Chris Wilson --- drivers/gpu/drm/drm_internal.h | 2 ++ drivers/gpu/drm/drm_ioctl.c | 2 ++ drivers/gpu/drm/drm_syncobj.c | 43 ++++++++++++++++++++++++++++++++++ include/uapi/drm/drm.h | 10 ++++++++ 4 files changed, 57 insertions(+) diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index 18b41e10195c..dab4d5936441 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -184,6 +184,8 @@ int drm_syncobj_reset_ioctl(struct drm_device *dev, void *data, struct drm_file *file_private); int drm_syncobj_signal_ioctl(struct drm_device *dev, void *data, struct drm_file *file_private); +int drm_syncobj_query_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_private); /* drm_framebuffer.c */ void drm_framebuffer_print_info(struct drm_printer *p, unsigned int indent, diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index a9a17ed35cc4..7578ef6dc1d1 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -681,6 +681,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = { DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_SIGNAL, drm_syncobj_signal_ioctl, DRM_UNLOCKED|DRM_RENDER_ALLOW), + DRM_IOCTL_DEF(DRM_IOCTL_SYNCOBJ_QUERY, drm_syncobj_query_ioctl, + DRM_UNLOCKED|DRM_RENDER_ALLOW), DRM_IOCTL_DEF(DRM_IOCTL_CRTC_GET_SEQUENCE, drm_crtc_get_sequence_ioctl, DRM_UNLOCKED), DRM_IOCTL_DEF(DRM_IOCTL_CRTC_QUEUE_SEQUENCE, drm_crtc_queue_sequence_ioctl, DRM_UNLOCKED), DRM_IOCTL_DEF(DRM_IOCTL_MODE_CREATE_LEASE, drm_mode_create_lease_ioctl, DRM_MASTER|DRM_UNLOCKED), diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index 348079bb0965..f97fa00ca1d0 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -1061,3 +1061,46 @@ drm_syncobj_signal_ioctl(struct drm_device *dev, void *data, return ret; } + +int drm_syncobj_query_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_private) +{ + struct drm_syncobj_timeline_array *args = data; + struct drm_syncobj **syncobjs; + uint64_t __user *points = u64_to_user_ptr(args->points); + uint32_t i; + int ret; + + if (!drm_core_check_feature(dev, DRIVER_SYNCOBJ)) + return -ENODEV; + + if (args->pad != 0) + return -EINVAL; + + if (args->count_handles == 0) + return -EINVAL; + + ret = drm_syncobj_array_find(file_private, + u64_to_user_ptr(args->handles), + args->count_handles, + &syncobjs); + if (ret < 0) + return ret; + + for (i = 0; i < args->count_handles; i++) { + struct dma_fence_chain *chain; + struct dma_fence *fence; + uint64_t point; + + fence = drm_syncobj_fence_get(syncobjs[i]); + chain = to_dma_fence_chain(fence); + point = chain ? fence->seqno : 0; + ret = copy_to_user(&points[i], &point, sizeof(uint64_t)); + ret = ret ? -EFAULT : 0; + if (ret) + break; + } + drm_syncobj_array_free(syncobjs, args->count_handles); + + return ret; +} diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 0092111d002c..b2c36f2b2599 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -767,6 +767,14 @@ struct drm_syncobj_array { __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 */ @@ -924,6 +932,8 @@ extern "C" { #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) + /** * Device specific ioctls should only be in their respective headers * The device specific ioctl range is from 0x40 to 0x9f.