mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-06 18:05:39 +00:00
backend-drm: fix slightly wrong comment about allocating with no modifiers
In create_gbm_surface() we may allocate with no modifiers in the following situations: 1. old GBM version, so HAVE_GBM_MODIFIERS is false; 2. the KMS driver does not support modifiers; 3. if allocating with modifiers failed, what can happen when the KMS display device supports modifiers but the GBM driver does not, e.g. the old i915 Mesa driver. The comment was only stating the third situation, so add the other two. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
This commit is contained in:
parent
3459bad63d
commit
f767302729
|
@ -205,9 +205,14 @@ create_gbm_surface(struct gbm_device *gbm, struct drm_output *output)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* 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. */
|
||||
/* We may allocate with no modifiers in the following situations:
|
||||
*
|
||||
* 1. old GBM version, so HAVE_GBM_MODIFIERS is false;
|
||||
* 2. the KMS driver does not support modifiers;
|
||||
* 3. if allocating with modifiers failed, what 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)
|
||||
output->gbm_surface = gbm_surface_create(gbm,
|
||||
mode->width, mode->height,
|
||||
|
|
Loading…
Reference in a new issue