From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH/RFC v3 01/11] v4l: Move the media/v4l2-mediabus.h header to include/linux
Date: Tue, 05 Oct 2010 17:43:55 +0300 [thread overview]
Message-ID: <4CAB39AB.2070806@maxwell.research.nokia.com> (raw)
In-Reply-To: <1286288714-16506-2-git-send-email-laurent.pinchart@ideasonboard.com>
Hi Laurent,
Thanks for the patch!
Laurent Pinchart wrote:
> The header defines the v4l2_mbus_framefmt structure which will be used
> by the V4L2 subdevs userspace API.
>
> Change the type of the v4l2_mbus_framefmt::code field to __u32, as enum
> sizes can differ between different ABIs on the same architectures.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> include/linux/Kbuild | 1 +
> include/linux/v4l2-mediabus.h | 70 +++++++++++++++++++++++++++++++++++++++++
> include/media/soc_mediabus.h | 3 +-
> include/media/v4l2-mediabus.h | 53 +------------------------------
> 4 files changed, 73 insertions(+), 54 deletions(-)
> create mode 100644 include/linux/v4l2-mediabus.h
>
> diff --git a/include/linux/Kbuild b/include/linux/Kbuild
> index f836ee4..38127c2 100644
> --- a/include/linux/Kbuild
> +++ b/include/linux/Kbuild
> @@ -369,6 +369,7 @@ header-y += unistd.h
> header-y += usbdevice_fs.h
> header-y += utime.h
> header-y += utsname.h
> +header-y += v4l2-mediabus.h
> header-y += veth.h
> header-y += vhost.h
> header-y += videodev.h
> diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
> new file mode 100644
> index 0000000..127512a
> --- /dev/null
> +++ b/include/linux/v4l2-mediabus.h
> @@ -0,0 +1,70 @@
> +/*
> + * Media Bus API header
> + *
> + * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef __LINUX_V4L2_MEDIABUS_H
> +#define __LINUX_V4L2_MEDIABUS_H
> +
> +#include <linux/types.h>
> +#include <linux/videodev2.h>
> +
> +/*
> + * These pixel codes uniquely identify data formats on the media bus. Mostly
> + * they correspond to similarly named V4L2_PIX_FMT_* formats, format 0 is
> + * reserved, V4L2_MBUS_FMT_FIXED shall be used by host-client pairs, where the
> + * data format is fixed. Additionally, "2X8" means that one pixel is transferred
> + * in two 8-bit samples, "BE" or "LE" specify in which order those samples are
> + * transferred over the bus: "LE" means that the least significant bits are
> + * transferred first, "BE" means that the most significant bits are transferred
> + * first, and "PADHI" and "PADLO" define which bits - low or high, in the
> + * incomplete high byte, are filled with padding bits.
> + */
> +enum v4l2_mbus_pixelcode {
> + V4L2_MBUS_FMT_FIXED = 1,
> + V4L2_MBUS_FMT_YUYV8_2X8,
> + V4L2_MBUS_FMT_YVYU8_2X8,
> + V4L2_MBUS_FMT_UYVY8_2X8,
> + V4L2_MBUS_FMT_VYUY8_2X8,
> + V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE,
> + V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE,
> + V4L2_MBUS_FMT_RGB565_2X8_LE,
> + V4L2_MBUS_FMT_RGB565_2X8_BE,
> + V4L2_MBUS_FMT_SBGGR8_1X8,
> + V4L2_MBUS_FMT_SBGGR10_1X10,
> + V4L2_MBUS_FMT_GREY8_1X8,
> + V4L2_MBUS_FMT_Y10_1X10,
> + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_LE,
> + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_LE,
> + V4L2_MBUS_FMT_SBGGR10_2X8_PADHI_BE,
> + V4L2_MBUS_FMT_SBGGR10_2X8_PADLO_BE,
> + V4L2_MBUS_FMT_SGRBG8_1X8,
> + V4L2_MBUS_FMT_SBGGR12_1X12,
> + V4L2_MBUS_FMT_YUYV8_1_5X8,
> + V4L2_MBUS_FMT_YVYU8_1_5X8,
> + V4L2_MBUS_FMT_UYVY8_1_5X8,
> + V4L2_MBUS_FMT_VYUY8_1_5X8,
> +};
> +
> +/**
> + * struct v4l2_mbus_framefmt - frame format on the media bus
> + * @width: frame width
> + * @height: frame height
> + * @code: data format code
> + * @field: used interlacing type
> + * @colorspace: colorspace of the data
> + */
> +struct v4l2_mbus_framefmt {
> + __u32 width;
> + __u32 height;
> + __u32 code;
> + enum v4l2_field field;
> + enum v4l2_colorspace colorspace;
> +};
I think this struct would benefit from some reserved fields since it's
part of the user space interface.
No other comments.
Cheers,
--
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com
next prev parent reply other threads:[~2010-10-05 14:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-05 14:25 [PATCH/RFC v3 00/11] Sub-device pad-level operations Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 01/11] v4l: Move the media/v4l2-mediabus.h header to include/linux Laurent Pinchart
2010-10-05 14:43 ` Sakari Ailus [this message]
2010-10-05 15:30 ` Guennadi Liakhovetski
2010-10-05 15:34 ` Hans Verkuil
2010-10-05 22:32 ` Sakari Ailus
2010-10-05 22:31 ` Sakari Ailus
2010-10-06 6:23 ` Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 02/11] v4l: Rename V4L2_MBUS_FMT_GREY8_1X8 to V4L2_MBUS_FMT_Y8_1X8 Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 03/11] v4l: Group media bus pixel codes by types and sort them alphabetically Laurent Pinchart
2010-10-05 15:32 ` Guennadi Liakhovetski
2010-10-06 9:19 ` Hiremath, Vaibhav
2010-10-06 10:13 ` Laurent Pinchart
2010-10-06 10:19 ` Hiremath, Vaibhav
2010-10-05 14:25 ` [PATCH/RFC v3 04/11] v4l: Add 8-bit YUYV on 16-bit bus and SGRBG10 media bus pixel codes Laurent Pinchart
2010-10-06 9:19 ` Hiremath, Vaibhav
2010-10-06 10:18 ` Laurent Pinchart
2010-10-06 10:21 ` Hiremath, Vaibhav
2010-10-05 14:25 ` [PATCH/RFC v3 05/11] v4l: Add remaining RAW10 patterns w DPCM pixel code variants Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 06/11] v4l: Create v4l2 subdev file handle structure Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 07/11] v4l: v4l2_subdev pad-level operations Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 08/11] v4l: v4l2_subdev userspace format API - documentation binary files Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 09/11] v4l: v4l2_subdev userspace format API Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 10/11] v4l: v4l2_subdev userspace frame interval API Laurent Pinchart
2010-10-05 14:25 ` [PATCH/RFC v3 11/11] v4l: v4l2_subdev userspace crop API Laurent Pinchart
2010-10-05 14:33 ` [PATCH/RFC v3 00/11] Sub-device pad-level operations Hans Verkuil
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=4CAB39AB.2070806@maxwell.research.nokia.com \
--to=sakari.ailus@maxwell.research.nokia.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox