All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Starkey <brian.starkey@arm.com>
To: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Cc: charles.xu@arm.com, nd@arm.com, matt.szczesiak@arm.com,
	airlied@linux.ie, liviu.dudau@arm.com,
	dri-devel@lists.freedesktop.org, maxime.ripard@bootlin.com,
	david.garbett@arm.com, seanpaul@chromium.org, lisa.wu@arm.com,
	daniel.vetter@ffwll.ch, malidp@foss.arm.com, ayan.halder@arm.com,
	james.qian.wang@arm.com
Subject: Re: [PATCH v5 3/9] drm/fourcc: Add fourcc for Mali linear tiled formats
Date: Fri, 19 Oct 2018 14:12:07 +0100	[thread overview]
Message-ID: <20181019131206.GB78@DESKTOP-E1NTVVP.localdomain> (raw)
In-Reply-To: <20181019105752.17741-4-alexandru-cosmin.gheorghe@arm.com>

Hi Alex,

On Fri, Oct 19, 2018 at 11:57:46AM +0100, Alexandru Gheorghe wrote:
>Mali-DP implements a number of tiled yuv formats which are not
>currently described in drm_fourcc.h.
>This adds those definitions and describes their memory layout by
>using the newly added char_per_block, block_w, block_h.
>
>Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>

I'm splitting formatting hairs again below, but otherwise LGTM:

Reviewed-by: Brian Starkey <brian.starkey@arm.com>

