Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178101462
D62169.1795965821.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1001 B
Referenced Files
None
Subscribers
None
D62169.1795965821.diff
View Options
diff --git a/sys/dev/virtio/gpu/virtio_gpu.c b/sys/dev/virtio/gpu/virtio_gpu.c
--- a/sys/dev/virtio/gpu/virtio_gpu.c
+++ b/sys/dev/virtio/gpu/virtio_gpu.c
@@ -350,8 +350,8 @@
goto fail;
}
- vt_allocate(&vtgpu_fb_driver, &sc->vtgpu_fb_info);
- sc->vtgpu_have_fb_info = true;
+ if (vt_allocate(&vtgpu_fb_driver, &sc->vtgpu_fb_info) == 0)
+ sc->vtgpu_have_fb_info = true;
error = vtgpu_transfer_to_host_2d(sc, 0, 0, sc->vtgpu_fb_info.fb_width,
sc->vtgpu_fb_info.fb_height);
@@ -371,10 +371,15 @@
vtgpu_detach(device_t dev)
{
struct vtgpu_softc *sc;
+ int error;
sc = device_get_softc(dev);
- if (sc->vtgpu_have_fb_info)
- vt_deallocate(&vtgpu_fb_driver, &sc->vtgpu_fb_info);
+ if (sc->vtgpu_have_fb_info) {
+ error = vt_deallocate(&vtgpu_fb_driver, &sc->vtgpu_fb_info);
+ if (error != 0)
+ return (error);
+ sc->vtgpu_have_fb_info = false;
+ }
if (sc->vtgpu_fb_info.fb_vbase != 0) {
MPASS(sc->vtgpu_fb_info.fb_size != 0);
free((void *)sc->vtgpu_fb_info.fb_vbase,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 29, 3:23 PM (6 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42091373
Default Alt Text
D62169.1795965821.diff (1001 B)
Attached To
Mode
D62169: virtio_gpu: check the vt(4) attach and detach results
Attached
Detach File
Event Timeline