Received: by 10.213.65.68 with SMTP id h4csp1153456imn; Sat, 7 Apr 2018 19:34:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx487Ht+mt30Lj1iVrtEHmXqhWXS5uar13ZnFqS2CEmTI61t8d92QziXs4Ld9FIo/UmASA0Tw X-Received: by 2002:a17:902:a589:: with SMTP id az9-v6mr33068220plb.283.1523154876374; Sat, 07 Apr 2018 19:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523154876; cv=none; d=google.com; s=arc-20160816; b=c4ZW1SFZnZBePJgQWpZkpAuEvdZYxeTb9LzcdAMnqsqc8R9AyNSRltNlayBY5wUcn0 Jk4Jmv2JUOilrEF6xO8GS8PDk+THZGCFLzevN3i/mP+Nig8HfBdMvjch402HPycf8ph9 hxJFuTLrBT+g+DXY/TtdyKJzABS4EdfimRTX3iUepnyWe3gTiINoK65NwKWU5iZBbyi+ 1dexIbe+PkpQi2Pq72b9fsIiguF7Hoqyt2wX+Ogen/3uwsT3O79sjnhnkoTaaneUTbre PQ6V6kO4VP2j/TLiQtm3635VUDo4lPNLCLhfnzV/7zGZ6rfV1auSUps8hT4rTCmgACSG xrbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=EAA8Ztl21p1u+pO76qfV+WMjjxYkyt0H4sd2E/+cL/A=; b=d0/XSaLER82yKezDqkY17qPirCyV2YqQq+o+IhKYGmrywufZeF1+vrWZi33hHBmFYY vE4jpLWsFeokVjQPCQJjtZLWCgDQgQKq+Z9Wyabynl+vwMzlAh1Axy5m82RNeK8BsMzy CqXEBxnBKjAzETnHUWkCn/4iTfkw0n3bX2VBNwSjkuWF00HliOT2TlSsTT7aPV2BFO4M 6okOMEekABofXzN5t3Ykd7ZYl03uA+GDcYi2RTC2JXmjy8XTIWtVJn3xfjeMeiolIQaW uhER162d5uLR5pFIh/n202dy4i2GiKNqej0uDCDvclYg0zjbicbS/+sbVgYaYWKp5Zzg Lf9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x190si9344373pgd.52.2018.04.07.19.33.57; Sat, 07 Apr 2018 19:34:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752498AbeDHCbL (ORCPT + 99 others); Sat, 7 Apr 2018 22:31:11 -0400 Received: from home.keithp.com ([63.227.221.253]:47796 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752278AbeDHCbK (ORCPT ); Sat, 7 Apr 2018 22:31:10 -0400 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id C956E3F208D4; Sat, 7 Apr 2018 19:31:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at keithp.com Received: from elaine.keithp.com ([127.0.0.1]) by localhost (elaine.keithp.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BhSFKA-Ytamg; Sat, 7 Apr 2018 19:31:08 -0700 (PDT) Received: from keithp.com (unknown [206.248.11.81]) by elaine.keithp.com (Postfix) with ESMTPSA id 5464D3F205E6; Sat, 7 Apr 2018 19:31:08 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id E33151582879; Sat, 7 Apr 2018 19:31:05 -0700 (PDT) From: "Keith Packard" To: Jason Ekstrand Cc: LKML , Dave Airlie , Daniel Vetter , Maling list - DRI developers Subject: Re: [PATCH] drm: Add crtc_queue_syncobj and crtc_get_syncobj ioctls In-Reply-To: References: <20180406235649.9494-1-keithp@keithp.com> <20180406235649.9494-2-keithp@keithp.com> <87muyfpw3y.fsf@keithp.com> Date: Sat, 07 Apr 2018 19:31:05 -0700 Message-ID: <87k1tipgye.fsf@keithp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Jason Ekstrand writes: > Yeah, I suppose an application could ask for 10k frames in the future or > something ridiculous like that. For sync_file, people strongly want a > finite time guarantee for security/deadlock reasons. I don't know how > happy they would be with a finite time of 10 minutes... Sure, we've put arbitrary finite limits on vblank counters in other places, so adding some kind of arbitrary limit like a couple of seconds would be entirely reasonable here. The Vulkan API doesn't need any of this complexity at all; the one I'm doing only lets you create a fence for the next vblank. > Ok, that's not expected... Part of the point of sync objects is that > they're re-usable. The client is free to not re-use them or to be very > careful about the recycling process. Heh. I thought the opposite -- lightweight objects that you'd use once and delete. I can certainly change the API to pass in an existing syncobj rather than creating a new one. That would be easier in some ways as it reduces the failure paths a bit. > Is the event the important part or the moderately accurate timestamp? I need the timestamp and sequence number, getting them in an event would mean not having to make another syscall. > We could probably modify drm_syncobj to have a "last signaled" > timestamp that's queryable through an IOCTL. That's exactly what I did, but it only works for these new syncobjs. The fields are global and could be filled in by other bits of the code. > Is the sequence number returned necessary? Will it ever be different from > the one requested? Yes, when the application queues it just slightly too late. The application doesn't actually need either of these values directly, but the system needs them to respond to requests to queue presentation at a specific time, so the vulkan driver wants 'recent' vblank time/sequence data to estimate when a vblank will occur. =2D-=20 =2Dkeith --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEw4O3eCVWE9/bQJ2R2yIaaQAAABEFAlrJfukACgkQ2yIaaQAA ABHnRQ/9G44GtfqSHadKeZSHfUcx5/k/jS3LGmKn6hqBVfdGnO3qmQq8G4yRX3AK S7khQ5z5lkHVloBEKJRA35W9KJVV/Fpae75QZ8o5koGowMW4C/Ue3MSK8Bl1v2L2 3Fqwua1purDj5GC8fasz5hTUVLB/gV7HVG1DXXb9vugbVjPJkrWhytmSJ0kJ40zv ahqzwxCsOTLk186lX4Vqnv2kajkpOoEza0XUGG8DEwXYJF6xAojhmfwUPasFOqzc Q32JO0DWQBi51TN/qovwTwVT6uEwwFCUy7bv1oQva9KUZLb5Uwm5TtCMw+9zf54S MRuVMVXUnUS1sQtjMnLevDt9Y4Myz/WY+ita9SPJW0A9bC8DXIWYLWjU8bN/+v6S svHk4I8aQ0KwCnth21IFPaoc712q72l4OWXVNbI1XVK6yAUj/mRhJbuYkHoyXbqH rM6mAXmgrRVtnHGlbk2ul4Q8SIXJPBd6MO3g61C5/LiDO3c9/WAJShxDfXkCkTFV pPPBWB1CMZdvcqIanqWMr/drGKt1wM5F0hZvCzE8oN4lIInXS4FLVfIeLeyx1wxH PC8v22/qgkhQLCZQ4RRBsHKVxQWrjFRWp+uH6e31Ejis4F6fBgQlMf5ProI3qBVA 4gJLqQ8+gFvfR75KtXbHKeFQEtDC8jKHeH5SS93QEKzWg7Mi1ls= =nkn4 -----END PGP SIGNATURE----- --=-=-=--