LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm: Introduce RGB 64-bit 16:16:16:16 float format
@ 2017-11-23 8:56 Tina Zhang
2017-11-23 8:56 ` Tina Zhang
0 siblings, 1 reply; 3+ messages in thread
From: Tina Zhang @ 2017-11-23 8:56 UTC (permalink / raw)
To: alex.williamson, kraxel, chris, joonas.lahtinen, zhenyuw,
zhiyuan.lv, zhi.a.wang, kevin.tian, daniel, hang.yuan
Cc: Tina Zhang, intel-gfx, intel-gvt-dev, linux-kernel, dri-devel
This patch is from "[PATCH v19 0/6] drm/i915/gvt: Dma-buf support for GVT-g":
https://lists.freedesktop.org/archives/intel-gvt-dev/2017-November/002508.html
The RGB 64-bit 16:16:16:16 float pixel format is needed by some Apps in
windows. The float format in each component is 1:5:10 MSb-sign:exponent:
fraction.
This patch is to introduce the format to drm, so that the windows guest's
framebuffer in this kind of format can be recognized and used by linux
host.
Tina Zhang (1):
drm: Introduce RGB 64-bit 16:16:16:16 float format
include/uapi/drm/drm_fourcc.h | 4 ++++
1 file changed, 4 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] drm: Introduce RGB 64-bit 16:16:16:16 float format
2017-11-23 8:56 [PATCH] drm: Introduce RGB 64-bit 16:16:16:16 float format Tina Zhang
@ 2017-11-23 8:56 ` Tina Zhang
2017-11-23 16:06 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Tina Zhang @ 2017-11-23 8:56 UTC (permalink / raw)
To: alex.williamson, kraxel, chris, joonas.lahtinen, zhenyuw,
zhiyuan.lv, zhi.a.wang, kevin.tian, daniel, hang.yuan
Cc: Tina Zhang, intel-gfx, intel-gvt-dev, linux-kernel, dri-devel,
Ville Syrjälä,
Dave Airlie, Daniel Vetter
The RGB 64-bit 16:16:16:16 float pixel format is needed by some Apps in
windows. The float format in each component is 1:5:10 MSb-sign:exponent:
fraction.
This patch is to introduce the format to drm, so that the windows guest's
framebuffer in this kind of format can be recognized and used by linux
host.
v14:
- add some details about the float pixel format. (Daniel)
- add F suffix to the defined name. (Daniel)
v12:
- send to dri-devel at lists.freedesktop.org. (Ville)
v9:
- separated from framebuffer decoder patch. (Zhenyu) (Xiaoguang)
Signed-off-by: Tina Zhang <tina.zhang@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
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 3ad838d..391d2e6 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 16:16:16:16 Floating Point */
+#define DRM_FORMAT_XRGB161616F fourcc_code('X', 'R', '3', 'F') /* [63:0] x:R:G:B 16:16:16:16 little endian */
+#define DRM_FORMAT_XBGR161616F fourcc_code('X', 'B', '3', 'F') /* [63:0] x:B:G:R 16:16:16:16 little endian */
+
/*
* 2 plane RGB + A
* index 0 = RGB plane, same format as the corresponding non _A8 format has
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm: Introduce RGB 64-bit 16:16:16:16 float format
2017-11-23 8:56 ` Tina Zhang
@ 2017-11-23 16:06 ` Ville Syrjälä
0 siblings, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2017-11-23 16:06 UTC (permalink / raw)
To: Tina Zhang
Cc: alex.williamson, kraxel, chris, joonas.lahtinen, zhenyuw,
zhiyuan.lv, zhi.a.wang, kevin.tian, daniel, hang.yuan, intel-gfx,
intel-gvt-dev, linux-kernel, dri-devel, Dave Airlie,
Daniel Vetter
On Thu, Nov 23, 2017 at 04:56:56PM +0800, Tina Zhang wrote:
> The RGB 64-bit 16:16:16:16 float pixel format is needed by some Apps in
> windows. The float format in each component is 1:5:10 MSb-sign:exponent:
> fraction.
>
> This patch is to introduce the format to drm, so that the windows guest's
> framebuffer in this kind of format can be recognized and used by linux
> host.
>
> v14:
> - add some details about the float pixel format. (Daniel)
> - add F suffix to the defined name. (Daniel)
>
> v12:
> - send to dri-devel at lists.freedesktop.org. (Ville)
>
> v9:
> - separated from framebuffer decoder patch. (Zhenyu) (Xiaoguang)
>
> Signed-off-by: Tina Zhang <tina.zhang@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> 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 3ad838d..391d2e6 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 16:16:16:16 Floating Point */
As before this is still extremely vague. Stating that each component is
a IEEE-754 half-precision float (binary16) should cover it. Well, assuming
that it really is one.
> +#define DRM_FORMAT_XRGB161616F fourcc_code('X', 'R', '3', 'F') /* [63:0] x:R:G:B 16:16:16:16 little endian */
> +#define DRM_FORMAT_XBGR161616F fourcc_code('X', 'B', '3', 'F') /* [63:0] x:B:G:R 16:16:16:16 little endian */
Missing one 16 from that name to be consistent with the non-float stuff.
Also maybe it should be (... '4', 'F')? '3' would seem to imply a 48 bit
pixel.
And of course it's still missing the actual implemntation for any driver.
> +
> /*
> * 2 plane RGB + A
> * index 0 = RGB plane, same format as the corresponding non _A8 format has
> --
> 2.7.4
--
Ville Syrjälä
Intel OTC
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-23 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-23 8:56 [PATCH] drm: Introduce RGB 64-bit 16:16:16:16 float format Tina Zhang
2017-11-23 8:56 ` Tina Zhang
2017-11-23 16:06 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).