Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-12 Thread Petr Mladek
On Fri 2021-02-12 13:28:56, Sakari Ailus wrote: > On Thu, Feb 11, 2021 at 06:14:28PM +0100, Petr Mladek wrote: > > On Tue 2021-02-09 19:47:55, Sakari Ailus wrote: > > > Hi Andy, > > > > > > On Tue, Feb 09, 2021 at 11:58:40AM +0200, Andy Shevchenko wrote: > > > > On Tue, Feb 09, 2021 at 11:20:32AM

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-12 Thread Sakari Ailus
Hi Petr, Thanks for the comments. On Thu, Feb 11, 2021 at 06:14:28PM +0100, Petr Mladek wrote: > On Tue 2021-02-09 19:47:55, Sakari Ailus wrote: > > Hi Andy, > > > > On Tue, Feb 09, 2021 at 11:58:40AM +0200, Andy Shevchenko wrote: > > > On Tue, Feb 09, 2021 at 11:20:32AM +0200, Sakari Ailus wrot

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-11 Thread Petr Mladek
On Tue 2021-02-09 19:47:55, Sakari Ailus wrote: > Hi Andy, > > On Tue, Feb 09, 2021 at 11:58:40AM +0200, Andy Shevchenko wrote: > > On Tue, Feb 09, 2021 at 11:20:32AM +0200, Sakari Ailus wrote: > > > On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > > > > On Mon, Feb 8, 2021 at 10

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-09 Thread Sakari Ailus
Hi Andy, On Tue, Feb 09, 2021 at 11:58:40AM +0200, Andy Shevchenko wrote: > On Tue, Feb 09, 2021 at 11:20:32AM +0200, Sakari Ailus wrote: > > On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > > > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > > > wrote: > > ... > > > > > +

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-09 Thread Andy Shevchenko
On Mon, Feb 08, 2021 at 10:58:55PM +0200, Andy Shevchenko wrote: > On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > > wrote: ... > __le32 val; > > val = cpu_to_le32(*fourcc & ~BIT(31)); > > p += string_escape_mem(&val, sizeof(*

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-09 Thread Andy Shevchenko
On Tue, Feb 09, 2021 at 11:20:32AM +0200, Sakari Ailus wrote: > On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > > wrote: ... > > > + %p4cc BG12 little-endian (0x32314742) > > > > This misses examples of the (strange) es

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-09 Thread Sakari Ailus
Hi Andy, On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > wrote: > > > > Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM > > pixel formats denoted by fourccs. The fourcc encoding is the same for both > > so

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-08 Thread Andy Shevchenko
On Mon, Feb 08, 2021 at 10:43:30PM +0200, Andy Shevchenko wrote: > On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus > wrote: ... > > +static noinline_for_stack > > +char *fourcc_string(char *buf, char *end, const u32 *fourcc, > > + struct printf_spec spec, const char *fmt) > > +{ >

Re: [PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-08 Thread Andy Shevchenko
On Mon, Feb 8, 2021 at 10:11 PM Sakari Ailus wrote: > > Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM > pixel formats denoted by fourccs. The fourcc encoding is the same for both > so the same implementation can be used. Thank you for an update with the examples how cur

[PATCH v6 1/3] lib/vsprintf: Add support for printing V4L2 and DRM fourccs

2021-02-08 Thread Sakari Ailus
Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM pixel formats denoted by fourccs. The fourcc encoding is the same for both so the same implementation can be used. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Sakari Ailus Reviewed-by: Petr Mladek Reviewed-by: Serge