From 718a40b49c1aff55a7ec460c34dd8b8a7cc777a7 Mon Sep 17 00:00:00 2001 From: Tomohito Esaki Date: Wed, 31 Jan 2018 17:50:15 +0900 Subject: [PATCH] compositor-drm: store gbm bo flags in drm_output Store usage flags of gbm bo in drm_output in order to specify the bo format for each output. A following patch will add a new type of drm_output which requires different gbm_bo_flags. Signed-off-by: Tomohito Esaki --- libweston/compositor-drm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 37cc730f..2c1f6046 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -527,6 +527,7 @@ struct drm_output { struct gbm_surface *gbm_surface; uint32_t gbm_format; + uint32_t gbm_bo_flags; /* Plane being displayed directly on the CRTC */ struct drm_plane *scanout_plane; @@ -4876,7 +4877,7 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b) output->gbm_surface = gbm_surface_create(b->gbm, mode->width, mode->height, output->gbm_format, - GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT); + output->gbm_bo_flags); } if (!output->gbm_surface) { @@ -6325,6 +6326,7 @@ drm_output_create(struct weston_compositor *compositor, const char *name) return NULL; output->backend = b; + output->gbm_bo_flags = GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING; weston_output_init(&output->base, compositor, name);