All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Stone <daniels@collabora.com>
To: Tom Cooksey <tom.cooksey@arm.com>
Cc: "'Rob Clark'" <robdclark@gmail.com>,
	linux-fbdev@vger.kernel.org, Pawel Moll <Pawel.Moll@arm.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [Linaro-mm-sig] [RFC 0/1] drm/pl111: Initial drm/kms driver for pl111
Date: Sat, 14 Sep 2013 17:33:51 -0400	[thread overview]
Message-ID: <1379194431.2978.22.camel@nightslugs> (raw)
In-Reply-To: <000101ce9298$8ce44ee0$a6aceca0$@cooksey@arm.com>

Hi,

On Tue, 2013-08-06 at 12:31 +0100, Tom Cooksey wrote:
> > >> On Fri, Jul 26, 2013 at 11:58 AM, Tom Cooksey <tom.cooksey@arm.com>
> > >> wrote:
> > that was part of the reason to punt this problem to userspace ;-)
> >
> > In practice, the kernel drivers doesn't usually know too much about
> > the dimensions/format/etc.. that is really userspace level knowledge.
> > There are a few exceptions when the kernel needs to know how to setup
> > GTT/etc for tiled buffers, but normally this sort of information is up
> > at the next level up (userspace, and drm_framebuffer in case of
> > scanout).  Userspace media frameworks like GStreamer already have a
> > concept of format/caps negotiation.  For non-display<->gpu sharing, I
> > think this is probably where this sort of constraint negotiation
> > should be handled.

Egads.  GStreamer's caps negotiation is already close to unbounded time;
seems like most of the optimisation work that goes into it these days is
all about _reducing_ the complexity of caps negotiation!

> I agree that user-space will know which devices will access the buffer
> and thus can figure out at least a common pixel format.

Hm, are you sure about that? The answer is yes for 'userspace' as a
broad handwave, but not necessarily for individual processes.  Take, for
instance, media decode through GStreamer, being displayed by Wayland
using a KMS plane/overlay/sprite/cursor/etc.  The media player knows
that the buffers are coming from the decode engine, and Wayland knows
that the buffers are going to a KMS plane, but neither of them knows the
full combination of the two.

Though this kinda feeds into an idea I've been kicking around for a
while, which is an 'optimal hint' mechanism in the Wayland protocol.  So
for our hypothetical dmabuf-using protocol, we'd start off with buffers
which satisfied all the constraints of our media decode engine, but
perhaps just the GPU rather than display controller.  At this point,
we'd note that we could place the video in a plane if only the buffers
were better-allocated, and send an event to the client letting it know
how to tweak its buffer allocation for more optimal display.

But ...

> Though I'm not
> so sure userspace can figure out more low-level details like alignment
> and placement in physical memory, etc.
> 
> Anyway, assuming user-space can figure out how a buffer should be 
> stored in memory, how does it indicate this to a kernel driver and 
> actually allocate it? Which ioctl on which device does user-space
> call, with what parameters? Are you suggesting using something like
> ION which exposes the low-level details of how buffers are laid out in
> physical memory to userspace? If not, what?

... this is still rather unresolved. ;)

Cheers,
Daniel


> 
> Cheers,
> 
> Tom
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Linaro-mm-sig mailing list
> Linaro-mm-sig@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-mm-sig



WARNING: multiple messages have this Message-ID (diff)
From: Daniel Stone <daniels@collabora.com>
To: Tom Cooksey <tom.cooksey@arm.com>
Cc: 'Rob Clark' <robdclark@gmail.com>,
	linux-fbdev@vger.kernel.org, Pawel Moll <Pawel.Moll@arm.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org
Subject: Re: [Linaro-mm-sig] [RFC 0/1] drm/pl111: Initial drm/kms driver for pl111
Date: Sat, 14 Sep 2013 21:33:51 +0000	[thread overview]
Message-ID: <1379194431.2978.22.camel@nightslugs> (raw)
In-Reply-To: <000101ce9298$8ce44ee0$a6aceca0$@cooksey@arm.com>

Hi,

On Tue, 2013-08-06 at 12:31 +0100, Tom Cooksey wrote:
> > >> On Fri, Jul 26, 2013 at 11:58 AM, Tom Cooksey <tom.cooksey@arm.com>
> > >> wrote:
> > that was part of the reason to punt this problem to userspace ;-)
> >
> > In practice, the kernel drivers doesn't usually know too much about
> > the dimensions/format/etc.. that is really userspace level knowledge.
> > There are a few exceptions when the kernel needs to know how to setup
> > GTT/etc for tiled buffers, but normally this sort of information is up
> > at the next level up (userspace, and drm_framebuffer in case of
> > scanout).  Userspace media frameworks like GStreamer already have a
> > concept of format/caps negotiation.  For non-display<->gpu sharing, I
> > think this is probably where this sort of constraint negotiation
> > should be handled.

