kms: Dmabuf Feedback support

This commit is contained in:
Victoria Brekenfeld 2023-03-09 17:39:47 +01:00
parent 486266f7bb
commit c8bb417d9b
8 changed files with 234 additions and 26 deletions

View file

@ -10,7 +10,10 @@ use smithay::{
calloop::RegistrationToken,
wayland_server::{backend::GlobalId, Client, DisplayHandle},
},
wayland::{dmabuf::DmabufGlobal, socket::ListeningSocketSource},
wayland::{
dmabuf::{DmabufFeedbackBuilder, DmabufGlobal},
socket::ListeningSocketSource,
},
xwayland::XWaylandClientData,
};
use std::sync::Arc;
@ -59,10 +62,14 @@ impl State {
false
};
let feedback = DmabufFeedbackBuilder::new(render_node.dev_id(), formats.clone())
.build()
.with_context(|| "Failed to create drm format shared memory table")?;
let dmabuf_global = self
.common
.dmabuf_state
.create_global_with_filter::<State, _>(dh, formats.clone(), filter);
.create_global_with_filter_and_default_feedback::<State, _>(dh, &feedback, filter);
let drm_global_id = self
.common