drm: Do not unpack drm-rs errors on conversion

This commit is contained in:
Victor Brekenfeld 2020-05-03 17:56:43 +02:00
parent 12a57f799a
commit a0c65114fb
1 changed files with 3 additions and 3 deletions

View File

@ -76,7 +76,7 @@ impl Into<SwapBuffersError> for Error {
fn into(self) -> SwapBuffersError {
match self {
x @ Error::DeviceInactive => SwapBuffersError::TemporaryFailure(Box::new(x)),
Error::Access { source, .. }
Error::Access { errmsg, dev, source, .. }
if match source.get_ref() {
drm::SystemError::Unknown {
errno: nix::errno::Errno::EBUSY,
@ -87,8 +87,8 @@ impl Into<SwapBuffersError> for Error {
_ => false,
} =>
{
SwapBuffersError::TemporaryFailure(Box::new(source))
}
SwapBuffersError::TemporaryFailure(Box::new(Error::Access { errmsg, dev, source }))
},
x => SwapBuffersError::ContextLost(Box::new(x)),
}
}