Re: [PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-05-06 Thread Maxime Ripard
Hi Hans On Thu, May 02, 2019 at 10:24:00AM +0200, Hans Verkuil wrote: > On 4/17/19 9:54 AM, Maxime Ripard wrote: > > V4L2 uses different fourcc's than DRM, and has a different set of formats. > > For now, let's add the v4l2 fourcc's for the already existing formats. > > For this lib to be more use

Re: [PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-05-02 Thread Hans Verkuil
Hi Maxime, On 4/17/19 9:54 AM, Maxime Ripard wrote: > V4L2 uses different fourcc's than DRM, and has a different set of formats. > For now, let's add the v4l2 fourcc's for the already existing formats. For this lib to be more useful for V4L2, would it be a good idea to add Bayer formats as well?

[PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-17 Thread Maxime Ripard
V4L2 uses different fourcc's than DRM, and has a different set of formats. For now, let's add the v4l2 fourcc's for the already existing formats. Signed-off-by: Maxime Ripard --- include/linux/image-formats.h | 9 +- lib/image-formats.c | 62 -

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-11 Thread Maxime Ripard
Hi, On Thu, Apr 11, 2019 at 09:38:06AM +0200, Hans Verkuil wrote: > >> @@ -149,6 +155,7 @@ static const struct image_format_info formats[] = { > >>.has_alpha = true, > >>}, { > >>.drm_fmt = DRM_FORMAT_RGB565, > >> + .v4l2_fmt = V4L2_PIX_FMT_RGB565, > > > > -> V

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-11 Thread Hans Verkuil
On 3/22/19 8:55 PM, Nicolas Dufresne wrote: > Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : >> V4L2 uses different fourcc's than DRM, and has a different set of formats. >> For now, let's add the v4l2 fourcc's for the already existing formats. > > Hopefully I get the fixup right thi

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-11 Thread Hans Verkuil
On 4/1/19 4:44 PM, Maxime Ripard wrote: > Hi Nicolas, > > On Fri, Mar 22, 2019 at 03:55:19PM -0400, Nicolas Dufresne wrote: >> Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : >>> V4L2 uses different fourcc's than DRM, and has a different set of formats. >>> For now, let's add the v4l2

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-11 Thread Hans Verkuil
On 4/11/19 9:12 AM, Hans Verkuil wrote: > Hi Maxime, > > Some comments below... > > On 3/19/19 10:57 PM, Maxime Ripard wrote: >> V4L2 uses different fourcc's than DRM, and has a different set of formats. >> For now, let's add the v4l2 fourcc's for the already existing formats. >> >> Signed-off-by

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-11 Thread Hans Verkuil
Hi Maxime, Some comments below... On 3/19/19 10:57 PM, Maxime Ripard wrote: > V4L2 uses different fourcc's than DRM, and has a different set of formats. > For now, let's add the v4l2 fourcc's for the already existing formats. > > Signed-off-by: Maxime Ripard > --- > include/linux/image-formats

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-04-01 Thread Maxime Ripard
Hi Nicolas, On Fri, Mar 22, 2019 at 03:55:19PM -0400, Nicolas Dufresne wrote: > Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > > V4L2 uses different fourcc's than DRM, and has a different set of formats. > > For now, let's add the v4l2 fourcc's for the already existing formats. > >

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-24 Thread Nicolas Dufresne
Le vendredi 22 mars 2019 à 20:44 +0200, Ville Syrjälä a écrit : > On Fri, Mar 22, 2019 at 02:24:29PM -0400, Nicolas Dufresne wrote: > > Le jeudi 21 mars 2019 à 23:44 +0200, Ville Syrjälä a écrit : > > > On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > > > > Le jeudi 21 mars 2019

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-24 Thread Nicolas Dufresne
Le jeudi 21 mars 2019 à 23:44 +0200, Ville Syrjälä a écrit : > On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > > Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > > > I'm not sure what it's worth, but there is a "pixel format guide" > > > > project that is all abo

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-24 Thread Nicolas Dufresne
Le vendredi 22 mars 2019 à 16:42 +0200, Ville Syrjälä a écrit : > On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > > Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > > > I'm not sure what it's worth, but there is a "pixel format guide" > > > > project that is all

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-24 Thread Nicolas Dufresne
Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > V4L2 uses different fourcc's than DRM, and has a different set of formats. > For now, let's add the v4l2 fourcc's for the already existing formats. Hopefully I get the fixup right this time, see inline. > > Signed-off-by: Maxime Ripa

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-24 Thread Nicolas Dufresne
Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > I'm not sure what it's worth, but there is a "pixel format guide" > > project that is all about matching formats from one API to another: > > https://afrantzis.com/pixel-format-guide/ (and it has an associated > > tool too). > > > >

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-22 Thread Ville Syrjälä
On Fri, Mar 22, 2019 at 02:24:29PM -0400, Nicolas Dufresne wrote: > Le jeudi 21 mars 2019 à 23:44 +0200, Ville Syrjälä a écrit : > > On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > > > Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > > > > I'm not sure what it's

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-22 Thread Ville Syrjälä
On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > > I'm not sure what it's worth, but there is a "pixel format guide" > > > project that is all about matching formats from one API to another: > > > https://afrantzis

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Ville Syrjälä
On Thu, Mar 21, 2019 at 03:14:06PM -0400, Nicolas Dufresne wrote: > Le jeudi 21 mars 2019 à 18:35 +0200, Ville Syrjälä a écrit : > > > I'm not sure what it's worth, but there is a "pixel format guide" > > > project that is all about matching formats from one API to another: > > > https://afrantzis

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Ville Syrjälä
On Thu, Mar 21, 2019 at 05:04:19PM +0100, Paul Kocialkowski wrote: > Hi, > > Le mercredi 20 mars 2019 à 20:39 +0200, Ville Syrjälä a écrit : > > On Wed, Mar 20, 2019 at 02:27:59PM -0400, Nicolas Dufresne wrote: > > > Le mercredi 20 mars 2019 à 18:41 +0200, Ville Syrjälä a écrit : > > > > On Wed, M

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Paul Kocialkowski
Hi, Le mercredi 20 mars 2019 à 20:39 +0200, Ville Syrjälä a écrit : > On Wed, Mar 20, 2019 at 02:27:59PM -0400, Nicolas Dufresne wrote: > > Le mercredi 20 mars 2019 à 18:41 +0200, Ville Syrjälä a écrit : > > > On Wed, Mar 20, 2019 at 12:30:25PM -0400, Nicolas Dufresne wrote: > > > > Le mercredi 20

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Maxime Ripard
On Wed, Mar 20, 2019 at 06:15:54PM +, Brian Starkey wrote: > On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > > All RGB mapping should be surrounded by ifdef, because many (not all) > > DRM formats represent the order of component when placed in a CPU > > register, unlike V4L

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Nicolas Dufresne
Le mercredi 20 mars 2019 à 16:27 +0200, Ville Syrjälä a écrit : > On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > > Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > > > V4L2 uses different fourcc's than DRM, and has a different set of formats. > > > For now, let's

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-21 Thread Nicolas Dufresne
Le mercredi 20 mars 2019 à 18:09 +0200, Ville Syrjälä a écrit : > On Wed, Mar 20, 2019 at 11:51:58AM -0400, Nicolas Dufresne wrote: > > Le mercredi 20 mars 2019 à 16:27 +0200, Ville Syrjälä a écrit : > > > On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > > > > Le mardi 19 mars 20

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-20 Thread Ville Syrjälä
On Wed, Mar 20, 2019 at 12:30:25PM -0400, Nicolas Dufresne wrote: > Le mercredi 20 mars 2019 à 18:09 +0200, Ville Syrjälä a écrit : > > On Wed, Mar 20, 2019 at 11:51:58AM -0400, Nicolas Dufresne wrote: > > > Le mercredi 20 mars 2019 à 16:27 +0200, Ville Syrjälä a écrit : > > > > On Tue, Mar 19, 201

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-20 Thread Ville Syrjälä
On Wed, Mar 20, 2019 at 11:51:58AM -0400, Nicolas Dufresne wrote: > Le mercredi 20 mars 2019 à 16:27 +0200, Ville Syrjälä a écrit : > > On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > > > Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > > > > V4L2 uses different fo

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-20 Thread Ville Syrjälä
On Tue, Mar 19, 2019 at 07:29:18PM -0400, Nicolas Dufresne wrote: > Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > > V4L2 uses different fourcc's than DRM, and has a different set of formats. > > For now, let's add the v4l2 fourcc's for the already existing formats. > > > > Signed-

Re: [RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-20 Thread Nicolas Dufresne
Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit : > V4L2 uses different fourcc's than DRM, and has a different set of formats. > For now, let's add the v4l2 fourcc's for the already existing formats. > > Signed-off-by: Maxime Ripard > --- > include/linux/image-formats.h | 9 +- >

[RFC PATCH 18/20] lib: image-formats: Add v4l2 formats support

2019-03-19 Thread Maxime Ripard
V4L2 uses different fourcc's than DRM, and has a different set of formats. For now, let's add the v4l2 fourcc's for the already existing formats. Signed-off-by: Maxime Ripard --- include/linux/image-formats.h | 9 +- lib/image-formats.c | 67 -