mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-21 05:02:24 +00:00
ACRN:VGPU: Fix the incorrect logic of fetching EDID
The virtio_gpu in guest_vm will try to fetch the EDID to query the supported resolution. Guest vm will send the cmd of VIRTIO_GPU_CMD_GET_EDID and receive the response of VIRTIO_GPU_RESP_OK_EDID. Now acrn-dm has some issues in course of handlding EDID request: Incorrect resp type, the incorrect response. This will cause that the guest_vm fails to fetch the EDID. Tracked-On: #7376 Acked-by: Wang Yu <yu1.wang@intel.com> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
This commit is contained in:
parent
c544ac98bc
commit
402565f222
@ -554,6 +554,7 @@ virtio_gpu_cmd_get_edid(struct virtio_gpu_command *cmd)
|
||||
memset(&resp, 0, sizeof(resp));
|
||||
/* Only one EDID block is enough */
|
||||
resp.size = 128;
|
||||
resp.hdr.type = VIRTIO_GPU_RESP_OK_EDID;
|
||||
virtio_gpu_update_resp_fence(&cmd->hdr, &resp.hdr);
|
||||
vdpy_get_edid(gpu->vdpy_handle, resp.edid, resp.size);
|
||||
memcpy(cmd->iov[1].iov_base, &resp, sizeof(resp));
|
||||
@ -1228,6 +1229,7 @@ virtio_gpu_ctrl_bh(void *data)
|
||||
switch (cmd.hdr.type) {
|
||||
case VIRTIO_GPU_CMD_GET_EDID:
|
||||
virtio_gpu_cmd_get_edid(&cmd);
|
||||
break;
|
||||
case VIRTIO_GPU_CMD_GET_DISPLAY_INFO:
|
||||
virtio_gpu_cmd_get_display_info(&cmd);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user