dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Daniel Vetter <daniel@ffwll.ch>, Daniel Stone <daniel@fooishbar.org>
Cc: Rob Clark <robdclark@gmail.com>,
	"moderated list:ARM/S5P EXYNOS AR..."
	<linux-samsung-soc@vger.kernel.org>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 04/14] drm/exynos: remove struct *_win_data abstraction on planes
Date: Fri, 06 Feb 2015 12:39:26 +0900	[thread overview]
Message-ID: <54D4376E.6090707@samsung.com> (raw)
In-Reply-To: <20150205130605.GT14009@phenom.ffwll.local>

Hi,

On 02/05/2015 10:06 PM, Daniel Vetter wrote:
> On Thu, Feb 05, 2015 at 12:48:07PM +0000, Daniel Stone wrote:
>> Hi,
>>
>> On 5 February 2015 at 12:26, Rob Clark <robdclark@gmail.com> wrote:
>>> On Thu, Feb 5, 2015 at 4:15 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
>>>> Yeah I noticed the zpos fun when hacking around too. Exynos should
>>>> probably switch defaults so that overlays are visible by default. And we
>>>> need to standardize the zpos property so that other drivers can use it
>>>> too.
>>>
>>> jfyi, I have a bit of logic in mdp5_crtc_atomic_check() (and really
>>> mdp4 probably needs the same) to sort attached planes and derive the
>>> actual hw zpos (with each layer having a unique zpos)..
>>>
>>> I suspect most hw will end up needing the same (ie. dislike having two
>>> overlays at same zpos), so might not be a horrible idea to make the
>>> atomic helpers do this sorting for us..
> 
> Oh yeah such a helper would be nice. Especially since on intel hw flipping
> planes around means fishing the right value out of some enum table ;-)
> So some sort of helper to compute the absolute ordering in a stable way
> would be nice.
> 
>> Same with Exynos, except it's a bit funnier still. In terms of its
>> hardware, each CRTC has a number of planes which have a fixed zpos.
>> The reason exynos_drm exposes zpos is because it sets up a fixed
>> number of planes for the entire device and declares they can run
>> across every single CRTC, and then works out from the combination of
>> CRTC assignment and zpos property, which hardware plane to assign it
>> to. This includes the primary, so if you accidentally get zpos==0 in
>> there, then you smash the primary plane. Or set a duplicate zpos and
>> then the last one in wins.
>>
>> It also means if you're using multiple CRTCs (e.g. FIMD for internal
>> panel plus mixer for external HDMI), then you can only use 5 planes in
>> total, rather than 5 planes per head. (And let's not forget that each
>> backend has disjoint format support, so again the driver just lies to
>> you and claims to support them all, with a silent fallback via a
>> default case statement when the format isn't actually supported.
>> Whoops.)
>>
>> I think a more ideal setup would be a much more direct 1:1 mapping
>> with the hardware, where each actual plane on each actual CRTC gets
>> exposed directly to userspace, perhaps with a fixed/read-only zpos
>> property to tell the userspace which plane it's actually configuring.
>> I suspect this would be a pretty good map to other hardware as well.
> 
> Hm that sounds indeed a bit funny. I agree that exynos should split planes
> into per-crtc and separate the code and capability tables out so that
> there's less lying. And zpos should probably be converted to a read-only
> property to tell userspace about the facts, instead of doing something
> funny behind the scenes.

I agree, it seems be time to convert each planes have unique zpos.

Thanks.

  reply	other threads:[~2015-02-06  3:39 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 19:14 [PATCH 00/14] drm/exynos: cleanups + atomic phases 1 and 2 Gustavo Padovan
2015-02-03 19:14 ` [PATCH 01/14] drm/exynos: track vblank events on a per crtc basis Gustavo Padovan
2015-02-03 19:14 ` [PATCH 02/14] drm/exynos: Remove exynos_plane_dpms() call with no effect Gustavo Padovan
2015-02-04  7:42   ` Joonyoung Shim
2015-02-04 14:16     ` Daniel Vetter
2015-02-05  1:05       ` Joonyoung Shim
2015-02-05  9:03         ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 03/14] drm/exynos: remove leftover functions declarations Gustavo Padovan
2015-02-03 19:14 ` [PATCH 04/14] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-04  7:44   ` Joonyoung Shim
2015-02-04 14:28     ` Daniel Vetter
2015-02-05  2:37       ` Joonyoung Shim
2015-02-05  9:15         ` Daniel Vetter
2015-02-05 12:26           ` Rob Clark
2015-02-05 12:48             ` Daniel Stone
2015-02-05 13:06               ` Daniel Vetter
2015-02-06  3:39                 ` Joonyoung Shim [this message]
2015-02-03 19:14 ` [PATCH 05/14] drm/exynos: do not copy adjusted mode into mode during crtc mode_set Gustavo Padovan
2015-02-03 19:14 ` [PATCH 06/14] drm/exynos: atomic phase 1: use drm_plane_helper_update() Gustavo Padovan
2015-02-03 19:14 ` [PATCH 07/14] drm/exynos: atomic phase 1: use drm_plane_helper_disable() Gustavo Padovan
2015-02-04  7:47   ` Joonyoung Shim
2015-02-03 19:14 ` [PATCH 08/14] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush() Gustavo Padovan
2015-02-04  7:49   ` Joonyoung Shim
2015-02-04 14:30     ` Daniel Vetter
2015-02-05  2:48       ` Joonyoung Shim
2015-02-05  9:18         ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 09/14] drm/exynos: atomic phase 1: add .mode_set_nofb() callback Gustavo Padovan
2015-02-04  7:51   ` Joonyoung Shim
2015-02-03 19:14 ` [PATCH 10/14] drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy() Gustavo Padovan
2015-02-03 19:14 ` [PATCH 11/14] drm/exynos: atomic phase 2: keep track of framebuffer pointer Gustavo Padovan
2015-02-04  7:53   ` Joonyoung Shim
2015-02-04 14:33     ` Daniel Vetter
2015-02-03 19:14 ` [PATCH 12/14] drm/exynos: make exynos_plane_mode_set() static Gustavo Padovan
2015-02-03 19:14 ` [PATCH 13/14] drm/exynos: use correct pipe number on vblank event Gustavo Padovan
2015-02-03 19:14 ` [PATCH 14/14] drm/exynos: remove exynos_disable_plane() Gustavo Padovan
2015-02-04  7:37 ` [PATCH 00/14] drm/exynos: cleanups + atomic phases 1 and 2 Joonyoung Shim
2015-02-04 14:35   ` Daniel Vetter

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=54D4376E.6090707@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=robdclark@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