ACRN:DM:VGPU: Add more check to avoid no geometry parameter for virtio-gpu

When no geometry parameter is passed for virtio-gpu, it should not be started.

Tracked-On: #7988
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sun Peng <peng.p.sun@linux.intel.com>
Reviewed-by: Wang Yu <yu1.wang@intel.com>
This commit is contained in:
Zhao Yakui 2022-08-16 11:36:08 +08:00 committed by acrnsi-robot
parent 86eff3c6a1
commit 92034e9f7d

View File

@ -1301,6 +1301,10 @@ gfx_ui_init()
return -1;
}
if (vdpy.vscrs_num <= 0) {
pr_err("Incorrect geometry parameter for virtio-gpu\n");
return -1;
}
num_pscreen = SDL_GetNumVideoDisplays();
for (i = 0; i < vdpy.vscrs_num; i++) {