Egads.  GStreamer's caps negotiation is already close to unbounded time;
seems like most of the optimisation work that goes into it these days is
all about _reducing_ the complexity of caps negotiation!

> I agree that user-space will know which devices will access the buffer
> and thus can figure out at least a common pixel format.

Hm, are you sure about that? The answer is yes for 'userspace' as a
broad handwave, but not necessarily for individual processes.  Take, for
instance, media decode through GStreamer, being displayed by Wayland
using a KMS plane/overlay/sprite/cursor/etc.  The media player knows
that the buffers are coming from the decode engine, and Wayland knows
that the buffers are going to a KMS plane, but neither of them knows the
full combination of the two.

Though this kinda feeds into an idea I've been kicking around for a
while, which is an 'optimal hint' mechanism in the Wayland protocol.  So
for our hypothetical dmabuf-using protocol, we'd start off with buffers
which satisfied all the constraints of our media decode engine, but
perhaps just the GPU rather than display controller.  At this point,
we'd note that we could place the video in a plane if only the buffers
were better-allocated, and send an event to the client letting it know
how to tweak its buffer allocation for more optimal display.

But ...

> Though I'm not
> so sure userspace can figure out more low-level details like alignment
> and placement in physical memory, etc.
> 
> Anyway, assuming user-space can figure out how a buffer should be 
> stored in memory, how does it indicate this to a kernel driver and 
> actually allocate it? Which ioctl on which device does user-space
> call, with what parameters? Are you suggesting using something like
> ION which exposes the low-level details of how buffers are laid out in
> physical memory to userspace? If not, what?

... this is still rather unresolved. ;)

Cheers,
Daniel


> 
> Cheers,
> 
> Tom
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Linaro-mm-sig mailing list
> Linaro-mm-sig@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-mm-sig



WARNING: multiple messages have this Message-ID (diff)
From: daniels@collabora.com (Daniel Stone)
To: linux-arm-kernel@lists.infradead.org
Subject: [Linaro-mm-sig] [RFC 0/1] drm/pl111: Initial drm/kms driver for pl111
Date: Sat, 14 Sep 2013 17:33:51 -0400	[thread overview]
Message-ID: <1379194431.2978.22.camel@nightslugs> (raw)
In-Reply-To: <000101ce9298$8ce44ee0$a6aceca0$@cooksey@arm.com>

Hi,

On Tue, 2013-08-06 at 12:31 +0100, Tom Cooksey wrote:
> > >> On Fri, Jul 26, 2013 at 11:58 AM, Tom Cooksey <tom.cooksey@arm.com>
> > >> wrote:
> > that was part of the reason to punt this problem to userspace ;-)
> >
> > In practice, the kernel drivers doesn't usually know too much about
> > the dimensions/format/etc.. that is really userspace level knowledge.
> > There are a few exceptions when the kernel needs to know how to setup
> > GTT/etc for tiled buffers, but normally this sort of information is up
> > at the next level up (userspace, and drm_framebuffer in case of
> > scanout).  Userspace media frameworks like GStreamer already have a
> > concept of format/caps negotiation.  For non-display<->gpu sharing, I
> > think this is probably where this sort of constraint negotiation
> > should be handled.

Egads.  GStreamer's caps negotiation is already close to unbounded time;
seems like most of the optimisation work that goes into it these days is
all about _reducing_ the complexity of caps negotiation!

> I agree that user-space will know which devices will access the buffer
> and thus can figure out at least a common pixel format.

Hm, are you sure about that? The answer is yes for 'userspace' as a
broad handwave, but not necessarily for individual processes.  Take, for
instance, media decode through GStreamer, being displayed by Wayland
using a KMS plane/overlay/sprite/cursor/etc.  The media player knows
that the buffers are coming from the decode engine, and Wayland knows
that the buffers are going to a KMS plane, but neither of them knows the
full combination of the two.

Though this kinda feeds into an idea I've been kicking around for a
while, which is an 'optimal hint' mechanism in the Wayland protocol.  So
for our hypothetical dmabuf-using protocol, we'd start off with buffers
which satisfied all the constraints of our media decode engine, but
perhaps just the GPU rather than display controller.  At this point,
we'd note that we could place the video in a plane if only the buffers
were better-allocated, and send an event to the client letting it know
how to tweak its buffer allocation for more optimal display.

But ...

