From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752957AbbIRJnv (ORCPT ); Fri, 18 Sep 2015 05:43:51 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:60721 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752229AbbIRJns (ORCPT ); Fri, 18 Sep 2015 05:43:48 -0400 From: Arnd Bergmann To: Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, y2038@lists.linaro.org, Mauro Carvalho Chehab , linux-api@vger.kernel.org, linux-samsung-soc@vger.kernel.org Subject: Re: [PATCH v2 7/9] [media] v4l2: introduce v4l2_timeval Date: Fri, 18 Sep 2015 11:43:24 +0200 Message-ID: <9019880.VVdOR6WRt1@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <55FBD90C.3020301@xs4all.nl> References: <1442524780-781677-1-git-send-email-arnd@arndb.de> <8200227.6XAMdOOJfW@wuerfel> <55FBD90C.3020301@xs4all.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:o/8T588QBISIm+vqta2P0wqSMwKGSektPfQGIvUzjWWfpBrLd9v n/T1n2MkV9w8xkilvPkxZa88U4UozlfW+2gehLfYKsBLEYpBwSydg7lmrwB7xw6CvQOED/l uL/VF7hhSBTKaNmaE1k6jsHKIZo1zHdDPDB16S3pkiGGXw7W+Q9UW6yCq3Q9MyzHPWkf3Ya 0zpvI/1IZx/kFNbU6AKwg== X-UI-Out-Filterresults: notjunk:1;V01:K0:+Lun+9Kx8fA=:KxQByD+IfMlyN+GXxUKmyM xxPhIV0JFc1gqJSKobAWTEXvQ4lMefxIPYH16sp5rjoxacIHmUuqOpL/aNtd3GMKS2dQYbRTh 3IIyE0Bp6CJ27penf3lvto7xolJWMKh3VvlxG2vN96KvVS6HcZF8bpVZZej+t8Lr8anNpIjJQ KTvjHjUYAv+UcnqR2VKAo17heDrALj1ShkECFXlHT3aQkn7YYMAP5jHxpx52aHK+S5JIutjxP 7yMqSZlhIcu0pUCWszDxMiMDMbMMZ6ph7gOuQoEIdBP7bBNktkDMkRPXRJNYBRkDdDeFuc11s hyYBDwQ68oGU/eyQ0xE8BlMRB9dr5LIVqZPVGPSsVcLO89KoF+CuJQF5RLOQAG8zx8BSG5lB/ izW1o3Wd4zipE3znDQr5lutpr+QIF/U3VgtDxe12myb9kNs4Bi5a5+dHSqT33456IflxcDNNt Ex2l7P7sL0kd915gvHgCeK9yVFObPdqOgrf5qEF6Fcw/OXSnKjvrtLcmFb6wBsH8hiKUqLNb3 YVF4g/FjDgdla+83wdPt0egdB4gQ4Gs/zjAdT/Rb/x0nxSrS8Ev5jTULFchvs6J11OTlsVCcM EZypdBqBIDBH9+dS31sO4QYLvEQ+kn3NQbipO2v9fV31YfUpcRpr3VT/jT/LV9ahc3z75YpCR VHpRRkkO9Hf4qvLSIwHdjYiQW1ksozT5asPiI6ui5Vm0ggfCKTDNp6TaFKE/eQwkbP3V//GL6 WwDesZk3qHxYsl1rNj6oWSFfRNILGxPu26xcPA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 18 September 2015 11:27:40 Hans Verkuil wrote: > Ah, OK. Got it. > > I think this is dependent on the upcoming media workshop next month. If we > decide to redesign v4l2_buffer anyway, then we can avoid timeval completely. > And the only place where we would need to convert it in the compat code > hidden in the v4l2 core (likely v4l2-ioctl.c). Ah, I think I understood the idea now, I missed that earlier when you mention the idea. So what you are saying here is that you could come up with a new unambiguous (using only __u32 and __u64 types and no pointers) format that gets exposed to a new set of ioctls, and then change the handling of the existing three formats (native 64-bit, traditional 32-bit, and 32-bit with 64-bit time_t) so they get converted into the new format by the common ioctl handling code? > I am not really keen on having v4l2_timeval in all these drivers. I would > have to check them anyway since I suspect that in several drivers the local > timeval variable can be avoided by rewriting that part of the driver. I've tried to do that for all the drivers where I could find an easy solution in patch 6/9, but I'm sure you can do it for a couple more. We could also do a lightweight redesign and use 'timespec64' internally in all the drivers and then convert that to 'timeval' or the 64-bit format of that in the ioctl handler. This is also something I tried at some point but then found it a bit more intuitive to leave the normal ioctl path alone and have an explicit type. > Personally I am in favor of a redesigned v4l2_buffer: it's awkward to use > with multiplanar formats, there is cruft in there that can be removed (timecode), > and there is little space for additions (HW-specific timecodes, more buffer > meta data, etc). > > We'll see. Ok. Arnd