OSDN Git Service

virtio-gpu: Optimize 2D resource data transfer
authorKeqian Zhu <zhukeqian1@huawei.com>
Mon, 12 Jun 2023 02:13:58 +0000 (10:13 +0800)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 27 Jun 2023 15:08:47 +0000 (17:08 +0200)
commitb097b80bc919fca5f45663c20722e57792a093ea
tree1d8a4bacef6f227c3c5f583433d799753359c8c3
parent176e3783f2ab1476cdfd18a12bd2cfbe42e6b573
virtio-gpu: Optimize 2D resource data transfer

The following points sometimes can reduce much data
to copy:
1. When width matches, we can transfer data with one
call of iov_to_buf().
2. Only the required height need to transfer, not
whole image.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230612021358.25068-1-zhukeqian1@huawei.com>
hw/display/virtio-gpu.c