Re: [RFC PATCH] drm/gem: Warn on illegal use of the dumb buffer interface

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

 



On Wed, Nov 12, 2014 at 12:55:32PM +0100, Thomas Hellstrom wrote:
> It happens on occasion that developers of generic user-space applications
> abuse the dumb buffer API to get hold of drm buffers that they can both
> mmap() and use for GPU acceleration, using the assumptions that dumb buffers
> and buffers available for GPU are
> a) The same type and can be aribtrarily type-casted.
> b) fully coherent.
> 
> This patch makes the most widely used drivers warn nicely when that happens,
> the next step will be to fail.

Yeah, makes sense to enforce a bit of sanity here. Not sure whether the
armsoc folks have already terminally screwed this up though :(

> Signed-off-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
> ---
> Patch is only compile-tested.
> FWIW vmware should typically fail on these errors.

At first I wanted to drop a bikeshed about the new bool arguments (since
they tend to make the code harder to read). But looking closer we can't
remove it from create because that would cause races (by setting it
afterwards) and for the mmap offset handling the code would end up rather
more ugly I think.

So Acked-by: Daniel Vetter <daniel.vetter@xxxxxxxx> on the patch and i915
parts.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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