From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, magnus.damm@gmail.com Subject: Re: [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration API Date: Fri, 26 Aug 2011 17:07:01 +0000 [thread overview] Message-ID: <4E57D2B5.7020604@gmx.de> (raw) In-Reply-To: <1313746626-23845-2-git-send-email-laurent.pinchart@ideasonboard.com> Hi Laurent, hope we're close to the final thing now. Just a few minor issues. On 08/19/2011 09:37 AM, Laurent Pinchart wrote: > This API will be used to support YUV frame buffer formats in a standard > way. > > Last but not least, create a much needed fbdev API documentation and > document the format setting APIs. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > Documentation/fb/api.txt | 299 ++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/fb.h | 27 ++++- > 2 files changed, 320 insertions(+), 6 deletions(-) > create mode 100644 Documentation/fb/api.txt > > diff --git a/include/linux/fb.h b/include/linux/fb.h > index 1d6836c..c6baf28 100644 > --- a/include/linux/fb.h > +++ b/include/linux/fb.h > @@ -69,6 +69,7 @@ > #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ > #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ > #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ > +#define FB_VISUAL_FOURCC 6 /* Visual identified by a V4L2 FOURCC */ > > #define FB_ACCEL_NONE 0 /* no hardware accelerator */ > #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ > @@ -154,6 +155,8 @@ > > #define FB_ACCEL_PUV3_UNIGFX 0xa0 /* PKUnity-v3 Unigfx */ > > +#define FB_CAP_FOURCC 1 /* Device supports FOURCC-based formats */ > + > struct fb_fix_screeninfo { > char id[16]; /* identification string eg "TT Builtin" */ > unsigned long smem_start; /* Start of frame buffer mem */ > @@ -171,7 +174,8 @@ struct fb_fix_screeninfo { > __u32 mmio_len; /* Length of Memory Mapped I/O */ > __u32 accel; /* Indicate to driver which */ > /* specific chip/card we have */ > - __u16 reserved[3]; /* Reserved for future compatibility */ > + __u16 capabilities; /* see FB_CAP_* */ > + __u16 reserved[2]; /* Reserved for future compatibility */ > }; > > /* Interpretation of offset for color fields: All offsets are from the right, > @@ -246,12 +250,23 @@ struct fb_var_screeninfo { > __u32 yoffset; /* resolution */ > > __u32 bits_per_pixel; /* guess what */ > - __u32 grayscale; /* != 0 Graylevels instead of colors */ > > - struct fb_bitfield red; /* bitfield in fb mem if true color, */ > - struct fb_bitfield green; /* else only length is significant */ > - struct fb_bitfield blue; > - struct fb_bitfield transp; /* transparency */ > + union { > + struct { /* Legacy format API */ > + __u32 grayscale; /* != 0 Graylevels instead of colors */ You should adjust the comment as well, to avoid misleading crazy people ;) Needs also be fixed in the documentation at some places. > + /* bitfields in fb mem if true color, else only */ > + /* length is significant */ > + struct fb_bitfield red; > + struct fb_bitfield green; > + struct fb_bitfield blue; > + struct fb_bitfield transp; /* transparency */ > + }; > + struct { /* FOURCC-based format API */ > + __u32 fourcc; /* FOURCC format */ > + __u32 colorspace; So we have again fields that are not always used. Okay, as we still have 11 left that shouldn't be a big problem, I think. > + __u32 reserved[11]; > + } format; Ugh, if you want this union to have a name I suggest 'fourcc' and not 'format' as the other struct contains format information as well and who knows, maybe in 10 or 20 years we'll have yet another format description that can do things none of the existing can do. > + }; > > __u32 nonstd; /* != 0 Non standard pixel format */ > Thanks, Florian Tobias Schandinat
WARNING: multiple messages have this Message-ID (diff)
From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: linux-fbdev@vger.kernel.org, linux-media@vger.kernel.org, magnus.damm@gmail.com Subject: Re: [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration Date: Fri, 26 Aug 2011 17:07:01 +0000 [thread overview] Message-ID: <4E57D2B5.7020604@gmx.de> (raw) In-Reply-To: <1313746626-23845-2-git-send-email-laurent.pinchart@ideasonboard.com> Hi Laurent, hope we're close to the final thing now. Just a few minor issues. On 08/19/2011 09:37 AM, Laurent Pinchart wrote: > This API will be used to support YUV frame buffer formats in a standard > way. > > Last but not least, create a much needed fbdev API documentation and > document the format setting APIs. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > Documentation/fb/api.txt | 299 ++++++++++++++++++++++++++++++++++++++++++++++ > include/linux/fb.h | 27 ++++- > 2 files changed, 320 insertions(+), 6 deletions(-) > create mode 100644 Documentation/fb/api.txt > > diff --git a/include/linux/fb.h b/include/linux/fb.h > index 1d6836c..c6baf28 100644 > --- a/include/linux/fb.h > +++ b/include/linux/fb.h > @@ -69,6 +69,7 @@ > #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ > #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ > #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ > +#define FB_VISUAL_FOURCC 6 /* Visual identified by a V4L2 FOURCC */ > > #define FB_ACCEL_NONE 0 /* no hardware accelerator */ > #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ > @@ -154,6 +155,8 @@ > > #define FB_ACCEL_PUV3_UNIGFX 0xa0 /* PKUnity-v3 Unigfx */ > > +#define FB_CAP_FOURCC 1 /* Device supports FOURCC-based formats */ > + > struct fb_fix_screeninfo { > char id[16]; /* identification string eg "TT Builtin" */ > unsigned long smem_start; /* Start of frame buffer mem */ > @@ -171,7 +174,8 @@ struct fb_fix_screeninfo { > __u32 mmio_len; /* Length of Memory Mapped I/O */ > __u32 accel; /* Indicate to driver which */ > /* specific chip/card we have */ > - __u16 reserved[3]; /* Reserved for future compatibility */ > + __u16 capabilities; /* see FB_CAP_* */ > + __u16 reserved[2]; /* Reserved for future compatibility */ > }; > > /* Interpretation of offset for color fields: All offsets are from the right, > @@ -246,12 +250,23 @@ struct fb_var_screeninfo { > __u32 yoffset; /* resolution */ > > __u32 bits_per_pixel; /* guess what */ > - __u32 grayscale; /* != 0 Graylevels instead of colors */ > > - struct fb_bitfield red; /* bitfield in fb mem if true color, */ > - struct fb_bitfield green; /* else only length is significant */ > - struct fb_bitfield blue; > - struct fb_bitfield transp; /* transparency */ > + union { > + struct { /* Legacy format API */ > + __u32 grayscale; /* != 0 Graylevels instead of colors */ You should adjust the comment as well, to avoid misleading crazy people ;) Needs also be fixed in the documentation at some places. > + /* bitfields in fb mem if true color, else only */ > + /* length is significant */ > + struct fb_bitfield red; > + struct fb_bitfield green; > + struct fb_bitfield blue; > + struct fb_bitfield transp; /* transparency */ > + }; > + struct { /* FOURCC-based format API */ > + __u32 fourcc; /* FOURCC format */ > + __u32 colorspace; So we have again fields that are not always used. Okay, as we still have 11 left that shouldn't be a big problem, I think. > + __u32 reserved[11]; > + } format; Ugh, if you want this union to have a name I suggest 'fourcc' and not 'format' as the other struct contains format information as well and who knows, maybe in 10 or 20 years we'll have yet another format description that can do things none of the existing can do. > + }; > > __u32 nonstd; /* != 0 Non standard pixel format */ > Thanks, Florian Tobias Schandinat
next prev parent reply other threads:[~2011-08-26 17:07 UTC|newest] Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-19 9:37 [PATCH/RFC v2 0/3] fbdev: Add FOURCC-based format configuration API Laurent Pinchart 2011-08-19 9:37 ` Laurent Pinchart 2011-08-19 9:37 ` [PATCH/RFC v2 1/3] " Laurent Pinchart 2011-08-19 9:37 ` Laurent Pinchart 2011-08-26 17:07 ` Florian Tobias Schandinat [this message] 2011-08-26 17:07 ` [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration Florian Tobias Schandinat 2011-08-28 8:48 ` [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration API Laurent Pinchart 2011-08-28 8:48 ` Laurent Pinchart 2011-08-29 8:13 ` Geert Uytterhoeven 2011-08-29 8:13 ` Geert Uytterhoeven 2011-08-29 8:50 ` Laurent Pinchart 2011-08-29 8:50 ` Laurent Pinchart 2011-08-29 9:36 ` Geert Uytterhoeven 2011-08-29 9:36 ` Geert Uytterhoeven 2011-08-29 10:09 ` Laurent Pinchart 2011-08-29 10:09 ` Laurent Pinchart 2011-08-29 11:04 ` Geert Uytterhoeven 2011-08-29 11:04 ` Geert Uytterhoeven 2011-08-29 11:08 ` Laurent Pinchart 2011-08-29 11:08 ` Laurent Pinchart 2011-08-29 11:20 ` Geert Uytterhoeven 2011-08-29 11:20 ` Geert Uytterhoeven 2011-08-29 12:55 ` Laurent Pinchart 2011-08-29 12:55 ` Laurent Pinchart 2011-08-29 13:09 ` Geert Uytterhoeven 2011-08-29 13:09 ` Geert Uytterhoeven 2011-08-29 13:34 ` Laurent Pinchart 2011-08-29 13:34 ` Laurent Pinchart 2011-08-29 14:14 ` Geert Uytterhoeven 2011-08-29 14:14 ` Geert Uytterhoeven 2011-08-29 14:17 ` Laurent Pinchart 2011-08-29 14:17 ` Laurent Pinchart 2011-08-29 14:26 ` Geert Uytterhoeven 2011-08-29 14:26 ` Geert Uytterhoeven 2011-08-29 14:32 ` Laurent Pinchart 2011-08-29 14:32 ` Laurent Pinchart 2011-08-29 16:41 ` Florian Tobias Schandinat 2011-08-29 16:41 ` [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration Florian Tobias Schandinat 2011-08-30 1:09 ` [PATCH/RFC v2 1/3] fbdev: Add FOURCC-based format configuration API Laurent Pinchart 2011-08-30 1:09 ` Laurent Pinchart 2011-08-19 9:37 ` [PATCH/RFC v2 2/3] v4l: Add V4L2_PIX_FMT_NV24 and V4L2_PIX_FMT_NV42 formats Laurent Pinchart 2011-08-19 9:37 ` Laurent Pinchart 2011-08-19 9:37 ` [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based format API Laurent Pinchart 2011-08-19 9:37 ` Laurent Pinchart 2011-08-26 17:24 ` Florian Tobias Schandinat 2011-08-26 17:24 ` [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based Florian Tobias Schandinat 2011-08-28 8:59 ` [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based format API Laurent Pinchart 2011-08-28 8:59 ` Laurent Pinchart 2011-08-29 0:39 ` Magnus Damm 2011-08-29 0:39 ` [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based Magnus Damm 2011-08-29 8:30 ` [PATCH/RFC v2 3/3] fbdev: sh_mobile_lcdc: Support FOURCC-based format API Laurent Pinchart 2011-08-29 8:30 ` Laurent Pinchart
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4E57D2B5.7020604@gmx.de \ --to=florianschandinat@gmx.de \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-fbdev@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=magnus.damm@gmail.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.