Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752825AbdHBJle (ORCPT ); Wed, 2 Aug 2017 05:41:34 -0400 Received: from mail.netline.ch ([148.251.143.178]:53981 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752087AbdHBJld (ORCPT ); Wed, 2 Aug 2017 05:41:33 -0400 Subject: Re: [PATCH 1/3] drm: Widen vblank UAPI to 64 bits. Change vblank time to ktime_t [v2] To: Keith Packard , Dave Airlie References: <20170705221013.27940-1-keithp@keithp.com> <20170801050306.24423-1-keithp@keithp.com> <20170801050306.24423-2-keithp@keithp.com> <20170802085358.cipsolpgxlb2e323@phenom.ffwll.local> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Message-ID: <75407a09-e365-93c4-50d9-a0efa48447cf@daenzer.net> Date: Wed, 2 Aug 2017 18:41:25 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170802085358.cipsolpgxlb2e323@phenom.ffwll.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1966 Lines: 46 On 02/08/17 05:53 PM, Daniel Vetter wrote: > On Mon, Jul 31, 2017 at 10:03:04PM -0700, Keith Packard wrote: >> This modifies the datatypes used by the vblank code to provide both 64 >> bits of vblank count and switch to using ktime_t for timestamps to >> increase resolution from microseconds to nanoseconds. >> >> The driver interfaces have been left using 32 bits of vblank count; >> all of the code necessary to widen that value for the user API was >> already included to handle devices returning fewer than 32-bits. >> >> This will provide the necessary datatypes for the Vulkan API. >> >> v2: >> >> * Re-write wait_vblank ioctl to ABSOLUTE sequence >> >> When an application uses the WAIT_VBLANK ioctl with RELATIVE >> or NEXTONMISS bits set, the target vblank interval is updated >> within the kernel. We need to write that target back to the >> ioctl buffer and update the flags bits so that if the wait is >> interrupted by a signal, when it is re-started, it will target >> precisely the same vblank count as before. >> >> * Leave driver API with 32-bit vblank count >> >> Suggested-by: Michel Dänzer >> Suggested-by: Daniel Vetter >> Signed-off-by: Keith Packard > > Subject is a bit confusing since you say uapi, but this is just the > internal prep work. Dropping UAPI fixes that. With that fixed: > > Reviewed-by: Daniel Vetter > > Two more optional comments below, feel free to adapt or ignore. I'll wait > for Michel's r-b before merging either way. I don't think changing max_vblank_count to u64 is necessary/useful; other than that, AFAICT the issues I raised before for this patch have been addressed. I'm afraid I don't know if/when I'll get a chance to review the whole patch in detail though. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer