linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: wens@csie.org, airlied@linux.ie, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org, icenowy@aosc.io,
	linux-sunxi@googlegroups.com
Subject: Re: [PATCH 02/17] drm/sun4i: Start using layer id in DE2 driver
Date: Tue, 28 Nov 2017 21:21:05 +0100	[thread overview]
Message-ID: <20171128202105.rrwldhr4e4n3x4ya@flea.home> (raw)
In-Reply-To: <20171127205750.19277-3-jernej.skrabec@siol.net>

[-- Attachment #1: Type: text/plain, Size: 1614 bytes --]

On Mon, Nov 27, 2017 at 09:57:35PM +0100, Jernej Skrabec wrote:
> Till now, plane selection was hardcoded to first overlay in first UI
> channel.
> 
> It turns out that overlays don't fit well in current DRM design, because
> they can't be blended together or scaled independetly when they are set
> to same channel.
> 
> Beause of that, always use only first overlay in each channel. This
> simplifies things, since layer parameter can be then used as channel
> selection.
> 
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
> ---
>  drivers/gpu/drm/sun4i/sun8i_layer.c |  2 +-
>  drivers/gpu/drm/sun4i/sun8i_mixer.c | 31 +++++++++++--------------------
>  2 files changed, 12 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/sun4i/sun8i_layer.c b/drivers/gpu/drm/sun4i/sun8i_layer.c
> index 23810ff72684..5b2d45a9db8a 100644
> --- a/drivers/gpu/drm/sun4i/sun8i_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun8i_layer.c
> @@ -126,7 +126,7 @@ struct drm_plane **sun8i_layers_init(struct drm_device *drm,
>  			return ERR_CAST(layer);
>  		};
>  
> -		layer->id = i;
> +		layer->id = mixer->cfg->vi_num + i;
>  		planes[i] = &layer->plane;
>  	};

So we had pretty much the same intent here :)

But I really feel we should model the hardware and have both the
channel and layer IDs. Obviously, at (that patch) moment, we don't
have support for multiple layers per channel, but eventually we should
really model the hardware as much as possible.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-11-28 20:21 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 20:57 [PATCH 00/17] Improve DE2 support Jernej Skrabec
2017-11-27 20:57 ` [PATCH 01/17] drm/sun4i: Refactor DE2 code Jernej Skrabec
2017-11-28 15:54   ` Maxime Ripard
2017-11-28 18:49     ` Jernej Škrabec
2017-11-27 20:57 ` [PATCH 02/17] drm/sun4i: Start using layer id in DE2 driver Jernej Skrabec
2017-11-28 20:21   ` Maxime Ripard [this message]
2017-11-27 20:57 ` [PATCH 03/17] drm/sun4i: Add constraints checking to " Jernej Skrabec
2017-11-27 20:57 ` [PATCH 04/17] drm/sun4i: Use values calculated by atomic check Jernej Skrabec
2017-11-27 20:57 ` [PATCH 05/17] drm/sun4i: Reorder some code in DE2 Jernej Skrabec
2017-11-28 20:26   ` Maxime Ripard
2017-11-27 20:57 ` [PATCH 06/17] drm/sun4i: Add multi plane support to DE2 driver Jernej Skrabec
2017-11-27 20:57 ` [PATCH 07/17] drm/sun4i: Add support for all HW supported DE2 RGB formats Jernej Skrabec
2017-11-27 20:57 ` [PATCH 08/17] drm/sun4i: Add support for DE2 VI planes Jernej Skrabec
2017-11-28 21:00   ` Maxime Ripard
2017-11-28 21:28     ` Jernej Škrabec
2017-11-29 22:01     ` Jernej Škrabec
2017-11-27 20:57 ` [PATCH 09/17] drm/sun4i: Add scaler library for DE2 Jernej Skrabec
2017-11-28 20:40   ` Maxime Ripard
2017-11-27 20:57 ` [PATCH 10/17] drm/sun4i: Add scaler configuration to DE2 mixers Jernej Skrabec
2017-11-28 20:31   ` Maxime Ripard
2017-11-27 20:57 ` [PATCH 11/17] drm/sun4i: Wire in DE2 scaler support Jernej Skrabec
2017-11-28 20:42   ` Maxime Ripard
2017-11-29 21:48   ` [linux-sunxi] " Julian Calaby
2017-11-29 21:59     ` Jernej Škrabec
2017-11-27 20:57 ` [PATCH 12/17] drm/sun4i: Add CCSC property to DE2 configuration Jernej Skrabec
2017-11-28 12:02   ` Icenowy Zheng
2017-11-28 20:43     ` Maxime Ripard
2017-11-28 20:44   ` Maxime Ripard
2017-11-27 20:57 ` [PATCH 13/17] drm/sun4i: Add DE2 CSC library Jernej Skrabec
2017-11-28 20:55   ` Maxime Ripard
2017-11-28 21:43     ` Jernej Škrabec
2017-11-29  3:20       ` Chen-Yu Tsai
2017-11-29 15:27       ` Maxime Ripard
2017-11-27 20:57 ` [PATCH 14/17] drm/sun4i: Add DE2 definitions for YUV formats Jernej Skrabec
2017-11-27 20:57 ` [PATCH 15/17] drm/sun4i: Expand DE2 scaler lib with YUV support Jernej Skrabec
2017-11-27 20:57 ` [PATCH 16/17] drm/sun4i: Wire in DE2 " Jernej Skrabec
2017-11-27 20:57 ` [PATCH 17/17] [DO NOT MERGE]drm/sun4i: Change zpos of bottom VI plane Jernej Skrabec

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=20171128202105.rrwldhr4e4n3x4ya@flea.home \
    --to=maxime.ripard@free-electrons.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=icenowy@aosc.io \
    --cc=jernej.skrabec@siol.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=wens@csie.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).