Skip to content

Commit 427321e

Browse files
committed
vhost_user: Add VhostUserGpuProtocolFeatures constant definitions
Signed-off-by: Matej Hrica <mhrica@redhat.com>
1 parent 0e4c62d commit 427321e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

vhost/src/vhost_user/gpu_message.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@ impl<R: Req> MsgHeader for VhostUserGpuMsgHeader<R> {
171171
type Request = R;
172172
}
173173

174+
// Bit mask for vhost-user-gpu protocol feature flags.
175+
bitflags! {
176+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
177+
/// Vhost-user-gpu protocol feature flags from the QEMU vhost-user-gpu specification.
178+
pub struct VhostUserGpuProtocolFeatures: u64 {
179+
/// Frontend support for EDID
180+
const EDID = 0;
181+
/// Frontend support for DMABUF_SCANOUT2
182+
const DMABUF2 = 1;
183+
}
184+
}
185+
174186
/// The virtio_gpu_ctrl_hdr from virtio specification
175187
/// Defined here because some GpuBackend commands return virtio structs, which contain this header.
176188
#[derive(Copy, Clone, Debug, Default)]

0 commit comments

Comments
 (0)