diff mbox

libdrm/fourcc: Add formats R8, RG88, GR88

Message ID 1461252740-24606-1-git-send-email-dongseong.hwang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Hwang, Dongseong April 21, 2016, 3:32 p.m. UTC
Follow-up of kernel patch: https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html

The Kodi/XBMC and ChromeOS developers want to transcode NV12 to RGB
with OpenGL shaders, importing the two source planes through
EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an
R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage.

Cc: Rainer Hochecker <rainer.hochecker@onlinehome.de>
Cc: Benjamin Widawsky <benjamin.widawsky@intel.com>
CC: Chad Versace <chad.versace@intel.com>
Signed-off-by: Dongseong Hwang <dongseong.hwang@intel.com>
---
 include/drm/drm_fourcc.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Emil Velikov April 21, 2016, 4:02 p.m. UTC | #1
On 21 April 2016 at 16:32, Dongseong Hwang <dongseong.hwang@intel.com> wrote:
> Follow-up of kernel patch: https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
>
> The Kodi/XBMC and ChromeOS developers want to transcode NV12 to RGB
> with OpenGL shaders, importing the two source planes through
> EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an
> R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage.
>

Can we please add a note about the commit and tree where this is based on.
See how Danel Vetter has done it recently (barring the typo -s/fromd/from/).

Thank you !
Emil
Hwang, Dongseong April 21, 2016, 5:44 p.m. UTC | #2
Ok, I'll send new patch with the commit and tree.

Thanks and Regards,
Dongseong

On Thu, Apr 21, 2016 at 7:02 PM, Emil Velikov <emil.l.velikov@gmail.com>
wrote:

> On 21 April 2016 at 16:32, Dongseong Hwang <dongseong.hwang@intel.com>
> wrote:
> > Follow-up of kernel patch:
> https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
> >
> > The Kodi/XBMC and ChromeOS developers want to transcode NV12 to RGB
> > with OpenGL shaders, importing the two source planes through
> > EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an
> > R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage.
> >
>
> Can we please add a note about the commit and tree where this is based on.
> See how Danel Vetter has done it recently (barring the typo
> -s/fromd/from/).
>
> Thank you !
> Emil
>
Daniel Vetter April 22, 2016, 8:30 a.m. UTC | #3
On Thu, Apr 21, 2016 at 08:44:36PM +0300, Hwang, Dongseong wrote:
> Ok, I'll send new patch with the commit and tree.

You can't do that yet since the commit hasn't landed in upstream. Taking a
sha1 from your own tree is useless. My point of noting the sha1 is that it
must be from a non-rebasing tree which will land in Linus' tree, so that
in the future it can be found again.
-Daniel

> 
> Thanks and Regards,
> Dongseong
> 
> On Thu, Apr 21, 2016 at 7:02 PM, Emil Velikov <emil.l.velikov@gmail.com>
> wrote:
> 
> > On 21 April 2016 at 16:32, Dongseong Hwang <dongseong.hwang@intel.com>
> > wrote:
> > > Follow-up of kernel patch:
> > https://lists.freedesktop.org/archives/dri-devel/2015-July/086041.html
> > >
> > > The Kodi/XBMC and ChromeOS developers want to transcode NV12 to RGB
> > > with OpenGL shaders, importing the two source planes through
> > > EGL_EXT_image_dma_buf_import. That requires importing the Y plane as an
> > > R8 EGLImage and the UV plane as either an RG88 or GR88 EGLImage.
> > >
> >
> > Can we please add a note about the commit and tree where this is based on.
> > See how Danel Vetter has done it recently (barring the typo
> > -s/fromd/from/).
> >
> > Thank you !
> > Emil
> >

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/include/drm/drm_fourcc.h b/include/drm/drm_fourcc.h
index e741b09..ca2f488 100644
--- a/include/drm/drm_fourcc.h
+++ b/include/drm/drm_fourcc.h
@@ -34,6 +34,13 @@ 
 /* color index */
 #define DRM_FORMAT_C8		fourcc_code('C', '8', ' ', ' ') /* [7:0] C */
 
+/* 8 bpp Red */
+#define DRM_FORMAT_R8		fourcc_code('R', '8', ' ', ' ') /* [7:0] R */
+
+/* 16 bpp RG */
+#define DRM_FORMAT_RG88		fourcc_code('R', 'G', '8', '8') /* [15:0] R:G 8:8 little endian */
+#define DRM_FORMAT_GR88		fourcc_code('G', 'R', '8', '8') /* [15:0] G:R 8:8 little endian */
+
 /* 8 bpp RGB */
 #define DRM_FORMAT_RGB332	fourcc_code('R', 'G', 'B', '8') /* [7:0] R:G:B 3:3:2 */
 #define DRM_FORMAT_BGR233	fourcc_code('B', 'G', 'R', '8') /* [7:0] B:G:R 2:3:3 */