Re: [PATCH 2/2] drm/virtio: make sure virtio_gpu_cleanup_object(..) only happens on shmem objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> This function won't be useable for hostmem objects.

> @@ -526,7 +526,8 @@ static void virtio_gpu_cmd_unref_cb(struct virtio_gpu_device *vgdev,
>  	bo = vbuf->resp_cb_data;
>  	vbuf->resp_cb_data = NULL;
>  
> -	virtio_gpu_cleanup_object(bo);
> +	if (bo && virtio_gpu_is_shmem(bo))
> +		virtio_gpu_cleanup_object(bo);

Its not that simple, the virtio_gpu_resource_id_put() call in
virtio_gpu_cleanup_object() is needed for all objects.  We also
must free all objects.

I'd suggest to move the virtio_gpu_is_shmem() check to
virtio_gpu_cleanup_object().

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux