Skip to content
Commit 244244d1 authored by Daniel Stone's avatar Daniel Stone
Browse files

compositor-drm: Use GBM modifier API



Now that we collect information about which modifiers are supported for
KMS display, and are able to create KMS framebuffers with modifiers,
begin using the modifier-aware GBM API.

Client buffers from dmabuf already store multi-plane and modifier
information into drm_fb. Extend this to drm_fb_get_from_bo(), used for
wl_buffer, cursor, and gbm_surface buffers. wl_buffer buffers should by
convention not require modifiers. Cursor buffers must not require
modifiers, as they should be linear. Prior to this patch, GBM buffers
must have been single-planar, and able to used without explicitly naming
modifiers.

Using gbm_surface_create_with_modifiers allows us to pass the list of
modifiers acceptable to KMS for scanout to GBM, so it can allocate
multi-planar buffers or those which are otherwise only addressible with
modifiers. On platforms supporting and preferring modifiers for scanout,
this means that the gbm_bos we get from our scanout surface need to use
the extended API to query multiple planes, offsets, modifiers, etc.

Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
Reviewed-by: default avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tested-by: default avatarEmre Ucan <eucan@de.adit-jv.com>
parent f4456221
Loading
Loading
Loading
Pipeline #2064 passed with stage
in 3 minutes and 5 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment