Received: by 10.213.65.68 with SMTP id h4csp115959imn; Fri, 6 Apr 2018 17:07:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+SalsVFvnCPSV99zOC/sTnIHKxq9u1cmEEi8mbbxjyk9UV5oHQQHb2Kk/bGaB9LK7b4Wgx X-Received: by 10.99.124.79 with SMTP id l15mr18942668pgn.19.1523059625631; Fri, 06 Apr 2018 17:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523059625; cv=none; d=google.com; s=arc-20160816; b=den6fyObpBWCHt6m+MdsATepGX3jhSS0Uixd6kEXMcBCn1u6QjVMutJaMEw7e5mwbH GGoKJkXOtcPHQRZzzP1wCpWeiBDkEsn1YnBYMdaprvZKqWy4fx+YclWRVdWHIZ1J3oUT gIEoeK1TEDj7e+3vKa8pi+iW5p1qJvQPHp2bXS0oz4N0N7gcrgLFy9sp++jfsEHXavcc rkBhvNcBmWBezKjWrF3wPkYz44XABhmMeYWUK+1nPI5/niz+IvCX7sg+v4xd4/slDk3y 2EI5Wkrlk0L7ragLkJ3Q99cHSV0TJeYWdSNMkbpCQBq8bgs6oSVL8GCNd162HJJvfBm1 zGog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=vqKg6FUhUQ6XtcjrpEydvTnxr4736TuEUsZ4pwBClSU=; b=cyyghM4NGuAvBMdF9BsSFPpUeZuSVKfVQ8L/zby3vQx0+X3B/mL66fzZMFD6BGDxXY lsnLWSM+M791wHJYETozBI8kvEPJahNFS8aaQb8AIr4DfDgqM45qF69Rm6EM++M8XxRn azV1v44+LWeA2vzJESDkxDqqXQATGPfKG/nDMe8p4xoWqLTffEuCKv3uaM1URGjNJruA heasrBvAcfwMZeQ+mgdyDW8PCAW7uWtXIqwfmmJTyyHUsRt+Bz4FCGaX2+0pwSkHHZ9v 9Nq2Ms5j2efsh8wvrl/rTmt3/WDsCwCTQfmZzsXVtvxO9QkObfd538lztK6h7gnkL01l H5fg== 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 16si8771927pfk.71.2018.04.06.17.06.28; Fri, 06 Apr 2018 17:07:05 -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 S1752147AbeDGACV (ORCPT + 99 others); Fri, 6 Apr 2018 20:02:21 -0400 Received: from home.keithp.com ([63.227.221.253]:56916 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751534AbeDGACU (ORCPT ); Fri, 6 Apr 2018 20:02:20 -0400 Received: from localhost (localhost [127.0.0.1]) by elaine.keithp.com (Postfix) with ESMTP id 8BA133F21107; Fri, 6 Apr 2018 16:56:56 -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 Qo_XAqbanKZK; Fri, 6 Apr 2018 16:56:55 -0700 (PDT) Received: from keithp.com (unknown [206.248.11.81]) by elaine.keithp.com (Postfix) with ESMTPSA id E65413F2020C; Fri, 6 Apr 2018 16:56:54 -0700 (PDT) Received: by keithp.com (Postfix, from userid 1000) id 6E20E1582879; Fri, 6 Apr 2018 16:56:52 -0700 (PDT) From: Keith Packard To: linux-kernel@vger.kernel.org, Dave Airlie , Daniel Vetter Cc: Keith Packard , dri-devel@lists.freedesktop.org Subject: [PATCH 0/1] drm: Add crtc_queue_syncobj and crtc_get_syncobj ioctls Date: Fri, 6 Apr 2018 16:56:48 -0700 Message-Id: <20180406235649.9494-1-keithp@keithp.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (This is an RFC on whether this pair of ioctls seems reasonable. The code compiles, but I haven't tested it as I'm away from home this weekend.) I'm rewriting my implementation of the Vulkan EXT_display_control extension, which provides a way to signal a Vulkan fence at vblank time. I had implemented it using events, but that isn't great as the Vulkan API includes the ability to wait for any of a set of fences to be signaled. As the other Vulkan fences are implemented using dma_fences in the kernel, and (eventually) using syncobj up in user space, it seems reasonable to use syncobjs for everything and hook vblank to those. In any case, I'm proposing two new syncobj/vblank ioctls (the names aren't great; suggestions welcome, as usual): DRM_IOCTL_CRTC_QUEUE_SYNCOBJ Create a new syncobj that will be signaled at (or after) the specified vblank sequence value. This uses the same parameters to specify the target sequence as DRM_IOCTL_CRTC_QUEUE_SEQUENCE. DRM_IOCTL_CRTC_GET_SYNCOBJ Once the above syncobj has been signaled, this ioctl allows the application to find out when that happened, returning both the vblank sequence count and time (in ns). I'd like to hear comments on whether this seems reasonable, or whether I should go in some other direction.