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>
This commit is contained in:
Daniel Stone 2019-01-31 00:02:25 +00:00 committed by Daniel Stone
parent 521056b37b
commit ee1d968e64

View File

@ -5061,7 +5061,12 @@ drm_output_init_egl(struct drm_output *output, struct drm_backend *b)
output->gbm_format,
plane->formats[i].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
{
output->gbm_surface =