From: Daniel Vetter <daniel@ffwll.ch>
To: Hyun Kwon <hyun.kwon@xilinx.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Emil Velikov <emil.l.velikov@gmail.com>,
Michal Simek <michal.simek@xilinx.com>,
dri-devel@lists.freedesktop.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH RFC v3 2/6] drm: drm_fourcc: Introduce macro-pixel info to drm_format_info
Date: Mon, 19 Feb 2018 12:20:43 +0100 [thread overview]
Message-ID: <20180219112043.GS22199@phenom.ffwll.local> (raw)
In-Reply-To: <1518226556-7181-3-git-send-email-hyun.kwon@xilinx.com>
On Fri, Feb 09, 2018 at 05:35:52PM -0800, Hyun Kwon wrote:
> Multiple pixels can be grouped as a single unit and form a 'macro-pixel'.
> This is to model formats where multiple non-byte aligned pixels are stored
> together in a byte-aligned way. For example, if 3 - 10 bit
> pixels are stored in 32 bit, the 32 bit stroage can be treated as
> a single macro-pixel with 3 pixels. This aligns non-byte addressable
> formats with drm core where each pixel / component is expected to be
> byte aligned.
>
> Add 'pixels_per_macro' to note how many pixels are in a macro-pixel.
> 'bytes_per_macro' specifies the size of a macro-pixel in bytes.
>
> Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
> ---
> v3
> - Rename members and rephrase descriptions
> - Rephrase the commit message
> - Use in-line style comments
> v2
> - Introduce macro-pixel over scaling factors
> ---
> ---
> include/drm/drm_fourcc.h | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
>
> diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
> index b00bae4..ce59329 100644
> --- a/include/drm/drm_fourcc.h
> +++ b/include/drm/drm_fourcc.h
> @@ -58,11 +58,33 @@ struct drm_format_info {
> /**
> * @cpp:
> *
> - * Number of bytes per pixel (per plane)
> + * Number of bytes per pixel (per plane). @cpp shouldn't be used when
> + * @pixels_per_macropixel and @bytes_per_macropixel are used.
> */
> u8 cpp[3];
>
> /**
> + * @pixels_per_macropixel:
> + *
> + * Number of pixels per macro-pixel (per plane). A macro-pixel is
> + * composed of multiple pixels, and there can be extra bits between
> + * pixels. This must be used along with @bytes_per_macropixel, only
> + * when single pixel size is not byte-aligned. In this case, @cpp
> + * is not valid and should be 0.
> + */
> + u8 pixels_per_macropixel[3];
> +
> + /*
> + * @bytes_per_macropixel:
> + *
> + * Number of bytes per macro-pixel (per plane). A macro-pixel is
> + * composed of multiple pixels. The size of single macro-pixel should
> + * be byte-aligned. This should be used with @pixels_per_macropixel,
> + * and @cpp should be 0.
> + */
> + u8 bytes_per_macropixel[3];
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> +
> + /**
> * @hsub:
> *
> * Horizontal chroma subsampling factor
> --
> 2.7.4
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-02-19 11:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-10 1:35 [PATCH RFC v3 0/6] Support of non-byte aligned formats in drm Hyun Kwon
2018-02-10 1:35 ` [PATCH RFC v3 1/6] drm: fourcc.h: Use inline kern-doc style for struct drm_format_info Hyun Kwon
2018-02-19 11:19 ` Daniel Vetter
2018-02-10 1:35 ` [PATCH RFC v3 2/6] drm: drm_fourcc: Introduce macro-pixel info to drm_format_info Hyun Kwon
2018-02-19 11:20 ` Daniel Vetter [this message]
2018-02-10 1:35 ` [PATCH RFC v3 3/6] drm: fourcc: Add drm_format_plane_width_bytes() Hyun Kwon
2018-02-19 11:27 ` Daniel Vetter
2018-02-10 1:35 ` [PATCH RFC v3 4/6] drm: drm_fourcc: Add new formats for Xilinx IPs Hyun Kwon
2018-02-19 14:22 ` Daniel Vetter
2018-02-23 2:41 ` Hyun Kwon
2018-03-05 8:50 ` Daniel Vetter
2018-02-10 1:35 ` [PATCH RFC v3 5/6] drm: xlnx: zynqmp: Add XV15 and XV20 formats Hyun Kwon
2018-02-10 1:35 ` [PATCH RFC v3 6/6] drm: fourcc: Add new formats needed by Xilinx IP Hyun Kwon
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=20180219112043.GS22199@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=hyun.kwon@xilinx.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=michal.simek@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox