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,
|
global: &DmabufGlobal,
|
||||||
dmabuf: Dmabuf,
|
dmabuf: Dmabuf,
|
||||||
) -> Result<DrmNode> {
|
) -> Result<DrmNode> {
|
||||||
let (expected_node, other_nodes) =
|
let (expected_node, mut other_nodes) = self
|
||||||
self.drm_devices
|
.drm_devices
|
||||||
.values_mut()
|
.values_mut()
|
||||||
.partition::<Vec<_>, _>(|device| {
|
.partition::<Vec<_>, _>(|device| {
|
||||||
device
|
device
|
||||||
.socket
|
.socket
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|s| &s.dmabuf_global == global)
|
.map(|s| &s.dmabuf_global == global)
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
});
|
});
|
||||||
|
other_nodes.retain(|device| device.socket.is_some());
|
||||||
|
|
||||||
let mut last_err = anyhow::anyhow!("Dmabuf cannot be imported on any gpu");
|
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()) {
|
for device in expected_node.into_iter().chain(other_nodes.into_iter()) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue