[PATCH 2/5 v5] drm/virtio: factor out context create hyercall
Emil Velikov
emil.l.velikov at gmail.com
Wed Feb 19 18:10:55 UTC 2020
Hi Gurchetan,
s/hyercall/hypercall/ in the commit message
On Wed, 19 Feb 2020 at 17:56, Gurchetan Singh
<gurchetansingh at chromium.org> wrote:
> +void virtio_gpu_create_context(struct drm_device *dev,
> + struct drm_file *file)
> +{
> + struct virtio_gpu_device *vgdev = dev->dev_private;
> + struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
> + char dbgname[TASK_COMM_LEN];
> +
> + /* can't create contexts without 3d renderer */
> + if (!vgdev->has_virgl_3d)
> + return;
> +
This cannot trigger, since we have similar check in the caller
virtio_gpu_driver_open().
> @@ -260,8 +247,7 @@ int virtio_gpu_driver_open(struct drm_device *dev, struct drm_file *file)
> {
> struct virtio_gpu_device *vgdev = dev->dev_private;
> struct virtio_gpu_fpriv *vfpriv;
> - int id;
> - char dbgname[TASK_COMM_LEN];
> + int handle;
>
> /* can't create contexts without 3d renderer */
> if (!vgdev->has_virgl_3d)
... namely this here.
With either of the two dropped:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
-Emil
More information about the dri-devel
mailing list