diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2017-02-13 10:54:49 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-13 10:54:49 +0000 |
| commit | df96bfab49dab2d0373e49b51bbb51ce72e1601e (patch) | |
| tree | 85b95f201b18f19b0201d099533b55ec7083e3e1 /hw/display/virtio-gpu-3d.c | |
| parent | 0b4384d0bb98f0016ba671b1c9cc75c2f31cd057 (diff) | |
| parent | 12e97ec39931e5321645fd483ab761319d48bf16 (diff) | |
| download | focaccia-qemu-df96bfab49dab2d0373e49b51bbb51ce72e1601e.tar.gz focaccia-qemu-df96bfab49dab2d0373e49b51bbb51ce72e1601e.zip | |
Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20170213-1' into staging
vga: bugfixes for cirrus and virtio-gpu # gpg: Signature made Mon 13 Feb 2017 08:14:47 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/pull-vga-20170213-1: Revert "cirrus: allow zero source pitch in pattern fill rops" cirrus: fix patterncopy checks cirrus: replace debug printf with trace points vga: replace debug printf with trace points virtio-gpu: fix resource leak in virgl_cmd_resource_unref virtio-gpu: fix memory leak in set scanout Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to '')
| -rw-r--r-- | hw/display/virtio-gpu-3d.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c index f96a0c2e59..ecb09d17a1 100644 --- a/hw/display/virtio-gpu-3d.c +++ b/hw/display/virtio-gpu-3d.c @@ -77,10 +77,18 @@ static void virgl_cmd_resource_unref(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_resource_unref unref; + struct iovec *res_iovs = NULL; + int num_iovs = 0; VIRTIO_GPU_FILL_CMD(unref); trace_virtio_gpu_cmd_res_unref(unref.resource_id); + virgl_renderer_resource_detach_iov(unref.resource_id, + &res_iovs, + &num_iovs); + if (res_iovs != NULL && num_iovs != 0) { + virtio_gpu_cleanup_mapping_iov(res_iovs, num_iovs); + } virgl_renderer_resource_unref(unref.resource_id); } |