linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas@ndufresne.ca>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-api@vger.kernel.org
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH v2 1/5] v4l: Add Qualcomm custom compressed pixel formats
Date: Tue, 06 Jul 2021 09:38:42 -0400	[thread overview]
Message-ID: <6ade1e0219056fe17339a3acf4a8ecec85b7c699.camel@ndufresne.ca> (raw)
In-Reply-To: <20210706124034.773503-2-stanimir.varbanov@linaro.org>

Le mardi 06 juillet 2021 à 15:40 +0300, Stanimir Varbanov a écrit :
> Add custom Qualcomm raw compressed pixel formats. They are
> used in Qualcomm SoCs to optimize the interconnect bandwidth.
> 
> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
> ---
>  .../media/v4l/pixfmt-reserved.rst              | 18 ++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-ioctl.c           |  2 ++
>  include/uapi/linux/videodev2.h                 |  2 ++
>  3 files changed, 22 insertions(+)
> 
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> index 0b879c0da713..136e9832db0c 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> @@ -260,6 +260,24 @@ please make a proposal on the linux-media mailing list.
>  	of tiles, resulting in 32-aligned resolutions for the luminance plane
>  	and 16-aligned resolutions for the chrominance plane (with 2x2
>  	subsampling).
> +    * .. _V4L2-PIX-FMT-QC08C:
> +
> +      - ``V4L2_PIX_FMT_QC08C``
> +      - 'QC08C'
> +      - Compressed Macro-tile 8-Bit YUV420 format used by Qualcomm platforms.
> +	The used compression is lossless and it is used by various multimedia
> +	hardware blocks like GPU, display controllers, ISP and video accelerators.
> +	It contains four planes for progressive video and eight planes for
> +	interlaced video.

nit: Considering we are not yet adopting DRM modifiers, perhaps we could cross-
reference the documentation, or at least document which DRM format/modifier pair
this will match too on the other side of the kernel domain fence ? This is of
course just for integrator convenience.

> +    * .. _V4L2-PIX-FMT-QC10C:
> +
> +      - ``V4L2_PIX_FMT_QC10C``
> +      - 'QC10C'
> +      - Compressed Macro-tile 10-Bit YUV420 format used by Qualcomm platforms.
> +	The used compression is lossless and it is used by various multimedia
> +	hardware blocks like GPU, display controllers, ISP and video.
> +	It contains four planes for progressive video and eight planes for
> +	interlaced video.
>  
>  .. raw:: latex
>  
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 05d5db3d85e5..76d4e4ac18e8 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1416,6 +1416,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>  		case V4L2_PIX_FMT_S5C_UYVY_JPG:	descr = "S5C73MX interleaved UYVY/JPEG"; break;
>  		case V4L2_PIX_FMT_MT21C:	descr = "Mediatek Compressed Format"; break;
>  		case V4L2_PIX_FMT_SUNXI_TILED_NV12: descr = "Sunxi Tiled NV12 Format"; break;
> +		case V4L2_PIX_FMT_QC08C:	descr = "QCOM Compressed 8-bit Format"; break;
> +		case V4L2_PIX_FMT_QC10C:	descr = "QCOM Compressed 10-bit Format"; break;
>  		default:
>  			if (fmt->description[0])
>  				return;
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
> index 9260791b8438..dc1b714ccf6b 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -737,6 +737,8 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_SUNXI_TILED_NV12 v4l2_fourcc('S', 'T', '1', '2') /* Sunxi Tiled NV12 Format */
>  #define V4L2_PIX_FMT_CNF4     v4l2_fourcc('C', 'N', 'F', '4') /* Intel 4-bit packed depth confidence information */
>  #define V4L2_PIX_FMT_HI240    v4l2_fourcc('H', 'I', '2', '4') /* BTTV 8-bit dithered RGB */
> +#define V4L2_PIX_FMT_QC08C    v4l2_fourcc('Q', '0', '8', 'C') /* Qualcomm 8-bit compressed */
> +#define V4L2_PIX_FMT_QC10C    v4l2_fourcc('Q', '1', '0', 'C') /* Qualcomm 10-bit compressed */
>  
>  /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */
>  #define V4L2_PIX_FMT_IPU3_SBGGR10	v4l2_fourcc('i', 'p', '3', 'b') /* IPU3 packed 10-bit BGGR bayer */



  reply	other threads:[~2021-07-06 13:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 12:40 [PATCH v2 0/5] Qualcomm custom compressed pixfmt Stanimir Varbanov
2021-07-06 12:40 ` [PATCH v2 1/5] v4l: Add Qualcomm custom compressed pixel formats Stanimir Varbanov
2021-07-06 13:38   ` Nicolas Dufresne [this message]
2021-07-28 10:09   ` Hans Verkuil
2021-07-28 10:10     ` Hans Verkuil
2021-07-06 12:40 ` [PATCH v2 2/5] venus: helpers: Add helper to check supported " Stanimir Varbanov
2021-07-06 12:40 ` [PATCH v2 3/5] venus: Add a handling of QC08C compressed format Stanimir Varbanov
2021-07-06 12:40 ` [PATCH v2 4/5] venus: hfi_platform: Correct supported " Stanimir Varbanov
2021-07-06 12:40 ` [PATCH v2 5/5] venus: Add a handling of QC10C " Stanimir Varbanov
2021-07-28  9:59 ` [PATCH v2 0/5] Qualcomm custom compressed pixfmt Stanimir Varbanov

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=6ade1e0219056fe17339a3acf4a8ecec85b7c699.camel@ndufresne.ca \
    --to=nicolas@ndufresne.ca \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=stanimir.varbanov@linaro.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;
as well as URLs for NNTP newsgroup(s).