> Though I'm not
> so sure userspace can figure out more low-level details like alignment
> and placement in physical memory, etc.
> 
> Anyway, assuming user-space can figure out how a buffer should be 
> stored in memory, how does it indicate this to a kernel driver and 
> actually allocate it? Which ioctl on which device does user-space
> call, with what parameters? Are you suggesting using something like
> ION which exposes the low-level details of how buffers are laid out in
> physical memory to userspace? If not, what?

... this is still rather unresolved. ;)

Cheers,
Daniel


> 
> Cheers,
> 
> Tom
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Linaro-mm-sig mailing list
> Linaro-mm-sig at lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/linaro-mm-sig

  parent reply	other threads:[~2013-09-14 21:34 UTC|newest]

Thread overview: 131+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 17:17 [RFC 0/1] drm/pl111: Initial drm/kms driver for pl111 tom.cooksey
2013-07-25 17:17 ` tom.cooksey
2013-07-25 17:17 ` tom.cooksey at arm.com
2013-07-25 17:17 ` [RFC 1/1] " tom.cooksey
2013-08-07 16:17   ` Rob Clark
2013-08-07 16:46     ` Daniel Vetter
2013-08-07 16:46       ` Daniel Vetter
2013-08-07 16:46       ` Daniel Vetter
2013-08-09 16:15       ` Tom Cooksey
2013-08-09 16:15       ` Tom Cooksey
2013-08-09 16:15       ` Tom Cooksey
     [not found]       ` <520515b0.88b70e0a.3ecd.1004SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-09 16:34         ` Rob Clark
2013-08-09 16:34           ` Rob Clark
2013-08-09 16:34           ` Rob Clark
2013-08-09 16:57           ` Daniel Vetter
2013-08-09 16:57             ` Daniel Vetter
2013-08-09 16:57             ` Daniel Vetter
2013-08-09 17:31             ` Tom Cooksey
2013-08-13 14:35               ` Tom Cooksey
2013-08-13 14:35               ` Tom Cooksey
2013-08-13 14:35               ` Tom Cooksey
2013-08-09 17:31             ` Tom Cooksey
2013-08-09 17:31             ` Tom Cooksey
     [not found]             ` <5205277e.84320f0a.1cdf.ffff8816SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-10 12:30               ` Rob Clark
2013-08-10 12:30                 ` Rob Clark
2013-08-10 12:30                 ` Rob Clark
     [not found]             ` <520a4435.070a0e0a.4fce.ffff9731SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-13 14:58               ` Rob Clark
2013-08-13 14:58                 ` Rob Clark
2013-08-13 14:58                 ` Rob Clark
2013-08-14 14:59                 ` Tom Cooksey
2013-08-14 14:59                 ` Tom Cooksey
2013-08-14 14:59                 ` Tom Cooksey
2013-08-10  4:56       ` Inki Dae
2013-07-25 18:21 ` [RFC 0/1] " Rob Clark
2013-07-25 18:21   ` Rob Clark
2013-07-25 18:21   ` Rob Clark
2013-07-26 14:06   ` Pawel Moll
2013-07-26 14:06     ` Pawel Moll
2013-07-26 14:06     ` Pawel Moll
2013-07-26 14:21     ` Rob Clark
2013-07-26 14:21       ` Rob Clark
2013-07-26 14:21       ` Rob Clark
2013-07-26 14:41       ` Pawel Moll
2013-07-26 14:41         ` Pawel Moll
2013-07-26 14:41         ` Pawel Moll
2013-07-26 14:14   ` Russell King - ARM Linux
2013-07-26 14:14     ` Russell King - ARM Linux
2013-07-26 14:14     ` Russell King - ARM Linux
2013-07-26 14:24     ` Rob Clark
2013-07-26 14:24       ` Rob Clark
2013-07-26 14:24       ` Rob Clark
2013-07-26 15:58   ` Tom Cooksey
2013-07-26 15:58   ` Tom Cooksey
2013-07-26 15:58   ` Tom Cooksey
     [not found]   ` <51f29cd1.e686440a.66b2.fffff9d5SMTPIN_ADDED_BROKEN@mx.google.com>
2013-07-26 18:56     ` Daniel Vetter
2013-07-26 18:56       ` Daniel Vetter
2013-07-26 18:56       ` Daniel Vetter
     [not found]   ` <51f29ccd.f014b40a.34cc.ffffca2aSMTPIN_ADDED_BROKEN@mx.google.com>
2013-07-29 14:58     ` Rob Clark
2013-07-29 14:58       ` Rob Clark
2013-07-29 14:58       ` Rob Clark
2013-08-05 17:10       ` Tom Cooksey
2013-08-05 17:10       ` Tom Cooksey
2013-08-05 17:10       ` Tom Cooksey
     [not found]       ` <51ffdc7e.06b8b40a.2cc8.0fe0SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-05 18:07         ` Rob Clark
2013-08-05 18:07           ` Rob Clark
2013-08-05 18:07           ` Rob Clark
2013-08-06 11:31           ` Tom Cooksey
2013-08-06 11:31           ` Tom Cooksey
2013-08-06 11:31           ` Tom Cooksey
2013-08-06 12:18             ` [Linaro-mm-sig] " Lucas Stach
2013-08-06 12:18               ` Lucas Stach
2013-08-06 12:18               ` Lucas Stach
2013-08-06 14:14               ` Rob Clark
2013-08-06 14:14                 ` Rob Clark
2013-08-06 14:14                 ` Rob Clark
2013-08-06 14:36                 ` Lucas Stach
2013-08-06 14:36                   ` Lucas Stach
2013-08-06 14:36                   ` Lucas Stach
2013-08-06 14:59                   ` Rob Clark
2013-08-06 14:59                     ` Rob Clark
2013-08-06 14:59                     ` Rob Clark
2013-08-06 15:28               ` Daniel Vetter
2013-08-06 15:28                 ` Daniel Vetter
2013-08-06 15:28                 ` Daniel Vetter
2013-08-06 15:28                 ` Daniel Vetter
2013-09-14 21:33             ` Daniel Stone [this message]
2013-09-14 21:33               ` Daniel Stone
2013-09-14 21:33               ` Daniel Stone
     [not found]           ` <5200deb3.0b24b40a.3b26.ffffbadeSMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-06 12:15             ` Rob Clark
2013-08-06 12:15               ` Rob Clark
2013-08-06 12:15               ` Rob Clark
2013-08-06 14:03               ` Tom Cooksey
2013-08-06 14:03               ` Tom Cooksey
2013-08-06 14:03               ` Tom Cooksey
     [not found]               ` <52010257.245fc20a.6ff8.1cfdSMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-06 14:40                 ` Rob Clark
