virtio-gpu: Refactor virtio_gpu_set_scanout
commite64d4b6a9bc3ba216a988276bcdc27d06fd48e59
authorVivek Kasireddy <vivek.kasireddy@intel.com>
Wed, 26 May 2021 23:14:21 +0000 (26 16:14 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 27 May 2021 10:07:37 +0000 (27 12:07 +0200)
treebc3e8145deadc4e28a747e32a7b2336738fd98d7
parent25c001a40346342550ba152817ab306b6df0bd77
virtio-gpu: Refactor virtio_gpu_set_scanout

Store the meta-data associated with a FB in a new object
(struct virtio_gpu_framebuffer) and pass the object to set_scanout.
Also move code in set_scanout into a do_set_scanout function.
This will be helpful when adding set_scanout_blob API.

Based-on-patch-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Message-Id: <20210526231429.1045476-7-vivek.kasireddy@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/display/virtio-gpu.c
include/hw/virtio/virtio-gpu.h