pub struct VirtioGpu {
ctrl_queue: Mutex<Virtqueue>,
_cursor_queue: Mutex<Option<Virtqueue>>,
info: GpuInfo,
_framebuffer_pages: Vec<PhysFrame>,
framebuffer_segments: Vec<FramebufferSegment>,
framebuffer_size: usize,
dirty: Mutex<DirtyRect>,
}Fields§
§ctrl_queue: Mutex<Virtqueue>§_cursor_queue: Mutex<Option<Virtqueue>>§info: GpuInfo§_framebuffer_pages: Vec<PhysFrame>§framebuffer_segments: Vec<FramebufferSegment>§framebuffer_size: usize§dirty: Mutex<DirtyRect>Implementations§
Source§impl VirtioGpu
impl VirtioGpu
Sourcefn init_display(&mut self) -> Result<(), &'static str>
fn init_display(&mut self) -> Result<(), &'static str>
Initializes display.
Sourcefn get_display_info(&mut self) -> Result<(), &'static str>
fn get_display_info(&mut self) -> Result<(), &'static str>
Returns display info.
Sourcefn resource_create_2d(
&self,
resource_id: u32,
width: u32,
height: u32,
) -> Result<(), &'static str>
fn resource_create_2d( &self, resource_id: u32, width: u32, height: u32, ) -> Result<(), &'static str>
Performs the resource create 2d operation.
Sourcefn resource_attach_backing(
&self,
resource_id: u32,
entries: &[MemEntry],
) -> Result<(), &'static str>
fn resource_attach_backing( &self, resource_id: u32, entries: &[MemEntry], ) -> Result<(), &'static str>
Performs the resource attach backing operation.
Sourcefn set_scanout(
&self,
scanout_id: u32,
resource_id: u32,
) -> Result<(), &'static str>
fn set_scanout( &self, scanout_id: u32, resource_id: u32, ) -> Result<(), &'static str>
Sets scanout.
Sourcefn transfer_to_host_2d(
&self,
resource_id: u32,
x: u32,
y: u32,
width: u32,
height: u32,
) -> Result<(), &'static str>
fn transfer_to_host_2d( &self, resource_id: u32, x: u32, y: u32, width: u32, height: u32, ) -> Result<(), &'static str>
Performs the transfer to host 2d operation.
Sourcefn resource_flush(
&self,
resource_id: u32,
x: u32,
y: u32,
width: u32,
height: u32,
) -> Result<(), &'static str>
fn resource_flush( &self, resource_id: u32, x: u32, y: u32, width: u32, height: u32, ) -> Result<(), &'static str>
Performs the resource flush operation.
Sourcefn send_command<T: Copy, R: Copy>(&self, cmd: &T) -> Result<R, &'static str>
fn send_command<T: Copy, R: Copy>(&self, cmd: &T) -> Result<R, &'static str>
Performs the send command operation.
Sourcefn send_command_with_payload<T: Copy, R: Copy>(
&self,
cmd: &T,
payload: Option<&[u8]>,
) -> Result<R, &'static str>
fn send_command_with_payload<T: Copy, R: Copy>( &self, cmd: &T, payload: Option<&[u8]>, ) -> Result<R, &'static str>
Performs the send command with payload operation.
Sourcefn copy_to_backing(
&self,
src: *const u8,
dst_offset: usize,
len: usize,
) -> Result<(), &'static str>
fn copy_to_backing( &self, src: *const u8, dst_offset: usize, len: usize, ) -> Result<(), &'static str>
Performs the copy to backing operation.
Auto Trait Implementations§
impl !Freeze for VirtioGpu
impl !RefUnwindSafe for VirtioGpu
impl Send for VirtioGpu
impl Sync for VirtioGpu
impl Unpin for VirtioGpu
impl UnsafeUnpin for VirtioGpu
impl UnwindSafe for VirtioGpu
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more