Message ID | 1488708033-5691-2-git-send-email-ayaka@soulik.info (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from <linux-media-owner@vger.kernel.org>) id 1ckSyx-0001QL-HP; Sun, 05 Mar 2017 10:01:39 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.84_2/mailfrontend-8) with esmtp id 1ckSyv-00012r-kU; Sun, 05 Mar 2017 11:01:39 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752396AbdCEKBA (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sun, 5 Mar 2017 05:01:00 -0500 Received: from kozue.soulik.info ([108.61.200.231]:39134 "EHLO kozue.soulik.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751197AbdCEKAp (ORCPT <rfc822; linux-media@vger.kernel.org>); Sun, 5 Mar 2017 05:00:45 -0500 Received: from misaki.sumomo.pri (unknown [IPv6:2001:470:b30d:2:3fe5:5e2:ef97:4abb]) by kozue.soulik.info (Postfix) with ESMTPA id C12A21012BA; Sun, 5 Mar 2017 19:01:08 +0900 (JST) From: Randy Li <ayaka@soulik.info> To: dri-devel@lists.freedesktop.org Cc: clinton.a.taylor@intel.com, daniel@fooishbar.org, ville.syrjala@linux.intel.com, linux-media@vger.kernel.org, mchehab@kernel.org, linux-kernel@vger.kernel.org, Randy Li <ayaka@soulik.info> Subject: [PATCH v6 1/3] drm_fourcc: Add new P010, P016 video format Date: Sun, 5 Mar 2017 18:00:31 +0800 Message-Id: <1488708033-5691-2-git-send-email-ayaka@soulik.info> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488708033-5691-1-git-send-email-ayaka@soulik.info> References: <1488708033-5691-1-git-send-email-ayaka@soulik.info> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.3.5.95118 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, INFO_TLD 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __CC_NAME 0, __CC_NAME_DIFF_FROM_ACC 0, __CC_REAL_NAMES 0, __CP_MEDIA_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DATE_TZ_HK 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __HIGHBITS 0, __INFO_FROM 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Randy Li
March 5, 2017, 10 a.m. UTC
P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel video format. P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel video format. V3: Added P012 and fixed cpp for P010 V4: format definition refined per review V5: Format comment block for each new pixel format V6: reversed Cb/Cr order in comments v7: reversed Cb/Cr order in comments of header files, remove the wrong part of commit message. Cc: Daniel Stone <daniel@fooishbar.org> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Randy Li <ayaka@soulik.info> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> --- drivers/gpu/drm/drm_fourcc.c | 3 +++ include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ 2 files changed, 24 insertions(+)
Comments
On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: > P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits > per channel video format. > > P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits > per channel video format. > > V3: Added P012 and fixed cpp for P010 > V4: format definition refined per review > V5: Format comment block for each new pixel format > V6: reversed Cb/Cr order in comments > v7: reversed Cb/Cr order in comments of header files, remove > the wrong part of commit message. What? Why? You just undid what Clint did in v6. > > Cc: Daniel Stone <daniel@fooishbar.org> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Signed-off-by: Randy Li <ayaka@soulik.info> > Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> > --- > drivers/gpu/drm/drm_fourcc.c | 3 +++ > include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ > 2 files changed, 24 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > index 90d2cc8..3e0fd58 100644 > --- a/drivers/gpu/drm/drm_fourcc.c > +++ b/drivers/gpu/drm/drm_fourcc.c > @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) > { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, > + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > }; > > unsigned int i; > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > index ef20abb..306f979 100644 > --- a/include/uapi/drm/drm_fourcc.h > +++ b/include/uapi/drm/drm_fourcc.h > @@ -128,6 +128,27 @@ extern "C" { > #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ > > /* > + * 2 plane YCbCr MSB aligned > + * index 0 = Y plane, [15:0] Y:x [10:6] little endian > + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian > + */ > +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ > + > +/* > + * 2 plane YCbCr MSB aligned > + * index 0 = Y plane, [15:0] Y:x [12:4] little endian > + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian > + */ > +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ > + > +/* > + * 2 plane YCbCr MSB aligned > + * index 0 = Y plane, [15:0] Y little endian > + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian > + */ > +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ > + > +/* > * 3 plane YCbCr > * index 0: Y plane, [7:0] Y > * index 1: Cb plane, [7:0] Cb > -- > 2.7.4
??? iPad ?? > Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? > >> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: >> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits >> per channel video format. >> >> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits >> per channel video format. >> >> V3: Added P012 and fixed cpp for P010 >> V4: format definition refined per review >> V5: Format comment block for each new pixel format >> V6: reversed Cb/Cr order in comments >> v7: reversed Cb/Cr order in comments of header files, remove >> the wrong part of commit message. > > What? Why? You just undid what Clint did in v6. He missed a file also keeping the wrong description of rockchip. > >> >> Cc: Daniel Stone <daniel@fooishbar.org> >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >> >> Signed-off-by: Randy Li <ayaka@soulik.info> >> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> >> --- >> drivers/gpu/drm/drm_fourcc.c | 3 +++ >> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ >> 2 files changed, 24 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >> index 90d2cc8..3e0fd58 100644 >> --- a/drivers/gpu/drm/drm_fourcc.c >> +++ b/drivers/gpu/drm/drm_fourcc.c >> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) >> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, >> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >> }; >> >> unsigned int i; >> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >> index ef20abb..306f979 100644 >> --- a/include/uapi/drm/drm_fourcc.h >> +++ b/include/uapi/drm/drm_fourcc.h >> @@ -128,6 +128,27 @@ extern "C" { >> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ >> >> /* >> + * 2 plane YCbCr MSB aligned >> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian >> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian >> + */ >> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ >> + >> +/* >> + * 2 plane YCbCr MSB aligned >> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian >> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian >> + */ >> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ >> + >> +/* >> + * 2 plane YCbCr MSB aligned >> + * index 0 = Y plane, [15:0] Y little endian >> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian >> + */ >> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ >> + >> +/* >> * 3 plane YCbCr >> * index 0: Y plane, [7:0] Y >> * index 1: Cb plane, [7:0] Cb >> -- >> 2.7.4 > > -- > Ville Syrjälä > Intel OTC
On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: > > > ??? iPad ?? > > > Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? > > > >> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: > >> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits > >> per channel video format. > >> > >> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits > >> per channel video format. > >> > >> V3: Added P012 and fixed cpp for P010 > >> V4: format definition refined per review > >> V5: Format comment block for each new pixel format > >> V6: reversed Cb/Cr order in comments > >> v7: reversed Cb/Cr order in comments of header files, remove > >> the wrong part of commit message. > > > > What? Why? You just undid what Clint did in v6. > He missed a file also keeping the wrong description of rockchip. I don't follow. Who missed what exactly? > > > >> > >> Cc: Daniel Stone <daniel@fooishbar.org> > >> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > >> > >> Signed-off-by: Randy Li <ayaka@soulik.info> > >> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> > >> --- > >> drivers/gpu/drm/drm_fourcc.c | 3 +++ > >> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ > >> 2 files changed, 24 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > >> index 90d2cc8..3e0fd58 100644 > >> --- a/drivers/gpu/drm/drm_fourcc.c > >> +++ b/drivers/gpu/drm/drm_fourcc.c > >> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) > >> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > >> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > >> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, > >> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > >> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > >> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > >> }; > >> > >> unsigned int i; > >> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > >> index ef20abb..306f979 100644 > >> --- a/include/uapi/drm/drm_fourcc.h > >> +++ b/include/uapi/drm/drm_fourcc.h > >> @@ -128,6 +128,27 @@ extern "C" { > >> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ > >> > >> /* > >> + * 2 plane YCbCr MSB aligned > >> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian > >> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian > >> + */ > >> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ > >> + > >> +/* > >> + * 2 plane YCbCr MSB aligned > >> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian > >> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian > >> + */ > >> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ > >> + > >> +/* > >> + * 2 plane YCbCr MSB aligned > >> + * index 0 = Y plane, [15:0] Y little endian > >> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian > >> + */ > >> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ > >> + > >> +/* > >> * 3 plane YCbCr > >> * index 0: Y plane, [7:0] Y > >> * index 1: Cb plane, [7:0] Cb > >> -- > >> 2.7.4 > > > > -- > > Ville Syrjälä > > Intel OTC
??? iPad ?? > Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?7? ??2:34 ??? > >> On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: >> >> >> ??? iPad ?? >> >>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? >>>> >>>> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: >>>> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits >>>> per channel video format. >>>> >>>> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits >>>> per channel video format. >>>> >>>> V3: Added P012 and fixed cpp for P010 >>>> V4: format definition refined per review >>>> V5: Format comment block for each new pixel format >>>> V6: reversed Cb/Cr order in comments >>>> v7: reversed Cb/Cr order in comments of header files, remove >>>> the wrong part of commit message. >>> >>> What? Why? You just undid what Clint did in v6. >> He missed a file also keeping the wrong description of rockchip. > > I don't follow. Who missed what exactly? What he sent is v5, I increase the order number twice in the message, it confuse me as well. I think Clint forgot the include/uapi/drm/drm_fourcc.h . > > >>> >>>> >>>> Cc: Daniel Stone <daniel@fooishbar.org> >>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >>>> >>>> Signed-off-by: Randy Li <ayaka@soulik.info> >>>> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> >>>> --- >>>> drivers/gpu/drm/drm_fourcc.c | 3 +++ >>>> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ >>>> 2 files changed, 24 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >>>> index 90d2cc8..3e0fd58 100644 >>>> --- a/drivers/gpu/drm/drm_fourcc.c >>>> +++ b/drivers/gpu/drm/drm_fourcc.c >>>> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) >>>> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, >>>> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>> }; >>>> >>>> unsigned int i; >>>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >>>> index ef20abb..306f979 100644 >>>> --- a/include/uapi/drm/drm_fourcc.h >>>> +++ b/include/uapi/drm/drm_fourcc.h >>>> @@ -128,6 +128,27 @@ extern "C" { >>>> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ >>>> >>>> /* >>>> + * 2 plane YCbCr MSB aligned >>>> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian >>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian >>>> + */ >>>> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ >>>> + >>>> +/* >>>> + * 2 plane YCbCr MSB aligned >>>> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian >>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian >>>> + */ >>>> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ >>>> + >>>> +/* >>>> + * 2 plane YCbCr MSB aligned >>>> + * index 0 = Y plane, [15:0] Y little endian >>>> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian >>>> + */ >>>> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ >>>> + >>>> +/* >>>> * 3 plane YCbCr >>>> * index 0: Y plane, [7:0] Y >>>> * index 1: Cb plane, [7:0] Cb >>>> -- >>>> 2.7.4 >>> >>> -- >>> Ville Syrjälä >>> Intel OTC > > -- > Ville Syrjälä > Intel OTC
On Tue, 2017-03-07 at 04:27 +0800, Ayaka wrote: > > ??? iPad ?? > > > Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?7? ??2:34 ??? > > > > > On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: > > > > > > > > > ??? iPad ?? > > > > > > > > Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? > > > > > > > > > > On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: > > > > > P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits > > > > > per channel video format. > > > > > > > > > > P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits > > > > > per channel video format. > > > > > > > > > > V3: Added P012 and fixed cpp for P010 > > > > > V4: format definition refined per review > > > > > V5: Format comment block for each new pixel format > > > > > V6: reversed Cb/Cr order in comments > > > > > v7: reversed Cb/Cr order in comments of header files, remove > > > > > the wrong part of commit message. > > > > > > > > What? Why? You just undid what Clint did in v6. > > > > > > He missed a file also keeping the wrong description of rockchip. > > > > I don't follow. Who missed what exactly? > > What he sent is v5, I increase the order number twice in the message, it confuse me as well. > I think Clint forgot the include/uapi/drm/drm_fourcc.h . Clint did send a v6, and that updates "include/uapi/drm/drm_fourcc.h": https://patchwork.freedesktop.org/patch/141342/ Ander > > > > > > > > > > > > > > > > > > Cc: Daniel Stone <daniel@fooishbar.org> > > > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > > > > > > > Signed-off-by: Randy Li <ayaka@soulik.info> > > > > > Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> > > > > > --- > > > > > drivers/gpu/drm/drm_fourcc.c | 3 +++ > > > > > include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ > > > > > 2 files changed, 24 insertions(+) > > > > > > > > > > diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c > > > > > index 90d2cc8..3e0fd58 100644 > > > > > --- a/drivers/gpu/drm/drm_fourcc.c > > > > > +++ b/drivers/gpu/drm/drm_fourcc.c > > > > > @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) > > > > > { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > > > > > { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, > > > > > { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, > > > > > + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > > > > > + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > > > > > + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, > > > > > }; > > > > > > > > > > unsigned int i; > > > > > diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h > > > > > index ef20abb..306f979 100644 > > > > > --- a/include/uapi/drm/drm_fourcc.h > > > > > +++ b/include/uapi/drm/drm_fourcc.h > > > > > @@ -128,6 +128,27 @@ extern "C" { > > > > > #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ > > > > > > > > > > /* > > > > > + * 2 plane YCbCr MSB aligned > > > > > + * index 0 = Y plane, [15:0] Y:x [10:6] little endian > > > > > + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian > > > > > + */ > > > > > +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ > > > > > + > > > > > +/* > > > > > + * 2 plane YCbCr MSB aligned > > > > > + * index 0 = Y plane, [15:0] Y:x [12:4] little endian > > > > > + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian > > > > > + */ > > > > > +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ > > > > > + > > > > > +/* > > > > > + * 2 plane YCbCr MSB aligned > > > > > + * index 0 = Y plane, [15:0] Y little endian > > > > > + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian > > > > > + */ > > > > > +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ > > > > > + > > > > > +/* > > > > > * 3 plane YCbCr > > > > > * index 0: Y plane, [7:0] Y > > > > > * index 1: Cb plane, [7:0] Cb > > > > > -- > > > > > 2.7.4 > > > > > > > > -- > > > > Ville Syrjälä > > > > Intel OTC > > > > -- > > Ville Syrjälä > > Intel OTC > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
??? iPad ?? > Ander Conselvan De Oliveira <conselvan2@gmail.com> ? 2017?3?14? ??9:53 ??? > >> On Tue, 2017-03-07 at 04:27 +0800, Ayaka wrote: >> >> ??? iPad ?? >> >>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?7? ??2:34 ??? >>>> >>>> On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: >>>> >>>> >>>> ??? iPad ?? >>>> >>>>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? >>>>>> >>>>>> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: >>>>>> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits >>>>>> per channel video format. >>>>>> >>>>>> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits >>>>>> per channel video format. >>>>>> >>>>>> V3: Added P012 and fixed cpp for P010 >>>>>> V4: format definition refined per review >>>>>> V5: Format comment block for each new pixel format >>>>>> V6: reversed Cb/Cr order in comments >>>>>> v7: reversed Cb/Cr order in comments of header files, remove >>>>>> the wrong part of commit message. >>>>> >>>>> What? Why? You just undid what Clint did in v6. >>>> >>>> He missed a file also keeping the wrong description of rockchip. >>> >>> I don't follow. Who missed what exactly? >> >> What he sent is v5, I increase the order number twice in the message, it confuse me as well. >> I think Clint forgot the include/uapi/drm/drm_fourcc.h . > > Clint did send a v6, and that updates "include/uapi/drm/drm_fourcc.h": > > https://patchwork.freedesktop.org/patch/141342/ Oh, yes but he still used Cr:Cb, but I think it should be Cb:Cr since I think the V is after the U. > > > Ander > >>> >>> >>>>> >>>>>> >>>>>> Cc: Daniel Stone <daniel@fooishbar.org> >>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >>>>>> >>>>>> Signed-off-by: Randy Li <ayaka@soulik.info> >>>>>> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> >>>>>> --- >>>>>> drivers/gpu/drm/drm_fourcc.c | 3 +++ >>>>>> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ >>>>>> 2 files changed, 24 insertions(+) >>>>>> >>>>>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >>>>>> index 90d2cc8..3e0fd58 100644 >>>>>> --- a/drivers/gpu/drm/drm_fourcc.c >>>>>> +++ b/drivers/gpu/drm/drm_fourcc.c >>>>>> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) >>>>>> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, >>>>>> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>> }; >>>>>> >>>>>> unsigned int i; >>>>>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >>>>>> index ef20abb..306f979 100644 >>>>>> --- a/include/uapi/drm/drm_fourcc.h >>>>>> +++ b/include/uapi/drm/drm_fourcc.h >>>>>> @@ -128,6 +128,27 @@ extern "C" { >>>>>> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ >>>>>> >>>>>> /* >>>>>> + * 2 plane YCbCr MSB aligned >>>>>> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian >>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian >>>>>> + */ >>>>>> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ >>>>>> + >>>>>> +/* >>>>>> + * 2 plane YCbCr MSB aligned >>>>>> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian >>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian >>>>>> + */ >>>>>> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ >>>>>> + >>>>>> +/* >>>>>> + * 2 plane YCbCr MSB aligned >>>>>> + * index 0 = Y plane, [15:0] Y little endian >>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian >>>>>> + */ >>>>>> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ >>>>>> + >>>>>> +/* >>>>>> * 3 plane YCbCr >>>>>> * index 0: Y plane, [7:0] Y >>>>>> * index 1: Cb plane, [7:0] Cb >>>>>> -- >>>>>> 2.7.4 >>>>> >>>>> -- >>>>> Ville Syrjälä >>>>> Intel OTC >>> >>> -- >>> Ville Syrjälä >>> Intel OTC >> >> _______________________________________________ >> dri-devel mailing list >> dri-devel@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/dri-devel
On 03/26/2017 09:05 PM, Ayaka wrote: > > > ??? iPad ?? > >> Ander Conselvan De Oliveira <conselvan2@gmail.com> ? 2017?3?14? ??9:53 ??? >> >>> On Tue, 2017-03-07 at 04:27 +0800, Ayaka wrote: >>> >>> ??? iPad ?? >>> >>>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?7? ??2:34 ??? >>>>> >>>>> On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: >>>>> >>>>> >>>>> ??? iPad ?? >>>>> >>>>>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? >>>>>>> >>>>>>> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: >>>>>>> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits >>>>>>> per channel video format. >>>>>>> >>>>>>> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits >>>>>>> per channel video format. >>>>>>> >>>>>>> V3: Added P012 and fixed cpp for P010 >>>>>>> V4: format definition refined per review >>>>>>> V5: Format comment block for each new pixel format >>>>>>> V6: reversed Cb/Cr order in comments >>>>>>> v7: reversed Cb/Cr order in comments of header files, remove >>>>>>> the wrong part of commit message. >>>>>> >>>>>> What? Why? You just undid what Clint did in v6. >>>>> >>>>> He missed a file also keeping the wrong description of rockchip. >>>> >>>> I don't follow. Who missed what exactly? >>> >>> What he sent is v5, I increase the order number twice in the message, it confuse me as well. >>> I think Clint forgot the include/uapi/drm/drm_fourcc.h . >> >> Clint did send a v6, and that updates "include/uapi/drm/drm_fourcc.h": >> >> https://patchwork.freedesktop.org/patch/141342/ > Oh, yes but he still used Cr:Cb, but I think it should be Cb:Cr > since I think the V is after the U. From the MSDN fourcc website: "If the combined U-V array is addressed as an array of DWORDs, the least significant word (LSW) contains the U value and the most significant word (MSW) contains the V value. The stride of the combined U-V plane is equal to the stride of the Y plane. The U-V plane has half as many lines as the Y plane." The LSW contains U and the MSW contains V, hence the Cr:Cb in the comments of the V6 patch. -Clint >> >> >> Ander >> >>>> >>>> >>>>>> >>>>>>> >>>>>>> Cc: Daniel Stone <daniel@fooishbar.org> >>>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >>>>>>> >>>>>>> Signed-off-by: Randy Li <ayaka@soulik.info> >>>>>>> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> >>>>>>> --- >>>>>>> drivers/gpu/drm/drm_fourcc.c | 3 +++ >>>>>>> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ >>>>>>> 2 files changed, 24 insertions(+) >>>>>>> >>>>>>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >>>>>>> index 90d2cc8..3e0fd58 100644 >>>>>>> --- a/drivers/gpu/drm/drm_fourcc.c >>>>>>> +++ b/drivers/gpu/drm/drm_fourcc.c >>>>>>> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) >>>>>>> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>>> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>>> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, >>>>>>> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>> }; >>>>>>> >>>>>>> unsigned int i; >>>>>>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >>>>>>> index ef20abb..306f979 100644 >>>>>>> --- a/include/uapi/drm/drm_fourcc.h >>>>>>> +++ b/include/uapi/drm/drm_fourcc.h >>>>>>> @@ -128,6 +128,27 @@ extern "C" { >>>>>>> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ >>>>>>> >>>>>>> /* >>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian >>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian >>>>>>> + */ >>>>>>> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ >>>>>>> + >>>>>>> +/* >>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian >>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian >>>>>>> + */ >>>>>>> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ >>>>>>> + >>>>>>> +/* >>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>> + * index 0 = Y plane, [15:0] Y little endian >>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian >>>>>>> + */ >>>>>>> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ >>>>>>> + >>>>>>> +/* >>>>>>> * 3 plane YCbCr >>>>>>> * index 0: Y plane, [7:0] Y >>>>>>> * index 1: Cb plane, [7:0] Cb >>>>>>> -- >>>>>>> 2.7.4 >>>>>> >>>>>> -- >>>>>> Ville Syrjälä >>>>>> Intel OTC >>>> >>>> -- >>>> Ville Syrjälä >>>> Intel OTC >>> >>> _______________________________________________ >>> dri-devel mailing list >>> dri-devel@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/dri-devel >
??? iPad ?? > Clint Taylor <clinton.a.taylor@intel.com> ? 2017?3?28? ??6:49 ??? > >> On 03/26/2017 09:05 PM, Ayaka wrote: >> >> >> ??? iPad ?? >> >>>> Ander Conselvan De Oliveira <conselvan2@gmail.com> ? 2017?3?14? ??9:53 ??? >>>> >>>> On Tue, 2017-03-07 at 04:27 +0800, Ayaka wrote: >>>> >>>> ??? iPad ?? >>>> >>>>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?7? ??2:34 ??? >>>>>> >>>>>> On Tue, Mar 07, 2017 at 01:58:23AM +0800, Ayaka wrote: >>>>>> >>>>>> >>>>>> ??? iPad ?? >>>>>> >>>>>>>> Ville Syrjälä <ville.syrjala@linux.intel.com> ? 2017?3?6? ??9:06 ??? >>>>>>>> >>>>>>>> On Sun, Mar 05, 2017 at 06:00:31PM +0800, Randy Li wrote: >>>>>>>> P010 is a planar 4:2:0 YUV with interleaved UV plane, 10 bits >>>>>>>> per channel video format. >>>>>>>> >>>>>>>> P016 is a planar 4:2:0 YUV with interleaved UV plane, 16 bits >>>>>>>> per channel video format. >>>>>>>> >>>>>>>> V3: Added P012 and fixed cpp for P010 >>>>>>>> V4: format definition refined per review >>>>>>>> V5: Format comment block for each new pixel format >>>>>>>> V6: reversed Cb/Cr order in comments >>>>>>>> v7: reversed Cb/Cr order in comments of header files, remove >>>>>>>> the wrong part of commit message. >>>>>>> >>>>>>> What? Why? You just undid what Clint did in v6. >>>>>> >>>>>> He missed a file also keeping the wrong description of rockchip. >>>>> >>>>> I don't follow. Who missed what exactly? >>>> >>>> What he sent is v5, I increase the order number twice in the message, it confuse me as well. >>>> I think Clint forgot the include/uapi/drm/drm_fourcc.h . >>> >>> Clint did send a v6, and that updates "include/uapi/drm/drm_fourcc.h": >>> >>> https://patchwork.freedesktop.org/patch/141342/ >> Oh, yes but he still used Cr:Cb, but I think it should be Cb:Cr >> since I think the V is after the U. > > From the MSDN fourcc website: > "If the combined U-V array is addressed as an array of DWORDs, the least significant word (LSW) contains the U value and the most significant word (MSW) contains the V value. The stride of the combined U-V plane is equal to the stride of the Y plane. The U-V plane has half as many lines as the Y plane." > > The LSW contains U and the MSW contains V, hence the Cr:Cb in the comments of the V6 patch. > > -Clint ok it is correct. I think I mistake it that is why my converter for gstreamer doesn't work > >>> >>> >>> Ander >>> >>>>> >>>>> >>>>>>> >>>>>>>> >>>>>>>> Cc: Daniel Stone <daniel@fooishbar.org> >>>>>>>> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> >>>>>>>> >>>>>>>> Signed-off-by: Randy Li <ayaka@soulik.info> >>>>>>>> Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com> >>>>>>>> --- >>>>>>>> drivers/gpu/drm/drm_fourcc.c | 3 +++ >>>>>>>> include/uapi/drm/drm_fourcc.h | 21 +++++++++++++++++++++ >>>>>>>> 2 files changed, 24 insertions(+) >>>>>>>> >>>>>>>> diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c >>>>>>>> index 90d2cc8..3e0fd58 100644 >>>>>>>> --- a/drivers/gpu/drm/drm_fourcc.c >>>>>>>> +++ b/drivers/gpu/drm/drm_fourcc.c >>>>>>>> @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) >>>>>>>> { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>>>> { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, >>>>>>>> { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, >>>>>>>> + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>>> + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>>> + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, >>>>>>>> }; >>>>>>>> >>>>>>>> unsigned int i; >>>>>>>> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h >>>>>>>> index ef20abb..306f979 100644 >>>>>>>> --- a/include/uapi/drm/drm_fourcc.h >>>>>>>> +++ b/include/uapi/drm/drm_fourcc.h >>>>>>>> @@ -128,6 +128,27 @@ extern "C" { >>>>>>>> #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ >>>>>>>> >>>>>>>> /* >>>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>>> + * index 0 = Y plane, [15:0] Y:x [10:6] little endian >>>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian >>>>>>>> + */ >>>>>>>> +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ >>>>>>>> + >>>>>>>> +/* >>>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>>> + * index 0 = Y plane, [15:0] Y:x [12:4] little endian >>>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian >>>>>>>> + */ >>>>>>>> +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ >>>>>>>> + >>>>>>>> +/* >>>>>>>> + * 2 plane YCbCr MSB aligned >>>>>>>> + * index 0 = Y plane, [15:0] Y little endian >>>>>>>> + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian >>>>>>>> + */ >>>>>>>> +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ >>>>>>>> + >>>>>>>> +/* >>>>>>>> * 3 plane YCbCr >>>>>>>> * index 0: Y plane, [7:0] Y >>>>>>>> * index 1: Cb plane, [7:0] Cb >>>>>>>> -- >>>>>>>> 2.7.4 >>>>>>> >>>>>>> -- >>>>>>> Ville Syrjälä >>>>>>> Intel OTC >>>>> >>>>> -- >>>>> Ville Syrjälä >>>>> Intel OTC >>>> >>>> _______________________________________________ >>>> dri-devel mailing list >>>> dri-devel@lists.freedesktop.org >>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel >>
diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 90d2cc8..3e0fd58 100644 --- a/drivers/gpu/drm/drm_fourcc.c +++ b/drivers/gpu/drm/drm_fourcc.c @@ -165,6 +165,9 @@ const struct drm_format_info *__drm_format_info(u32 format) { .format = DRM_FORMAT_UYVY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_VYUY, .depth = 0, .num_planes = 1, .cpp = { 2, 0, 0 }, .hsub = 2, .vsub = 1 }, { .format = DRM_FORMAT_AYUV, .depth = 0, .num_planes = 1, .cpp = { 4, 0, 0 }, .hsub = 1, .vsub = 1 }, + { .format = DRM_FORMAT_P010, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_P012, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, + { .format = DRM_FORMAT_P016, .depth = 0, .num_planes = 2, .cpp = { 2, 4, 0 }, .hsub = 2, .vsub = 2 }, }; unsigned int i; diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index ef20abb..306f979 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -128,6 +128,27 @@ extern "C" { #define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */ /* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y:x [10:6] little endian + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [10:6:10:6] little endian + */ +#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') /* 2x2 subsampled Cb:Cr plane 10 bits per channel */ + +/* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y:x [12:4] little endian + * index 1 = Cb:Cr plane, [31:0] Cb:x:Cr:x [12:4:12:4] little endian + */ +#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') /* 2x2 subsampled Cb:Cr plane 12 bits per channel */ + +/* + * 2 plane YCbCr MSB aligned + * index 0 = Y plane, [15:0] Y little endian + * index 1 = Cb:Cr plane, [31:0] Cb:Cr [16:16] little endian + */ +#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cb:Cr plane 16 bits per channel */ + +/* * 3 plane YCbCr * index 0: Y plane, [7:0] Y * index 1: Cb plane, [7:0] Cb