Re: [PATCH v13 2/7] drm: Introduce RGB 64-bit 16:16:16:16 float format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 16, 2017 at 03:16:46AM +0000, Zhang, Tina wrote:
> 
> 
> > -----Original Message-----
> > From: Daniel Vetter [mailto:daniel.vetter@xxxxxxxx] On Behalf Of Daniel Vetter
> > Sent: Tuesday, August 15, 2017 10:50 PM
> > To: Zhang, Tina <tina.zhang@xxxxxxxxx>
> > Cc: intel-gfx@xxxxxxxxxxxxxxxxxxxxx; intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx; dri-
> > devel@xxxxxxxxxxxxxxxxxxxxx; ville.syrjala@xxxxxxxxxxxxxxx;
> > zhenyuw@xxxxxxxxxxxxxxx; Lv, Zhiyuan <zhiyuan.lv@xxxxxxxxx>; Wang, Zhi A
> > <zhi.a.wang@xxxxxxxxx>; alex.williamson@xxxxxxxxxx; kraxel@xxxxxxxxxx;
> > chris@xxxxxxxxxxxxxxxxxx; daniel@xxxxxxxx; kwankhede@xxxxxxxxxx; Tian, Kevin
> > <kevin.tian@xxxxxxxxx>; Chen, Xiaoguang <xiaoguang.chen@xxxxxxxxx>
> > Subject: Re: [PATCH v13 2/7] drm: Introduce RGB 64-bit 16:16:16:16 float
> > format
> > 
> > On Tue, Jul 25, 2017 at 05:28:15PM +0800, Tina Zhang wrote:
> > > The RGB 64-bit 16:16:16:16 float pixel format is needed by windows
> > > guest VM. This patch is to introduce the format to drm.
> > >
> > > v1:
> > > Suggested by Ville to submit this patch to dri-devel.
> > >
> > > Signed-off-by: Xiaoguang Chen <xiaoguang.chen@xxxxxxxxx>
> > > Signed-off-by: Tina Zhang <tina.zhang@xxxxxxxxx>
> > > ---
> > >  include/uapi/drm/drm_fourcc.h | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > >
> > > diff --git a/include/uapi/drm/drm_fourcc.h
> > > b/include/uapi/drm/drm_fourcc.h index 7586c46..3e002e3 100644
> > > --- a/include/uapi/drm/drm_fourcc.h
> > > +++ b/include/uapi/drm/drm_fourcc.h
> > > @@ -113,6 +113,10 @@ extern "C" {
> > >
> > >  #define DRM_FORMAT_AYUV		fourcc_code('A', 'Y', 'U', 'V') /* [31:0]
> > A:Y:Cb:Cr 8:8:8:8 little endian */
> > >
> > > +/* 64 bpp RGB */
> > > +#define DRM_FORMAT_XRGB161616  fourcc_code('X', 'R', '4', '8') /*
> > > +[63:0] x:R:G:B 16:16:16:16 little endian */ #define
> > > +DRM_FORMAT_XBGR161616  fourcc_code('X', 'B', '4', '8') /* [63:0]
> > > +x:B:G:R 16:16:16:16 little endian */
> > 
> > I think the comment should go a bit more into detail what the float format is
> > supposed to look like. And I think we should have a F or _FLOAT suffix to the
> > defined name, since the same layout could also work for integers (and some hw
> > somewhere probably has that. Maybe also put that F into the last slot of the
> > fourcc.
> Thanks. I prefer to add F and also put F into the last slot of the fourcc. 
> I'm not sure about the code rule. Does it make sense?
> #define	DRM_FORMAT_XRGB161616F fourcc_code('X', 'R', '3', 'F')
> Where '3' stands for the three fields (R, G, B) without Alpha.

Seems reasonable. There's not really any rules for fourcc codes, the only
semi-standard ones (and not even those are really standard) are only for
video formats. Best we can do is try to be somewhat consistent in
drm_fourcc.h.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux