|
@@ -132,6 +132,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
|
|
info->fix.smem_start = 0;
|
|
info->fix.smem_start = 0;
|
|
info->fix.smem_len = size;
|
|
info->fix.smem_len = size;
|
|
|
|
|
|
|
|
+ bochs->fb.initialized = true;
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -148,7 +149,6 @@ static int bochs_fbdev_destroy(struct bochs_device *bochs)
|
|
gfb->obj = NULL;
|
|
gfb->obj = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
- drm_fb_helper_fini(&bochs->fb.helper);
|
|
|
|
drm_framebuffer_unregister_private(&gfb->base);
|
|
drm_framebuffer_unregister_private(&gfb->base);
|
|
drm_framebuffer_cleanup(&gfb->base);
|
|
drm_framebuffer_cleanup(&gfb->base);
|
|
|
|
|
|
@@ -180,7 +180,6 @@ int bochs_fbdev_init(struct bochs_device *bochs)
|
|
if (ret)
|
|
if (ret)
|
|
goto fini;
|
|
goto fini;
|
|
|
|
|
|
- bochs->fb.initialized = true;
|
|
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
fini:
|
|
fini:
|
|
@@ -190,9 +189,9 @@ fini:
|
|
|
|
|
|
void bochs_fbdev_fini(struct bochs_device *bochs)
|
|
void bochs_fbdev_fini(struct bochs_device *bochs)
|
|
{
|
|
{
|
|
- if (!bochs->fb.initialized)
|
|
|
|
- return;
|
|
|
|
|
|
+ if (bochs->fb.initialized)
|
|
|
|
+ bochs_fbdev_destroy(bochs);
|
|
|
|
|
|
- bochs_fbdev_destroy(bochs);
|
|
|
|
|
|
+ drm_fb_helper_fini(&bochs->fb.helper);
|
|
bochs->fb.initialized = false;
|
|
bochs->fb.initialized = false;
|
|
}
|
|
}
|