Re: [PATCH v2 1/2] drm/virtio: Defer the host dumb buffer creation

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

 



  Hi,

> -	} else {
> -		virtio_gpu_cmd_create_resource(vgdev, bo, params,
> -					       objs, fence);
> -		virtio_gpu_object_attach(vgdev, bo, ents, nents);
> +	} else if (params->dumb) {
> +		/* Create the host resource in virtio_gpu_user_framebuffer_create()
> +		 * because the pixel format is not specified yet
> +		 */
> +		bo->ents = ents;
> +		bo->nents = nents;
> +		bo->deferred = true;
>  	}

else {
	return -EINVAL;
}

I think this should not happen, because non-dumb buffers are only
created with virgl being active.  Nevertheless we should catch this
case and return an error, maybe even have a WARN_ONCE() there.

Otherwise looks good to me, so with that fixed:

Reviewed-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>

take care,
  Gerd




[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