From: "Sharma, Swati2" <swati2.sharma@intel.com> To: "Juha-Pekka Heikkilä" <juhapekka.heikkila@gmail.com>, dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org, intel-gfx@lists.freedesktop.org, narmstrong@baylibre.com, clinton.a.taylor@intel.com, ayaka@soulik.info, ayan.halder@arm.com, maxime.ripard@bootlin.com, daniel@fooishbar.org, maarten.lankhorst@linux.intel.com, stanislav.lisovskiy@intel.com, daniel.vetter@ffwll.ch, ville.syrjala@linux.intel.com, Vidya Srinivas <vidya.srinivas@intel.com> Subject: Re: [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc Date: Fri, 1 Mar 2019 14:01:50 +0530 [thread overview] Message-ID: <fe62b57c-dbc0-7516-8cd1-486b539eebdb@intel.com> (raw) In-Reply-To: <1805f0e5-c589-4491-77c1-2d29f309e493@gmail.com> On 15-Feb-19 2:12 AM, Juha-Pekka Heikkilä wrote: > > > Swati Sharma kirjoitti 13.2.2019 klo 15.25: >> The following pixel formats are packed format that follows 4:2:2 >> chroma sampling. For memory represenation each component is >> allocated 16 bits each. Thus each pixel occupies 32bit. >> >> Y210: For each component, valid data occupies MSB 10 bits. >> LSB 6 bits are filled with zeroes. >> Y212: For each component, valid data occupies MSB 12 bits. >> LSB 4 bits are filled with zeroes. >> Y216: For each component valid data occupies 16 bits, >> doesn't require any padding bits. >> >> First 16 bits stores the Y value and the next 16 bits stores one >> of the chroma samples alternatively. The first luma sample will >> be accompanied by first U sample and second luma sample is >> accompanied by the first V sample. >> >> The following pixel formats are packed format that follows 4:4:4 >> chroma sampling. Channels are arranged in the order UYVA in >> increasing memory order. >> >> Y410: Each color component occupies 10 bits and X component >> takes 2 bits, thus each pixel occupies 32 bits. >> Y412: Each color component is 16 bits where valid data >> occupies MSB 12 bits. LSB 4 bits are filled with zeroes. >> Thus, each pixel occupies 64 bits. >> Y416: Each color component occupies 16 bits for valid data, >> doesn't require any padding bits. Thus, each pixel >> occupies 64 bits. >> >> Signed-off-by: Swati Sharma <swati2.sharma@intel.com> >> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> >> --- >> drivers/gpu/drm/drm_fourcc.c | 6 ++++++ >> include/uapi/drm/drm_fourcc.h | 18 +++++++++++++++++- >> 2 files changed, 23 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >> index ba7e19d..45c9882 100644 >> --- a/drivers/gpu/drm/drm_fourcc.c >> +++ b/drivers/gpu/drm/drm_fourcc.c >> @@ -226,6 +226,12 @@ const struct drm_format_info >> *__drm_format_info(u32 format) >> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes >> = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, >> { .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes >> = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, >> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes >> = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, >> .is_yuv = true }, >> + { .format = DRM_FORMAT_Y210, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y212, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y216, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y410, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y412, .depth = 0, >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y416, .depth = 0, >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .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 }, >> .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true }, >> diff --git a/include/uapi/drm/drm_fourcc.h >> b/include/uapi/drm/drm_fourcc.h >> index bab2029..6e20ced 100644 >> --- a/include/uapi/drm/drm_fourcc.h >> +++ b/include/uapi/drm/drm_fourcc.h >> @@ -151,7 +151,23 @@ >> #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* >> [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ >> #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* >> [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ >> -#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') >> /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ >> +#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* >> [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ > ^^ > one tab removed? Don't y showing like this :/ > > With that fixed this is > Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> > >> + >> +/* >> + * packed Y2xx indicate for each component, xx valid data occupy msb >> + * 16-xx padding occupy lsb >> + */ >> +#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') /* >> [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 10:6:10:6:10:6:10:6 little endian per 2 >> Y pixels */ >> +#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') /* >> [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 12:4:12:4:12:4:12:4 little endian per 2 >> Y pixels */ >> +#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6') /* >> [63:0] Y0:Cb0:Y1:Cr1 16:16:16:16 little endian per 2 Y pixels */ >> + >> +/* >> + * packed Y4xx indicate for each component, xx valid data occupy msb >> + * 16-xx padding occupy lsb except Y410 >> + */ >> +#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') /* >> [31:0] X:V:Y:U 2:10:10:10 little endian */ >> +#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') /* >> [63:0] X:x:V:x:Y:x:U:x 12:4:12:4:12:4:12:4 little endian */ >> +#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6') /* >> [63:0] X:V:Y:U 16:16:16:16 little endian */ >> /* >> * packed YCbCr420 2x2 tiled formats >> -- ~Swati Sharma
WARNING: multiple messages have this Message-ID (diff)
From: "Sharma, Swati2" <swati2.sharma@intel.com> To: "Juha-Pekka Heikkilä" <juhapekka.heikkila@gmail.com>, dri-devel@lists.freedesktop.org Cc: narmstrong@baylibre.com, maxime.ripard@bootlin.com, daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org, ayaka@soulik.info, ayan.halder@arm.com, linux-media@vger.kernel.org Subject: Re: [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc Date: Fri, 1 Mar 2019 14:01:50 +0530 [thread overview] Message-ID: <fe62b57c-dbc0-7516-8cd1-486b539eebdb@intel.com> (raw) In-Reply-To: <1805f0e5-c589-4491-77c1-2d29f309e493@gmail.com> On 15-Feb-19 2:12 AM, Juha-Pekka Heikkilä wrote: > > > Swati Sharma kirjoitti 13.2.2019 klo 15.25: >> The following pixel formats are packed format that follows 4:2:2 >> chroma sampling. For memory represenation each component is >> allocated 16 bits each. Thus each pixel occupies 32bit. >> >> Y210: For each component, valid data occupies MSB 10 bits. >> LSB 6 bits are filled with zeroes. >> Y212: For each component, valid data occupies MSB 12 bits. >> LSB 4 bits are filled with zeroes. >> Y216: For each component valid data occupies 16 bits, >> doesn't require any padding bits. >> >> First 16 bits stores the Y value and the next 16 bits stores one >> of the chroma samples alternatively. The first luma sample will >> be accompanied by first U sample and second luma sample is >> accompanied by the first V sample. >> >> The following pixel formats are packed format that follows 4:4:4 >> chroma sampling. Channels are arranged in the order UYVA in >> increasing memory order. >> >> Y410: Each color component occupies 10 bits and X component >> takes 2 bits, thus each pixel occupies 32 bits. >> Y412: Each color component is 16 bits where valid data >> occupies MSB 12 bits. LSB 4 bits are filled with zeroes. >> Thus, each pixel occupies 64 bits. >> Y416: Each color component occupies 16 bits for valid data, >> doesn't require any padding bits. Thus, each pixel >> occupies 64 bits. >> >> Signed-off-by: Swati Sharma <swati2.sharma@intel.com> >> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com> >> --- >> drivers/gpu/drm/drm_fourcc.c | 6 ++++++ >> include/uapi/drm/drm_fourcc.h | 18 +++++++++++++++++- >> 2 files changed, 23 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >> index ba7e19d..45c9882 100644 >> --- a/drivers/gpu/drm/drm_fourcc.c >> +++ b/drivers/gpu/drm/drm_fourcc.c >> @@ -226,6 +226,12 @@ const struct drm_format_info >> *__drm_format_info(u32 format) >> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes >> = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = true }, >> { .format = DRM_FORMAT_XYUV8888, .depth = 0, .num_planes >> = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = true }, >> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes >> = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .has_alpha = true, >> .is_yuv = true }, >> + { .format = DRM_FORMAT_Y210, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y212, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y216, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 2, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y410, .depth = 0, >> .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y412, .depth = 0, >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .is_yuv = >> true }, >> + { .format = DRM_FORMAT_Y416, .depth = 0, >> .num_planes = 1, .cpp = { 8, 0, 0 }, .hsub = 1, .vsub = 1, .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 }, >> .hsub = 2, .vsub = 2, .has_alpha = true, .is_yuv = true }, >> diff --git a/include/uapi/drm/drm_fourcc.h >> b/include/uapi/drm/drm_fourcc.h >> index bab2029..6e20ced 100644 >> --- a/include/uapi/drm/drm_fourcc.h >> +++ b/include/uapi/drm/drm_fourcc.h >> @@ -151,7 +151,23 @@ >> #define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') /* >> [31:0] Y1:Cb0:Y0:Cr0 8:8:8:8 little endian */ >> #define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') /* >> [31:0] A:Y:Cb:Cr 8:8:8:8 little endian */ >> -#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') >> /* [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ >> +#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') /* >> [31:0] X:Y:Cb:Cr 8:8:8:8 little endian */ > ^^ > one tab removed? Don't y showing like this :/ > > With that fixed this is > Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> > >> + >> +/* >> + * packed Y2xx indicate for each component, xx valid data occupy msb >> + * 16-xx padding occupy lsb >> + */ >> +#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') /* >> [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 10:6:10:6:10:6:10:6 little endian per 2 >> Y pixels */ >> +#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') /* >> [63:0] Y0:x:Cb0:x:Y1:x:Cr1:x 12:4:12:4:12:4:12:4 little endian per 2 >> Y pixels */ >> +#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6') /* >> [63:0] Y0:Cb0:Y1:Cr1 16:16:16:16 little endian per 2 Y pixels */ >> + >> +/* >> + * packed Y4xx indicate for each component, xx valid data occupy msb >> + * 16-xx padding occupy lsb except Y410 >> + */ >> +#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') /* >> [31:0] X:V:Y:U 2:10:10:10 little endian */ >> +#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') /* >> [63:0] X:x:V:x:Y:x:U:x 12:4:12:4:12:4:12:4 little endian */ >> +#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6') /* >> [63:0] X:V:Y:U 16:16:16:16 little endian */ >> /* >> * packed YCbCr420 2x2 tiled formats >> -- ~Swati Sharma _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-01 8:32 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-13 13:25 [PATCH 0/6] Enable P0xx (planar), Y2xx/Y4xx (packed) pixel formats Swati Sharma 2019-02-13 13:25 ` Swati Sharma 2019-02-13 13:25 ` [PATCH 1/6] drm/i915: Add P010, P012, P016 plane control definitions Swati Sharma 2019-02-13 13:25 ` Swati Sharma 2019-02-13 13:25 ` [PATCH 2/6] drm/i915: Preparations for enabling P010, P012, P016 formats Swati Sharma 2019-02-13 13:25 ` Swati Sharma via dri-devel 2019-02-13 13:25 ` [PATCH 3/6] drm/i915: Enable P010, P012, P016 formats for primary and sprite planes Swati Sharma 2019-02-13 13:25 ` Swati Sharma via dri-devel 2019-02-13 13:25 ` [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc Swati Sharma 2019-02-13 13:25 ` Swati Sharma via dri-devel 2019-02-14 20:42 ` Juha-Pekka Heikkilä 2019-02-14 20:42 ` Juha-Pekka Heikkilä 2019-03-01 8:31 ` Sharma, Swati2 [this message] 2019-03-01 8:31 ` Sharma, Swati2 2019-02-13 13:25 ` [PATCH 5/6] drm/i915/icl: Add Y2xx and Y4xx (xx:10/12/16) plane control definitions Swati Sharma 2019-02-13 13:25 ` Swati Sharma 2019-02-13 13:25 ` [PATCH 6/6] drm/i915/icl: Enabling Y2xx and Y4xx (xx:10/12/16) formats for universal planes Swati Sharma 2019-02-13 13:25 ` Swati Sharma 2019-02-13 13:36 ` ✗ Fi.CI.CHECKPATCH: warning for Enable P0xx (planar), Y2xx/Y4xx (packed) pixel formats Patchwork 2019-02-13 13:40 ` ✗ Fi.CI.SPARSE: " Patchwork 2019-02-20 8:58 ` ✗ Fi.CI.CHECKPATCH: warning for Enable P0xx (planar), Y2xx/Y4xx (packed) pixel formats (rev2) Patchwork 2019-02-20 9:02 ` ✗ Fi.CI.SPARSE: " Patchwork 2019-02-20 9:24 ` ✓ Fi.CI.BAT: success " Patchwork 2019-02-20 11:05 ` ✓ Fi.CI.IGT: " Patchwork 2019-03-01 8:16 [PATCH 0/6] Enable P0xx (planar), Y2xx/Y4xx (packed) pixel formats swati2.sharma 2019-03-01 8:16 ` [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc swati2.sharma 2019-03-01 8:16 ` swati2.sharma 2019-03-04 11:56 [PATCH 0/6] Enable P0xx (planar), Y2xx/Y4xx (packed) pixel formats Swati Sharma 2019-03-04 11:56 ` [PATCH 4/6] drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc Swati Sharma
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=fe62b57c-dbc0-7516-8cd1-486b539eebdb@intel.com \ --to=swati2.sharma@intel.com \ --cc=ayaka@soulik.info \ --cc=ayan.halder@arm.com \ --cc=clinton.a.taylor@intel.com \ --cc=daniel.vetter@ffwll.ch \ --cc=daniel@fooishbar.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=juhapekka.heikkila@gmail.com \ --cc=linux-media@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=maxime.ripard@bootlin.com \ --cc=narmstrong@baylibre.com \ --cc=stanislav.lisovskiy@intel.com \ --cc=vidya.srinivas@intel.com \ --cc=ville.syrjala@linux.intel.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: linkBe 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.