From: Marco Felsch <m.felsch@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: kernel@pengutronix.de, dri-devel@lists.freedesktop.org,
Steve Longerbeam <slongerbeam@gmail.com>
Subject: Re: [PATCH 1/2] gpu: ipu-v3: enable remaining 32-bit RGB V4L2 pixel formats
Date: Thu, 15 Aug 2019 08:36:53 +0200 [thread overview]
Message-ID: <20190815063653.rxo7werudf4nxngj@pengutronix.de> (raw)
In-Reply-To: <20190814151059.8846-1-p.zabel@pengutronix.de>
Hi Philipp,
On 19-08-14 17:10, Philipp Zabel wrote:
> Support is already implemented for the corresponding DRM formats,
> just hook up the remaining V4L2 pixel formats.
>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> ---
> drivers/gpu/ipu-v3/ipu-common.c | 16 ++++++++++------
> drivers/gpu/ipu-v3/ipu-cpmem.c | 26 +++++++++++++++++++++++++-
> 2 files changed, 35 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
> index 6386e2fe2ff7..ee2a025e54cf 100644
> --- a/drivers/gpu/ipu-v3/ipu-common.c
> +++ b/drivers/gpu/ipu-v3/ipu-common.c
> @@ -113,13 +113,17 @@ enum ipu_color_space ipu_pixelformat_to_colorspace(u32 pixelformat)
> case V4L2_PIX_FMT_NV16:
> case V4L2_PIX_FMT_NV61:
> return IPUV3_COLORSPACE_YUV;
> - case V4L2_PIX_FMT_XRGB32:
> - case V4L2_PIX_FMT_XBGR32:
> - case V4L2_PIX_FMT_RGB32:
> - case V4L2_PIX_FMT_BGR32:
> - case V4L2_PIX_FMT_RGB24:
> - case V4L2_PIX_FMT_BGR24:
> case V4L2_PIX_FMT_RGB565:
> + case V4L2_PIX_FMT_BGR24:
Nitpick:
Should we add '/* fall through */' comments?
Feel free to add my
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
> + case V4L2_PIX_FMT_RGB24:
> + case V4L2_PIX_FMT_ABGR32:
> + case V4L2_PIX_FMT_XBGR32:
> + case V4L2_PIX_FMT_BGRA32:
> + case V4L2_PIX_FMT_BGRX32:
> + case V4L2_PIX_FMT_RGBA32:
> + case V4L2_PIX_FMT_RGBX32:
> + case V4L2_PIX_FMT_ARGB32:
> + case V4L2_PIX_FMT_XRGB32:
> return IPUV3_COLORSPACE_RGB;
> default:
> return IPUV3_COLORSPACE_UNKNOWN;
> diff --git a/drivers/gpu/ipu-v3/ipu-cpmem.c b/drivers/gpu/ipu-v3/ipu-cpmem.c
> index be1226ce28cd..a1c85d1521f5 100644
> --- a/drivers/gpu/ipu-v3/ipu-cpmem.c
> +++ b/drivers/gpu/ipu-v3/ipu-cpmem.c
> @@ -182,9 +182,27 @@ static int v4l2_pix_fmt_to_drm_fourcc(u32 pixelformat)
> case V4L2_PIX_FMT_RGB32:
> /* R G B A <=> [32:0] A:B:G:R */
> return DRM_FORMAT_XBGR8888;
> + case V4L2_PIX_FMT_ABGR32:
> + /* B G R A <=> [32:0] A:R:G:B */
> + return DRM_FORMAT_ARGB8888;
> case V4L2_PIX_FMT_XBGR32:
> /* B G R X <=> [32:0] X:R:G:B */
> return DRM_FORMAT_XRGB8888;
> + case V4L2_PIX_FMT_BGRA32:
> + /* A B G R <=> [32:0] R:G:B:A */
> + return DRM_FORMAT_RGBA8888;
> + case V4L2_PIX_FMT_BGRX32:
> + /* X B G R <=> [32:0] R:G:B:X */
> + return DRM_FORMAT_RGBX8888;
> + case V4L2_PIX_FMT_RGBA32:
> + /* R G B A <=> [32:0] A:B:G:R */
> + return DRM_FORMAT_ABGR8888;
> + case V4L2_PIX_FMT_RGBX32:
> + /* R G B X <=> [32:0] X:B:G:R */
> + return DRM_FORMAT_XBGR8888;
> + case V4L2_PIX_FMT_ARGB32:
> + /* A R G B <=> [32:0] B:G:R:A */
> + return DRM_FORMAT_BGRA8888;
> case V4L2_PIX_FMT_XRGB32:
> /* X R G B <=> [32:0] B:G:R:X */
> return DRM_FORMAT_BGRX8888;
> @@ -823,8 +841,14 @@ int ipu_cpmem_set_image(struct ipuv3_channel *ch, struct ipu_image *image)
> break;
> case V4L2_PIX_FMT_RGB32:
> case V4L2_PIX_FMT_BGR32:
> - case V4L2_PIX_FMT_XRGB32:
> + case V4L2_PIX_FMT_ABGR32:
> case V4L2_PIX_FMT_XBGR32:
> + case V4L2_PIX_FMT_BGRA32:
> + case V4L2_PIX_FMT_BGRX32:
> + case V4L2_PIX_FMT_RGBA32:
> + case V4L2_PIX_FMT_RGBX32:
> + case V4L2_PIX_FMT_ARGB32:
> + case V4L2_PIX_FMT_XRGB32:
> offset = image->rect.left * 4 +
> image->rect.top * pix->bytesperline;
> break;
> --
> 2.20.1
>
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-08-15 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-14 15:10 [PATCH 1/2] gpu: ipu-v3: enable remaining 32-bit RGB V4L2 pixel formats Philipp Zabel
2019-08-14 15:10 ` [PATCH 2/2] gpu: ipu-v3: image-convert: enable V4L2_PIX_FMT_BGRX32 and _RGBX32 Philipp Zabel
2019-08-15 6:36 ` Marco Felsch [this message]
2019-08-15 9:01 ` [PATCH 1/2] gpu: ipu-v3: enable remaining 32-bit RGB V4L2 pixel formats Philipp Zabel
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=20190815063653.rxo7werudf4nxngj@pengutronix.de \
--to=m.felsch@pengutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=p.zabel@pengutronix.de \
--cc=slongerbeam@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: 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