linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Inki Dae <inki.dae@samsung.com>
To: linux-fbdev@vger.kernel.org
Subject: RE: Introduce a new helper framework for buffer synchronization
Date: Mon, 13 May 2013 12:21:18 +0000	[thread overview]
Message-ID: <028a01ce4fd4$5ec6f000$1c54d000$%dae@samsung.com> (raw)
In-Reply-To: <51909DB4.2060208@canonical.com>



> -----Original Message-----
> From: linux-fbdev-owner@vger.kernel.org [mailto:linux-fbdev-
> owner@vger.kernel.org] On Behalf Of Maarten Lankhorst
> Sent: Monday, May 13, 2013 8:41 PM
> To: Inki Dae
> Cc: 'Rob Clark'; 'Daniel Vetter'; 'DRI mailing list'; linux-arm-
> kernel@lists.infradead.org; linux-media@vger.kernel.org; 'linux-fbdev';
> 'Kyungmin Park'; 'myungjoo.ham'; 'YoungJun Cho'
> Subject: Re: Introduce a new helper framework for buffer synchronization
> 
> Op 13-05-13 13:24, Inki Dae schreef:
> >> and can be solved with userspace locking primitives. No need for the
> >> kernel to get involved.
> >>
> > Yes, that is how we have synchronized buffer between CPU and DMA device
> > until now without buffer synchronization mechanism. I thought that it's
> best
> > to make user not considering anything: user can access a buffer
> regardless
> > of any DMA device controlling and the buffer synchronization is
> performed in
> > kernel level. Moreover, I think we could optimize graphics and
> multimedia
> > hardware performance because hardware can do more works: one thread
> accesses
> > a shared buffer and the other controls DMA device with the shared buffer
> in
> > parallel. Thus, we could avoid sequential processing and that is my
> > intention. Aren't you think about that we could improve hardware
> utilization
> > with such way or other? of course, there could be better way.
> >
> If you don't want to block the hardware the only option is to allocate a
> temp bo and blit to/from it using the hardware.
> OpenGL already does that when you want to read back, because otherwise the
> entire pipeline can get stalled.
> The overhead of command submission for that shouldn't be high, if it is
> you should really try to optimize that first
> before coming up with this crazy scheme.
> 

I have considered all devices sharing buffer with CPU; multimedia, display
controller and graphics devices (including GPU). And we could provide
easy-to-use user interfaces for buffer synchronization. Of course, the
proposed user interfaces may be so ugly yet but at least, I think we need
something else for it.

> In that case you still wouldn't give userspace control over the fences. I
> don't see any way that can end well.
> What if userspace never signals? What if userspace gets killed by oom
> killer. Who keeps track of that?
> 

In all cases, all kernel resources to user fence will be released by kernel
once the fence is timed out: never signaling and process killing by oom
killer makes the fence timed out. And if we use mmap mechanism you mentioned
before, I think user resource could also be freed properly.

Thanks,
Inki Dae

> ~Maarten
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  parent reply	other threads:[~2013-05-13 12:21 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAAQKjZNNw4qddo6bE5OY_CahrqDtqkxdO7Pm9RCguXyj9F4cMQ@mail.gmail.com>
2013-05-13  8:00 ` Introduce a new helper framework for buffer synchronization Maarten Lankhorst
2013-05-13  9:21   ` Inki Dae
2013-05-13  9:52     ` Maarten Lankhorst
2013-05-13 11:24   ` Inki Dae
2013-05-13 11:40     ` Maarten Lankhorst
2013-05-13 19:29     ` Tomasz Figa
2013-05-13 12:21   ` Inki Dae [this message]
2013-05-13 13:48     ` Rob Clark
     [not found]       ` <CAAQKjZP=iOmHRpHZCbZD3v_RKUFSn0eM_WVZZvhe7F9g3eTmPA@mail.gmail.com>
2013-05-13 17:58         ` Rob Clark
2013-05-14  2:52   ` Inki Dae
2013-05-14 13:38     ` Rob Clark
2013-05-15  5:19   ` Inki Dae
2013-05-15 14:06     ` Rob Clark
2013-05-17  4:19       ` Daniel Vetter
     [not found]       ` <CAAQKjZP37koEPob6yqpn-WxxTh3+O=twyvRzDiEhVJTD8BxQzw@mail.gmail.com>
2013-05-20 21:13         ` Daniel Vetter
2013-05-20 21:30           ` Daniel Vetter
2013-05-21  7:03   ` Inki Dae
2013-05-21  7:44     ` Daniel Vetter
2013-05-21  9:22   ` Inki Dae
2013-05-23 11:55     ` Daniel Vetter
2013-05-23 13:37   ` Inki Dae
2013-05-27 10:38   ` Inki Dae
2013-05-27 15:23     ` Maarten Lankhorst
2013-05-27 15:47     ` Rob Clark
2013-05-27 16:02       ` Daniel Vetter
2013-05-28  2:49   ` Inki Dae
2013-05-28  7:23     ` Maarten Lankhorst
2013-05-28  3:56   ` Inki Dae
2013-05-28 10:32     ` Daniel Vetter
2013-05-28 13:48     ` Rob Clark
2013-05-28  4:04   ` Inki Dae
2013-05-28 14:43   ` Inki Dae
2013-05-28 14:50   ` Inki Dae
2013-05-28 16:49     ` Daniel Vetter
2013-05-29  2:21   ` Inki Dae

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='028a01ce4fd4$5ec6f000$1c54d000$%dae@samsung.com' \
    --to=inki.dae@samsung.com \
    --cc=linux-fbdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).