dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
	Ben Skeggs <bskeggs@redhat.com>
Subject: Re: Fence, timeline and android sync points
Date: Fri, 15 Aug 2014 08:54:38 +0200	[thread overview]
Message-ID: <53EDAEAE.5040300@shipmail.org> (raw)
In-Reply-To: <20140814191505.GH2000@gmail.com>

On 08/14/2014 09:15 PM, Jerome Glisse wrote:
> On Thu, Aug 14, 2014 at 08:47:16PM +0200, Daniel Vetter wrote:
>> On Thu, Aug 14, 2014 at 8:18 PM, Jerome Glisse <j.glisse@gmail.com> wrote:
>>> Sucks because you can not do weird synchronization like one i depicted in another
>>> mail in this thread and for as long as cmdbuf_ioctl do not give you fence|syncpt
>>> you can not such thing cleanly in non hackish way.
>> Actually i915 can soon will do that that.
> So you will return fence|syncpoint with each cmdbuf_ioctl ?
>
>>> Sucks because you have a fence object per buffer object and thus overhead grow
>>> with the number of objects. Not even mentioning fence lifetime issue.
>>>
>>> Sucks because sub-buffer allocation is just one of many tricks that can not be
>>> achieved properly and cleanly with implicit sync.
>>>
>>> ...
>> Well I heard all those reasons and I'm well of aware of them. The
>> problem is that with current hardware the kernel needs to know for
>> each buffer how long it needs to be kept around since hw just can't do
>> page faulting. Yeah you can pin them but for an uma design that
>> doesn't go down well with folks.
> I am not thinking with fancy hw in mind, on contrary i thought about all
> this with the crappiest hw i could think of, in mind.
>
> Yes you can get rid of fence and not have to pin memory with current hw.
> What matter for unpinning is to know that all hw block are done using the
> memory. This is easily achievable with your beloved seqno. Have one seqno
> per driver (one driver can have different block 3d, video decoding, crtc,
> ...) each time a buffer is use as part of a command on one block inc the
> common seqno and tag the buffer with that number. Have each hw block write
> the lastest seqno that is done to a per block location. Now to determine
> is buffer is done compare the buffer seqno with the max of all the signaled
> seqno of all blocks.
>
> Cost 1 uint32 per buffer and simple if without locking to check status of
> a buffer.

Hmm?
The trivial and first use of fence objects in the linux DRM was
triggered by the fact that a
32-bit seqno wraps pretty quickly and a 32-bit solution just can't be
made robust.
Now a 64-bit seqno will probably be robust for forseeable future, but
when it comes to implement that on 32-bit hardware and compare it to a
simple fence object approach,

/Thomas

  parent reply	other threads:[~2014-08-15  7:21 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12 22:13 Fence, timeline and android sync points Jerome Glisse
2014-08-13  1:23 ` Jerome Glisse
2014-08-13  7:59 ` Christian König
2014-08-13 13:41   ` Jerome Glisse
2014-08-13 14:08     ` Christian König
2014-08-13 15:56       ` Jerome Glisse
2014-08-13  8:28 ` Daniel Vetter
2014-08-13 13:36   ` Jerome Glisse
2014-08-13 15:54     ` Daniel Vetter
2014-08-13 17:07       ` Jerome Glisse
2014-08-14  9:08         ` Daniel Vetter
2014-08-14 14:23           ` Jerome Glisse
2014-08-14 15:55             ` Daniel Vetter
2014-08-14 18:18               ` Jerome Glisse
2014-08-14 18:47                 ` Daniel Vetter
2014-08-14 19:15                   ` Jerome Glisse
2014-08-14 19:40                     ` Maarten Lankhorst
2014-08-14 19:56                       ` Jerome Glisse
2014-08-14 21:20                         ` Daniel Vetter
2014-08-14 21:23                     ` Daniel Vetter
2014-08-14 23:03                       ` Jerome Glisse
2014-08-15  8:07                         ` Daniel Vetter
2014-08-15 14:53                           ` Jerome Glisse
2014-08-14 21:30                     ` Daniel Vetter
2014-08-15  6:54                     ` Thomas Hellstrom [this message]
2014-08-15 14:52                       ` Jerome Glisse
2014-08-16  7:01                         ` Thomas Hellstrom
2014-08-16 15:30                           ` Jerome Glisse
2014-08-14  9:15         ` Maarten Lankhorst
2014-08-14 11:53           ` Christian König
2014-08-14 12:37             ` Maarten Lankhorst
2014-08-14 14:31               ` Christian König
2014-08-14 14:09           ` Jerome Glisse
2014-08-14 13:16         ` Rob Clark
2014-08-14 14:12           ` Jerome Glisse
2014-08-14 15:58             ` Daniel Vetter
2014-08-14 18:26               ` Jerome Glisse
2014-08-14 19:16                 ` Maarten Lankhorst
2014-08-14 22:11             ` Rob Clark

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=53EDAEAE.5040300@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.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