diff options
author | Daniel Stone <daniels@collabora.com> | 2019-01-31 00:02:25 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2019-02-16 11:05:40 +0000 |
commit | ee1d968e641ecd0aa672faafcdb37a780cb96ef0 (patch) | |
tree | eb82c4596362abf98a364d6a53b87636f1fabaec | |
parent | 521056b37b674ef0a7b66017c8bc7c429f1a42d1 (diff) | |
download | weston-ee1d968e641ecd0aa672faafcdb37a780cb96ef0.tar.gz |
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>
-rw-r--r-- | libweston/compositor-drm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index 54230ecc..a5de6611 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -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 = |