dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tiago Vignatti <tiago.vignatti@intel.com>
To: dri-devel@lists.freedesktop.org
Subject: Re: about mmap dma-buf and sync
Date: Tue, 25 Aug 2015 13:14:55 -0300	[thread overview]
Message-ID: <55DC947F.8040806@intel.com> (raw)
In-Reply-To: <55DC35A1.4010902@vmware.com>

On 08/25/2015 06:30 AM, Thomas Hellstrom wrote:
> On 08/25/2015 11:02 AM, Daniel Vetter wrote:
>> I really feel like any kind of multi-range flush interface is feature
>> bloat, and if we do it then we should only do it later on when there's a
>> clear need for it.
>
> IMO all the use-cases so far that wanted to do this have been 2D
> updates. and having only a 1D sync will most probably scare people away
> from this interface.
>
>> Afaiui dma-buf mmap will mostly be used for up/downloads, which means
>> there will be some explicit copy involved somewhere anyway. So similar to
>> userptr usage. And for those most often you just slurp in a linear block
>> and then let the blitter rearrange it, at least on i915.
>>
>> Also thus far the consensus was that dma-buf doesn't care/know about
>> content layout, adding strides/bytes/whatever does bend this quite a bit.
>
> I think with a 2D interface, the stride only applies to the sync
> operation itself and is only a parameter for that sync operation.
> Whether we should have multiple regions or not is not a big deal for me,
> but I think at least a 2D sync is crucial.

Right now only omap, ion and udl-fb make use of begin{,end}_cpu_access() 
dma-buf interface, but it's curious that none uses those 1-d parameters 
(start and len). So in that sense it seems that the tendency is to 
feature bloat the API if we do the 2-d additions.

OTOH we're talking about a different usage of dma-buf right now, so the 
driver might actually start to use in fact that API. That said, I 
thought it was somewhat simple to turn the common code into 2-d, cause, 
as I pointed in the other email, we'd be pushing the whole 
responsibility of dealing with the regions and so on to the driver 
implementors.

Thomas, any comments in the dma_buf_begin_cpu_access() new API I showed? 
Maybe I should just clean up here the draft and sent it to the ML :)

Tiago

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-08-25 16:14 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <55D50442.5080102@intel.com>
2015-08-20  6:48 ` about mmap dma-buf and sync Thomas Hellstrom
2015-08-20 14:33   ` Rob Clark
2015-08-20 19:27     ` Thomas Hellstrom
2015-08-20 19:32       ` Thomas Hellstrom
2015-08-21 16:42       ` Rob Clark
2015-08-20 14:53   ` Jerome Glisse
2015-08-20 19:39     ` Thomas Hellstrom
2015-08-20 20:34       ` Jerome Glisse
2015-08-21  5:25         ` Thomas Hellstrom
2015-08-21 10:28           ` Lucas Stach
2015-08-21 10:51             ` Thomas Hellstrom
2015-08-21 13:32           ` Jerome Glisse
2015-08-21 14:15             ` Thomas Hellstrom
2015-08-21 16:00               ` Jerome Glisse
2015-08-21 22:00                 ` Thomas Hellstrom
2015-08-24  1:41                   ` Jerome Glisse
2015-08-24  9:59                     ` Thomas Hellstrom
2015-08-21 23:06   ` Tiago Vignatti
2015-08-24  9:50     ` Thomas Hellstrom
2015-08-24 15:52       ` Daniel Stone
2015-08-24 16:56         ` Thomas Hellstrom
2015-08-24 17:04           ` Daniel Stone
2015-08-24 17:10             ` Thomas Hellstrom
2015-08-24 17:12               ` Daniel Stone
2015-08-24 17:42                 ` Thomas Hellstrom
2015-08-24 17:56                   ` Michael Spang
2015-08-25  5:25                     ` Thomas Hellstrom
2015-08-24 18:01                   ` Tiago Vignatti
2015-08-24 23:03                     ` Tiago Vignatti
2015-08-25  9:02         ` Daniel Vetter
2015-08-25  9:30           ` Thomas Hellstrom
2015-08-25 16:14             ` Tiago Vignatti [this message]
2015-08-26  0:02               ` [PATCH v4] dma-buf: Add ioctls to allow userspace to flush Tiago Vignatti
2015-08-26  6:49                 ` Thomas Hellstrom
2015-08-26 12:10                   ` Daniel Vetter
2015-08-26 12:28                     ` Thomas Hellstrom
2015-08-26 12:58                       ` Daniel Vetter
2015-08-26 14:32                         ` Tiago Vignatti
2015-08-26 14:50                           ` Thomas Hellstrom
2015-08-26 14:51                           ` Daniel Vetter
2015-08-26 14:58                             ` Tiago Vignatti
2015-08-26 15:37                               ` Thomas Hellstrom

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=55DC947F.8040806@intel.com \
    --to=tiago.vignatti@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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