From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Hellstrom <thellstrom@vmware.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/gem: Warn on illegal use of the dumb buffer interface
Date: Wed, 12 Nov 2014 15:29:55 +0100 [thread overview]
Message-ID: <20141112142955.GW25711@phenom.ffwll.local> (raw)
In-Reply-To: <1415793332-57236-1-git-send-email-thellstrom@vmware.com>
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@vmware.com>
> ---
> 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@ffwll.ch> 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@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2014-11-12 14:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-12 11:55 [RFC PATCH] drm/gem: Warn on illegal use of the dumb buffer interface Thomas Hellstrom
2014-11-12 14:29 ` Daniel Vetter [this message]
2014-11-13 19:31 ` Thomas Hellstrom
2014-11-14 21:16 ` Alex Deucher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141112142955.GW25711@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=thellstrom@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox