Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752500AbdGEWR3 (ORCPT ); Wed, 5 Jul 2017 18:17:29 -0400 Received: from home.keithp.com ([63.227.221.253]:49039 "EHLO elaine.keithp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752086AbdGEWR1 (ORCPT ); Wed, 5 Jul 2017 18:17:27 -0400 From: Keith Packard To: linux-kernel@vger.kernel.org, Dave Airlie , Daniel Vetter Cc: Keith Packard , dri-devel@lists.freedesktop.org Subject: [PATCH 0/3] drm: Add CRTC-id based ioctls for vblank query/event Date: Wed, 5 Jul 2017 15:10:10 -0700 Message-Id: <20170705221013.27940-1-keithp@keithp.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1636 Lines: 40 This patch series provides a new interface which fixes three issues with the current VBLANK_WAIT ioctl: 1) CRTC indices to select a target. 2) 32-bits of count resolution. 3) Microsecond time resolution. The first makes it quite difficult to use this interface from a leased DRM device; without the ability to see all of the crtcs for a DRM device, it's not possible to compute the right index into the array of them for this interface. 2) and 3) prevent the API from matching the requirements for Vulkan, which asks for 64-bits of counter and nano-second time resolution. I've split this series into three pieces, the first two adjust the internal APIs without exposing new functionality, the third adds the new IOCTLs. [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time This changes all DRM-level internal interfaces to 64-bit vblank counters and nano-second time resolution. Changing the driver interface to 64-bits seems like the right plan, but as no drivers currently support anything wider than 32-bits, it may be that we don't want to bother at this point. [PATCH 2/3] drm: Reorganize drm_pending_event to support future event This sticks the vblank event in a union inside of the pending event structure so that I can add another parallel event in the next patch. Importantly, this required that I move the assignment of the event crtc_id field from event deliver to event allocation. That "shouldn't" matter, but it should also be looked at with some care. [PATCH 3/3] drm: Add CRTC_GET_SEQUENCE and CRTC_QUEUE_SEQUENCE ioctls With the internal APIs ready, this patch is pretty simple. -keith