[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabu
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects |
Date: |
Wed, 19 May 2021 08:17:28 +0200 |
> +int virtio_gpu_update_dmabuf(VirtIOGPU *g,
> + uint32_t scanout_id,
> + struct virtio_gpu_simple_resource *res,
> + struct virtio_gpu_framebuffer *fb)
> +{
> + struct virtio_gpu_scanout *scanout = &g->parent_obj.scanout[scanout_id];
> + VGPUDMABuf *new_primary, *old_primary;
> +
> + new_primary = virtio_gpu_create_dmabuf(g, scanout_id, res, fb);
> + if (!new_primary) {
> + return -EINVAL;
> + }
> +
> + if (g->dmabuf.primary) {
> + old_primary = g->dmabuf.primary;
> + }
> +
> + g->dmabuf.primary = new_primary;
> + qemu_console_resize(scanout->con,
> + new_primary->buf.width,
> + new_primary->buf.height);
> + dpy_gl_scanout_dmabuf(scanout->con, &new_primary->buf);
> +
> + if (old_primary) {
> + virtio_gpu_free_dmabuf(g, old_primary);
> + }
> +
> + return 0;
> +}
../../hw/display/virtio-gpu-udmabuf.c: In function ‘virtio_gpu_update_dmabuf’:
/home/kraxel/projects/qemu/include/qemu/queue.h:456:62: error: ‘old_primary’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
take care,
Gerd
- [PATCH v5 02/13] headers: Add udmabuf.h, (continued)
- [PATCH v5 02/13] headers: Add udmabuf.h, Vivek Kasireddy, 2021/05/18
- [PATCH v5 01/13] ui: Get the fd associated with udmabuf driver, Vivek Kasireddy, 2021/05/18
- [PATCH v5 03/13] virtio-gpu: Add udmabuf helpers, Vivek Kasireddy, 2021/05/18
- [PATCH v5 06/13] virtio-gpu: Refactor virtio_gpu_create_mapping_iov, Vivek Kasireddy, 2021/05/18
- [PATCH v5 05/13] virtio-gpu: Refactor virtio_gpu_set_scanout, Vivek Kasireddy, 2021/05/18
- [PATCH v5 04/13] virtio-gpu: Add virtio_gpu_find_check_resource, Vivek Kasireddy, 2021/05/18
- [PATCH v5 07/13] virtio-gpu: Add initial definitions for blob resources, Vivek Kasireddy, 2021/05/18
- [PATCH v5 08/13] virtio-gpu: Add virtio_gpu_resource_create_blob, Vivek Kasireddy, 2021/05/18
- [PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects, Vivek Kasireddy, 2021/05/18
- Re: [PATCH v5 10/13] virtio-gpu: Add helpers to create and destroy dmabuf objects,
Gerd Hoffmann <=
- [PATCH v5 11/13] virtio-gpu: Factor out update scanout, Vivek Kasireddy, 2021/05/18
- [PATCH v5 09/13] ui/pixman: Add qemu_pixman_to_drm_format(), Vivek Kasireddy, 2021/05/18
- [PATCH v5 12/13] virtio-gpu: Add virtio_gpu_set_scanout_blob, Vivek Kasireddy, 2021/05/18
- [PATCH v5 13/13] virtio-gpu: Update cursor data using blob, Vivek Kasireddy, 2021/05/18
- Re: [PATCH v5 00/13] virtio-gpu: Add support for Blob resources feature (v5), no-reply, 2021/05/18