Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Andrey Utkin
On Fri, 11 Mar 2016 10:59:02 +0100 Hans Verkuil wrote: > While userspace may specify FIELD_ANY when setting a format, the > driver should always map that to a specific field setting and should > never return FIELD_ANY back to userspace. > > In this case, the 'field' field of

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Andrey Utkin
On Fri, 11 Mar 2016 10:59:02 +0100 Hans Verkuil wrote: > While userspace may specify FIELD_ANY when setting a format, the > driver should always map that to a specific field setting and should > never return FIELD_ANY back to userspace. > > In this case, the 'field' field of the v4l2_buffer

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Hans Verkuil
On 03/11/2016 09:40 AM, Andrey Utkin wrote: > On Fri, 11 Mar 2016 09:00:18 +0100 > Hans Verkuil wrote: >> The reason is likely to be the tw5864_queue_setup function which has >> not been updated to handle CREATE_BUFS support correctly. It should >> look like this: >> >> static

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Hans Verkuil
On 03/11/2016 09:40 AM, Andrey Utkin wrote: > On Fri, 11 Mar 2016 09:00:18 +0100 > Hans Verkuil wrote: >> The reason is likely to be the tw5864_queue_setup function which has >> not been updated to handle CREATE_BUFS support correctly. It should >> look like this: >> >> static int

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Andrey Utkin
On Fri, 11 Mar 2016 09:00:18 +0100 Hans Verkuil wrote: > The reason is likely to be the tw5864_queue_setup function which has > not been updated to handle CREATE_BUFS support correctly. It should > look like this: > > static int tw5864_queue_setup(struct vb2_queue *q, >

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Andrey Utkin
On Fri, 11 Mar 2016 09:00:18 +0100 Hans Verkuil wrote: > The reason is likely to be the tw5864_queue_setup function which has > not been updated to handle CREATE_BUFS support correctly. It should > look like this: > > static int tw5864_queue_setup(struct vb2_queue *q, >

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Hans Verkuil
On 03/09/2016 03:29 PM, Andrey Utkin wrote: > Hi Hans! > > Some improvements took place on the driver, including cleaner > v4l2-compliance tests passing. But there's a single test failure I > don't understand. > > In the code of v4l2-compliance, it seems like an API > call CREATE_BUFS is

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-11 Thread Hans Verkuil
On 03/09/2016 03:29 PM, Andrey Utkin wrote: > Hi Hans! > > Some improvements took place on the driver, including cleaner > v4l2-compliance tests passing. But there's a single test failure I > don't understand. > > In the code of v4l2-compliance, it seems like an API > call CREATE_BUFS is

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-09 Thread Andrey Utkin
Hi Hans! Some improvements took place on the driver, including cleaner v4l2-compliance tests passing. But there's a single test failure I don't understand. In the code of v4l2-compliance, it seems like an API call CREATE_BUFS is supposed to fail with EINVAL. But in case of my driver, which

Re: [RFC PATCH v0] Add tw5864 driver

2016-03-09 Thread Andrey Utkin
Hi Hans! Some improvements took place on the driver, including cleaner v4l2-compliance tests passing. But there's a single test failure I don't understand. In the code of v4l2-compliance, it seems like an API call CREATE_BUFS is supposed to fail with EINVAL. But in case of my driver, which

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Hans Verkuil
On 02/08/2016 11:23 AM, Andrey Utkin wrote: > On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil wrote: >> Hi Andrey, >> >> Hmm, it looks like I forgot to reply. Sorry about that. > > Thank you very much anyway. > >> I wouldn't change the memcpy: in my experience it is very useful to get a >>

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Andrey Utkin
On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil wrote: > Hi Andrey, > > Hmm, it looks like I forgot to reply. Sorry about that. Thank you very much anyway. > I wouldn't change the memcpy: in my experience it is very useful to get a > well-formed compressed stream out of the hardware. And the

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Hans Verkuil
Hi Andrey, Hmm, it looks like I forgot to reply. Sorry about that. On 01/15/2016 03:13 AM, Andrey Utkin wrote: > On Mon, Jan 11, 2016 at 12:52 PM, Hans Verkuil wrote: >> Did you also test with v4l2-compliance? Before I accept the driver I want to >> see the >> output of 'v4l2-compliance' and

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Andrey Utkin
On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil wrote: > Hi Andrey, > > Hmm, it looks like I forgot to reply. Sorry about that. Thank you very much anyway. > I wouldn't change the memcpy: in my experience it is very useful to get a > well-formed compressed stream out of the

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Hans Verkuil
Hi Andrey, Hmm, it looks like I forgot to reply. Sorry about that. On 01/15/2016 03:13 AM, Andrey Utkin wrote: > On Mon, Jan 11, 2016 at 12:52 PM, Hans Verkuil wrote: >> Did you also test with v4l2-compliance? Before I accept the driver I want to >> see the >> output of

Re: [RFC PATCH v0] Add tw5864 driver

2016-02-08 Thread Hans Verkuil
On 02/08/2016 11:23 AM, Andrey Utkin wrote: > On Mon, Feb 8, 2016 at 11:58 AM, Hans Verkuil wrote: >> Hi Andrey, >> >> Hmm, it looks like I forgot to reply. Sorry about that. > > Thank you very much anyway. > >> I wouldn't change the memcpy: in my experience it is very

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-03 Thread Andrey Utkin
On Sun, Jan 3, 2016 at 5:47 AM, Joe Perches wrote: > several of these have unnecessary parentheses Thanks, fixed. > Maybe use bool a bit more Thanks, fixed. > or maybe just use fls Thanks, fls() fit greatly, rewritten the function with compatibility testing. >> +static inline int

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-03 Thread Andrey Utkin
On Sun, Jan 3, 2016 at 5:47 AM, Joe Perches wrote: > several of these have unnecessary parentheses Thanks, fixed. > Maybe use bool a bit more Thanks, fixed. > or maybe just use fls Thanks, fls() fit greatly, rewritten the function with compatibility testing. >> +static

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-02 Thread Leon Romanovsky
On Sun, Jan 03, 2016 at 03:41:42AM +0200, Andrey Utkin wrote: > +/* > + * TW5864 driver - Exp-Golomb code functions > + * > + * Copyright (C) 2015 Bluecherry, LLC > + * Copyright (C) 2015 Andrey Utkin I doubt that you have contract with your employer which permits you to claim copyright

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-02 Thread Joe Perches
On Sun, 2016-01-03 at 03:41 +0200, Andrey Utkin wrote: > (Disclaimer up to scissors mark) > > Please be so kind to take a look at a new driver. trivial comments only: > diff --git a/drivers/staging/media/tw5864/tw5864-bs.h > b/drivers/staging/media/tw5864/tw5864-bs.h [] > +static inline int

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-02 Thread Joe Perches
On Sun, 2016-01-03 at 03:41 +0200, Andrey Utkin wrote: > (Disclaimer up to scissors mark) > > Please be so kind to take a look at a new driver. trivial comments only: > diff --git a/drivers/staging/media/tw5864/tw5864-bs.h > b/drivers/staging/media/tw5864/tw5864-bs.h [] > +static inline int

Re: [RFC PATCH v0] Add tw5864 driver

2016-01-02 Thread Leon Romanovsky
On Sun, Jan 03, 2016 at 03:41:42AM +0200, Andrey Utkin wrote: > +/* > + * TW5864 driver - Exp-Golomb code functions > + * > + * Copyright (C) 2015 Bluecherry, LLC > + * Copyright (C) 2015 Andrey Utkin I doubt that you have