>---
> drivers/gpu/drm/drm_fourcc.c  | 12 ++++++++++++
> include/uapi/drm/drm_fourcc.h | 14 ++++++++++++++
> 2 files changed, 26 insertions(+)
>
>diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c
>index a843a5fc8dbf..69caa577149c 100644
>--- a/drivers/gpu/drm/drm_fourcc.c
>+++ b/drivers/gpu/drm/drm_fourcc.c
>@@ -228,6 +228,18 @@ const struct drm_format_info *__drm_format_info(u32 format)
> 		{ .format = DRM_FORMAT_P010,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true  },
> 		{ .format = DRM_FORMAT_P012,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true  },
> 		{ .format = DRM_FORMAT_P016,		.depth = 0,  .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2, .is_yuv = true  },
>+		{ .format = DRM_FORMAT_Y0L0,		.depth = 0,  .num_planes = 1,
>+		  .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, .block_h = { 2, 0, 0},

I think you're missing a space before all the closing braces on
.block_h

>+		  .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true },
>+		{ .format = DRM_FORMAT_X0L0,		.depth = 0,  .num_planes = 1,
>+		  .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, .block_h = { 2, 0, 0},
>+		  .hsub = 2, .vsub = 2, .is_yuv = true },
>+		{ .format = DRM_FORMAT_Y0L2,		.depth = 0,  .num_planes = 1,
>+		  .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, .block_h = { 2, 0, 0},
>+		  .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true },
>+		{ .format = DRM_FORMAT_X0L2,		.depth = 0,  .num_planes = 1,
>+		  .char_per_block = { 8, 0, 0 }, .block_w = { 2, 0, 0 }, .block_h = { 2, 0, 0},
>+		  .hsub = 2, .vsub = 2, .is_yuv = true },
> 	};
>
> 	unsigned int i;
>diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
>index 600106adf91f..4de86dbf40ca 100644
>--- a/include/uapi/drm/drm_fourcc.h
>+++ b/include/uapi/drm/drm_fourcc.h
>@@ -152,6 +152,20 @@ extern "C" {
>
> #define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */
>
>+/*
>+ * packed YCbCr420 2x2 tiled formats
>+ * first 64 bits will contain Y,Cb,Cr components for a 2x2 tile
>+ */
>+/* [63:0]   A3:A2:Y3:0:Cr0:0:Y2:0:A1:A0:Y1:0:Cb0:0:Y0:0  1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */
>+#define DRM_FORMAT_Y0L0		fourcc_code('Y', '0', 'L', '0')
>+/* [63:0]   X3:X2:Y3:0:Cr0:0:Y2:0:X1:X0:Y1:0:Cb0:0:Y0:0  1:1:8:2:8:2:8:2:1:1:8:2:8:2:8:2 little endian */
>+#define DRM_FORMAT_X0L0		fourcc_code('X', '0', 'L', '0')
>+
>+/* [63:0]   A3:A2:Y3:Cr0:Y2:A1:A0:Y1:Cb0:Y0  1:1:10:10:10:1:1:10:10:10 little endian */
>+#define DRM_FORMAT_Y0L2		fourcc_code('Y', '0', 'L', '2')
>+/* [63:0]   X3:X2:Y3:Cr0:Y2:X1:X0:Y1:Cb0:Y0  1:1:10:10:10:1:1:10:10:10 little endian */
>+#define DRM_FORMAT_X0L2		fourcc_code('X', '0', 'L', '2')
>+
> /*
>  * 2 plane RGB + A
>  * index 0 = RGB plane, same format as the corresponding non _A8 format has
>-- 
>2.18.0
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-10-19 13:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 10:57 [PATCH v5 0/9] Add method to describe tile/bit_level_packed formats Alexandru Gheorghe
2018-10-19 10:57 ` [PATCH v5 1/9] drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation Alexandru Gheorghe
2018-10-19 12:54   ` Maxime Ripard
2018-10-22  9:36     ` Alexandru-Cosmin Gheorghe
2018-10-19 10:57 ` [PATCH v5 2/9] drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info Alexandru Gheorghe
2018-10-19 13:09   ` Brian Starkey
2018-10-22 10:07     ` Alexandru-Cosmin Gheorghe
2018-10-19 10:57 ` [PATCH v5 3/9] drm/fourcc: Add fourcc for Mali linear tiled formats Alexandru Gheorghe
2018-10-19 13:12   ` Brian Starkey [this message]
2018-10-19 10:57 ` [PATCH v5 4/9] drm: mali-dp: Enable Mali-DP tiled buffer formats Alexandru Gheorghe
2018-10-19 13:17   ` Brian Starkey
2018-10-22 10:08     ` Alexandru-Cosmin Gheorghe
2018-10-19 10:57 ` [PATCH v5 5/9] drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0 Alexandru Gheorghe
2018-10-19 13:21   ` Brian Starkey
2018-10-22 10:09     ` Alexandru-Cosmin Gheorghe
2018-10-19 10:57 ` [PATCH v5 6/9] drm/fourcc: Add AFBC yuv fourccs for Mali Alexandru Gheorghe
2018-10-19 10:57 ` [PATCH v5 7/9] drm/afbc: Add AFBC modifier usage documentation Alexandru Gheorghe
2018-10-19 10:57 ` [PATCH v5 8/9] drm/selftest: Refactor test-drm_plane_helper Alexandru Gheorghe
2018-10-19 15:14   ` Daniel Vetter
2018-10-22  9:40     ` Alexandru-Cosmin Gheorghe
2018-10-19 10:57 ` [PATCH v5 9/9] drm/selftests: Add tests for drm_format_info* helpers Alexandru Gheorghe
2018-10-19 15:29   ` Daniel Vetter
2018-10-22 10:32     ` Alexandru-Cosmin Gheorghe
2018-10-23 13:56       ` Daniel Vetter

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=20181019131206.GB78@DESKTOP-E1NTVVP.localdomain \
    --to=brian.starkey@arm.com \
    --cc=airlied@linux.ie \
    --cc=alexandru-cosmin.gheorghe@arm.com \
    --cc=ayan.halder@arm.com \
    --cc=charles.xu@arm.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=david.garbett@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=james.qian.wang@arm.com \
    --cc=lisa.wu@arm.com \
    --cc=liviu.dudau@arm.com \
    --cc=malidp@foss.arm.com \
    --cc=matt.szczesiak@arm.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=nd@arm.com \
    --cc=seanpaul@chromium.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.