2013-08-06 14:40                   ` Rob Clark
2013-08-06 14:40                   ` Rob Clark
2013-08-06 17:38                   ` Tom Cooksey
2013-08-06 17:38                   ` Tom Cooksey
2013-08-06 17:38                   ` Tom Cooksey
     [not found]                   ` <52013482.e107c20a.27f9.ffffa718SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-06 19:06                     ` Rob Clark
2013-08-06 19:06                       ` Rob Clark
2013-08-06 19:06                       ` Rob Clark
2013-08-07 17:33                       ` Tom Cooksey
2013-08-07 17:33                       ` Tom Cooksey
2013-08-07 17:33                       ` Tom Cooksey
     [not found]                       ` <520284fe.a16ec20a.2d3c.6e19SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-07 17:56                         ` [Linaro-mm-sig] " Alex Deucher
2013-08-07 17:56                           ` Alex Deucher
2013-08-07 17:56                           ` Alex Deucher
     [not found]                       ` <520284d6.07300f0a.72a4.1623SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-07 18:12                         ` Rob Clark
2013-08-07 18:12                           ` Rob Clark
2013-08-07 18:12                           ` Rob Clark
2013-08-09 16:15                           ` Tom Cooksey
2013-08-09 16:15                           ` Tom Cooksey
2013-08-09 16:15                           ` Tom Cooksey
     [not found]                           ` <520515b9.87370f0a.16e6.2380SMTPIN_ADDED_BROKEN@mx.google.com>
2013-08-09 17:12                             ` Rob Clark
2013-08-09 17:12                               ` Rob Clark
2013-08-09 17:12                               ` Rob Clark
2013-08-14 15:01                               ` Tom Cooksey
2013-08-14 15:01                               ` Tom Cooksey
2013-08-14 15:01                               ` Tom Cooksey
2013-08-07  4:23               ` John Stultz
2013-08-07  4:23                 ` John Stultz
2013-08-07  4:23                 ` John Stultz
2013-08-07  4:23                 ` John Stultz
2013-08-07 13:27                 ` Rob Clark
2013-08-07 13:27                   ` Rob Clark
2013-08-07 13:27                   ` Rob Clark
2013-08-07  3:57       ` John Stultz
2013-08-07  3:57         ` John Stultz
2013-08-07  3:57         ` John Stultz

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=1379194431.2978.22.camel@nightslugs \
    --to=daniels@collabora.com \
    --cc=Pawel.Moll@arm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=tom.cooksey@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.