Re: [PATCH 2/2] [RFC] drm/virtgpu: modify uapi with stride/layer_stride fix

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

 



> 3) Make sure host_stride == guest_stride at allocation time

> For (3), since we have to do something like
> VIRTIO_GPU_CMD_METADATA_QUERY (or whatever we call it) for Vulkan and
> zero-copy anyways, this seemed like the most natural choice.

Yep, for shared resources it certainly makes sense to have host and
guest agree on the stride.  I'd tend to not touch the current TRANSFER
ioctls (and virtio commands) though, but integrate that into the blob
resource support instead.  We probably need blob transfer ioctls and
virtio commands anyway.

> > I don't think we can simply use the args here without checking we
> actually got something from userspace ...
> 
> Correct me if I'm wrong, but doesn't drm_ioctl(..) already make sure
> that the pointer is the intersection of the kernel and userspace
> sizes, so we can safely append data?  i.e, layer_stride and stride
> will be zero for old user space + a new kernel.

Ah, right, I forgot the generic drm ioctl code does that service for us.

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