ACRN:DM: Avoid calling surface_set in course of virtio_gpu_reset
This is not needed as it is reconfigured in course of vga_thread_loop. At the same time it is not thread-safe as the 3D api is involved in vdpy_surface_set. v2->v3: move the initialization of vga_surface width/height into vga_thread. Tracked-On: #7296 Acked-by: Wang Yu1 <yu1.wang@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
parent
c73773c130
commit
2e9773ed55
|
@ -463,9 +463,6 @@ virtio_gpu_reset(void *vdev)
|
|||
}
|
||||
LIST_INIT(&gpu->r2d_list);
|
||||
gpu->vga.enable = true;
|
||||
vdpy_surface_set(gpu->vdpy_handle, &gpu->vga.surf);
|
||||
gpu->vga.surf.width = 0;
|
||||
gpu->vga.surf.stride = 0;
|
||||
pthread_mutex_lock(&gpu->vga_thread_mtx);
|
||||
if (atomic_load(&gpu->vga_thread_status) == VGA_THREAD_EOL) {
|
||||
atomic_store(&gpu->vga_thread_status, VGA_THREAD_RUNNING);
|
||||
|
@ -1409,6 +1406,8 @@ virtio_gpu_vga_render(void *param)
|
|||
struct virtio_gpu *gpu;
|
||||
|
||||
gpu = (struct virtio_gpu*)param;
|
||||
gpu->vga.surf.width = 0;
|
||||
gpu->vga.surf.stride = 0;
|
||||
/* The below logic needs to be refined */
|
||||
while(gpu->vga.enable) {
|
||||
if(gpu->vga.gc->gc_image->vgamode) {
|
||||
|
|
Loading…
Reference in New Issue