kms: Don't attempt dmabuf import on software devices
This commit is contained in:
parent
70cd1842c1
commit
cad5ed8945
1 changed files with 11 additions and 10 deletions
|
|
@ -437,16 +437,17 @@ impl KmsState {
|
|||
global: &DmabufGlobal,
|
||||
dmabuf: Dmabuf,
|
||||
) -> Result<DrmNode> {
|
||||
let (expected_node, other_nodes) =
|
||||
self.drm_devices
|
||||
.values_mut()
|
||||
.partition::<Vec<_>, _>(|device| {
|
||||
device
|
||||
.socket
|
||||
.as_ref()
|
||||
.map(|s| &s.dmabuf_global == global)
|
||||
.unwrap_or(false)
|
||||
});
|
||||
let (expected_node, mut other_nodes) = self
|
||||
.drm_devices
|
||||
.values_mut()
|
||||
.partition::<Vec<_>, _>(|device| {
|
||||
device
|
||||
.socket
|
||||
.as_ref()
|
||||
.map(|s| &s.dmabuf_global == global)
|
||||
.unwrap_or(false)
|
||||
});
|
||||
other_nodes.retain(|device| device.socket.is_some());
|
||||
|
||||
let mut last_err = anyhow::anyhow!("Dmabuf cannot be imported on any gpu");
|
||||
for device in expected_node.into_iter().chain(other_nodes.into_iter()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue