All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Cc: "open list:DMA BUFFER SHARING FRAMEWORK" 
	<linux-media@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-api@vger.kernel.org, hverkuil-cisco@xs4all.nl,
	Rob Clark <robdclark@chromium.org>
Subject: Re: [PATCH v3 1/6] v4l: Add Qualcomm custom compressed pixel formats
Date: Tue, 18 Jan 2022 08:12:27 -0800	[thread overview]
Message-ID: <CAF6AEGuB2drN-qt8TicP0pLYbKQLt2vEhLt+xSND7tVoOiNEQQ@mail.gmail.com> (raw)
In-Reply-To: <20220117155559.234026-2-stanimir.varbanov@linaro.org>

On Mon, Jan 17, 2022 at 6:36 PM Stanimir Varbanov
<stanimir.varbanov@linaro.org> wrote:
>
> 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             | 19 +++++++++++++++++++
>  drivers/media/v4l2-core/v4l2-ioctl.c          |  2 ++
>  include/uapi/linux/videodev2.h                |  2 ++
>  3 files changed, 23 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> index 2f2133b4cd9c..929bd0dc0ba3 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> @@ -245,6 +245,25 @@ please make a proposal on the linux-media mailing list.
>        - Non-compressed, tiled two-planar format used by Mediatek MT8183.
>         This is an opaque intermediate format and the MDP3 hardware can be
>         used to convert it to other formats.
> +    * .. _V4L2-PIX-FMT-QC08C:
> +
> +      - ``V4L2_PIX_FMT_QC08C``
> +      - 'QC08C'
> +      - Compressed Macro-tile 8-Bit YUV420 format used by Qualcomm platforms.
> +        It is an opaque intermediate format. 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.

I guess QC08C is the same thing as NV12+UBWC?  Note that on the GPU
side, NV12+UBWC is treated as two planes, we program the hw with the
address of the start of UBWC data and the hw calculates the offset to
pixel data for the plane.  So the UBWC and pixel data are not actually
independent planes.

BR,
-R

> +    * .. _V4L2-PIX-FMT-QC10C:
> +
> +      - ``V4L2_PIX_FMT_QC10C``
> +      - 'QC10C'
> +      - Compressed Macro-tile 10-Bit YUV420 format used by Qualcomm platforms.
> +        It is an opaque intermediate format. 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.
>
>  .. raw:: latex
>
> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
> index 9ac557b8e146..1b6462f9ad7e 100644
> --- a/drivers/media/v4l2-core/v4l2-ioctl.c
> +++ b/drivers/media/v4l2-core/v4l2-ioctl.c
> @@ -1437,6 +1437,8 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
>                 case V4L2_PIX_FMT_SE401:        descr = "GSPCA SE401"; break;
>                 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_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 df8b9c486ba1..e710903185bd 100644
> --- a/include/uapi/linux/videodev2.h
> +++ b/include/uapi/linux/videodev2.h
> @@ -744,6 +744,8 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_INZI     v4l2_fourcc('I', 'N', 'Z', 'I') /* Intel Planar Greyscale 10-bit and Depth 16-bit */
>  #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 */
> --
> 2.25.1
>

  parent reply	other threads:[~2022-01-18 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-17 15:55 [PATCH v3 0/6] Qualcomm custom compressed pixfmt Stanimir Varbanov
2022-01-17 15:55 ` [PATCH v3 1/6] v4l: Add Qualcomm custom compressed pixel formats Stanimir Varbanov
2022-01-17 15:58   ` Hans Verkuil
2022-01-18 16:12   ` Rob Clark [this message]
2022-01-17 15:55 ` [PATCH v3 2/6] venus: helpers: Add helper to check supported " Stanimir Varbanov
2022-01-17 15:55 ` [PATCH v3 3/6] venus: Add a handling of QC08C compressed format Stanimir Varbanov
2022-01-17 15:55 ` [PATCH v3 4/6] venus: hfi_platform: Correct supported " Stanimir Varbanov
2022-01-17 15:55 ` [PATCH v3 5/6] venus: Add a handling of QC10C " Stanimir Varbanov
2022-02-16 16:20   ` Nicolas Dufresne
2022-02-17 11:33     ` Stanimir Varbanov
2022-01-17 15:55 ` [PATCH v3 6/6] venus: vdec: Use output resolution on reconfigure 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=CAF6AEGuB2drN-qt8TicP0pLYbKQLt2vEhLt+xSND7tVoOiNEQQ@mail.gmail.com \
    --to=robdclark@gmail.com \
    --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=robdclark@chromium.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 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.