From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Rohit Athavale <rohit.athavale@xilinx.com>
Cc: linux-media@vger.kernel.org, hyun.kwon@xilinx.com,
Rohit Athavale <rathaval@xilinx.com>
Subject: Re: [PATCH 2/3] media: xilinx-vip: Add 8-bit YCbCr 4:2:0 to formats table
Date: Fri, 18 Aug 2017 12:16:44 +0300 [thread overview]
Message-ID: <4081123.eIeaFnY7EH@avalon> (raw)
In-Reply-To: <1502303274-40609-3-git-send-email-rathaval@xilinx.com>
Hi Rohit,
Thank you for the patch.
On Wednesday 09 Aug 2017 11:27:53 Rohit Athavale wrote:
> Add Xilinx YCbCr 4:2:0 to xvip formats table. This commit
> will allow driver to setup media pad codes to YUV 420
> via DT properties.
>
> Signed-off-by: Rohit Athavale <rathaval@xilinx.com>
> ---
> drivers/media/platform/xilinx/xilinx-vip.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/media/platform/xilinx/xilinx-vip.c
> b/drivers/media/platform/xilinx/xilinx-vip.c index 3112591..37b80bf 100644
> --- a/drivers/media/platform/xilinx/xilinx-vip.c
> +++ b/drivers/media/platform/xilinx/xilinx-vip.c
> @@ -15,6 +15,7 @@
> #include <linux/clk.h>
> #include <linux/export.h>
> #include <linux/kernel.h>
> +#include <linux/media-bus-format.h>
I'm pretty sure the file is included indirectly already, so this isn't
strictly needed, but it shouldn't hurt either.
> #include <linux/of.h>
> #include <linux/platform_device.h>
>
> @@ -27,6 +28,8 @@
> */
>
> static const struct xvip_video_format xvip_video_formats[] = {
> + { XVIP_VF_YUV_420, 8, NULL, MEDIA_BUS_FMT_XLNX8_VUY420_1X24,
> + 2, V4L2_PIX_FMT_NV12, "4:2:0, semi-planar, YUYV" },
You're mapping XVIP_VF_YUV_420 to V4L2_PIX_FMT_NV12 which has an average bpp
of 1.5 bytes per pixel, but you're setting bpp to 2. How does that work ? You
obviously can't express a 1.5 bpp currently in the driver, so we might need to
extend the xvip_video_format structure with additional fields (for instance
turning bytes per pixel into bits per pixel, but we might need per-plane
information too).
On a side note, how does this work with VDMA ? The latest VDMA version I
checked (v6.2, a while ago) didn't seem to support planar formats. Has it
changed in more recent versions ? Doesn't it require changes in the xilinx-vip
driver ?
> { XVIP_VF_YUV_422, 8, NULL, MEDIA_BUS_FMT_UYVY8_1X16,
> 2, V4L2_PIX_FMT_YUYV, "4:2:2, packed, YUYV" },
> { XVIP_VF_YUV_444, 8, NULL, MEDIA_BUS_FMT_VUY8_1X24,
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2017-08-18 9:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 18:27 [PATCH 0/3] Xilinx 8-bit color depth YCbCr 4:2:0 media bus format Rohit Athavale
2017-08-09 18:27 ` [PATCH 1/3] uapi: media-bus-format: Add Xilinx specific " Rohit Athavale
2017-08-18 9:17 ` Laurent Pinchart
2017-08-09 18:27 ` [PATCH 2/3] media: xilinx-vip: Add 8-bit YCbCr 4:2:0 to formats table Rohit Athavale
2017-08-18 9:16 ` Laurent Pinchart [this message]
2017-08-09 18:27 ` [PATCH 3/3] Documentation: subdev-formats: Add Xilinx YCbCr to Vendor specific area Rohit Athavale
2017-08-18 9:18 ` 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=4081123.eIeaFnY7EH@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=hyun.kwon@xilinx.com \
--cc=linux-media@vger.kernel.org \
--cc=rathaval@xilinx.com \
--cc=rohit.athavale@xilinx.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: link
Be 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.