lkml.org 
[lkml]   [2017]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH 6/6] drm/i915/gvt: support QEMU getting the dmabuf
From
Date
  Hi,

> > User space need to check whether there's a dmabuf for the plane(user space usually cached two or three dmabuf to handle double buffer or triple buffer situation) only there's no dmabuf for the plane we will create a dmabuf for it(another ioctl).
>
> If our ioctls are "Query current plane" and "Give me a dmabuf for
> current plane", isn't that racey? The current plane could have changed
> between those two calls so the user doesn't absolutely know which plane
> the dmabuf retrieved is for. The "Give me a dmabuf" therefore needs to
> take some sort of plane index so the user can request a specific
> plane.

The "give me a dmabuf" ioctl returns the plane description too, so
userspace can at least figure it did hit the race window.

We could also do it the other way around: Instead of having the kernel
returning the plane description userspace could pass it in, and the
kernel throws -EINVAL in case it doesn't match due to things having
changed meanwhile.

cheers,
Gerd

\
 
 \ /
  Last update: 2017-05-19 10:05    [W:0.179 / U:0.636 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site