compositor-drm: Fall back if GBM surface fails with modifiers

If we cannot create a gbm_surface using a list of modifiers, fall back
to using the old pre-modifier version.

This fixes initialisation on systems where KMS supports modifiers but
the GBM driver does not, such as old i915 systems like Pine View using
the unified KMS driver but the old i915 Mesa driver.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 6 years ago committed by Daniel Stone
parent 521056b37b
commit ee1d968e64
  1. 7
      libweston/compositor-drm.c

@ -5061,7 +5061,12 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
output->gbm_format, output->gbm_format,
plane->formats[i].modifiers, plane->formats[i].modifiers,
plane->formats[i].count_modifiers); plane->formats[i].count_modifiers);
} else }
/* If allocating with modifiers fails, try again without. This can
* happen when the KMS display device supports modifiers but the
* GBM driver does not, e.g. the old i915 Mesa driver. */
if (!output->gbm_surface)
#endif #endif
{ {
output->gbm_surface = output->gbm_surface =

Loading…
Cancel
Save