From 6f8d8b17a1e25361881dfa4f91a43c1c04b029f9 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 16 Jun 2017 10:28:03 +0100 Subject: gbm: Axe buffer import format conversion table Wayland buffers coming from wl_drm use the WL_DRM_FORMAT_* enums, which are identical to GBM_FORMAT_*. Similarly, FD imports do not need to convert between GBM and DRI FourCC, since they are (almost) completely compatible. This widens the formats accepted by gbm_bo_import() when importing wl_buffers; previously, only XRGB8888, ARGB8888, RGB565 and YUYV were supported. Reviewed-by: Emil Velikov --- src/gbm/main/gbm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gbm/main') diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 6a9bf1fc2a8..879f003f1b4 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -77,6 +77,12 @@ enum gbm_bo_format { GBM_BO_FORMAT_ARGB8888 }; + +/** + * The FourCC format codes are taken from the drm_fourcc.h definition, and + * re-namespaced. New GBM formats must not be added, unless they are + * identical ports from drm_fourcc. + */ #define __gbm_fourcc_code(a,b,c,d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \ ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24)) -- cgit v1.2.3