All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	linux-samsung-soc@vger.kernel.org,
	Inki Dae <inki.dae@samsung.com>, Daniel Vetter <daniel@ffwll.ch>,
	Joonyoung Shim <jy0922.shim@samsung.com>,
	Seung-Woo Kim <sw0312.kim@samsung.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Tobias Jakobi <tjakobi@math.uni-bielefeld.de>,
	Gustavo Padovan <gustavo@padovan.org>,
	Vincent Abriou <vincent.abriou@st.com>,
	Fabien Dessenne <fabien.dessenne@st.com>
Subject: Re: [PATCH v5 1/5] drm: add generic zpos property
Date: Fri, 1 Apr 2016 14:48:02 +0200	[thread overview]
Message-ID: <CA+M3ks4cg3T_q9Ug1_Uc4yrZKsK97rK+QA0FijDUnUKCMkpcAg@mail.gmail.com> (raw)
In-Reply-To: <20160229151219.GW15993@intel.com>

This patch adds support for generic plane's zpos property property with
well-defined semantics:
- added zpos properties to plane and plane state structures
- added helpers for normalizing zpos properties of given set of planes
- well defined semantics: planes are sorted by zpos values and then plane
  id value if zpos equals

Normalized zpos values are calculated automatically when generic
muttable zpos property has been initialized. Drivers can simply use
plane_state->normalized_zpos in their atomic_check and/or plane_update
callbacks without any additional calls to DRM core.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

Compare to Marek's original patch zpos property is now specific to each
plane and no more to the core.
Normalize function take care of the range of per plane defined range
before set normalized_zpos.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
 Documentation/DocBook/gpu.tmpl      |  10 ++
 drivers/gpu/drm/Makefile            |   2 +-
 drivers/gpu/drm/drm_atomic_helper.c |   6 +
 drivers/gpu/drm/drm_blend.c         | 283 ++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_crtc_internal.h |   3 +
 include/drm/drm_crtc.h              |  25 ++++
 6 files changed, 328 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/drm_blend.c

diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl
index 1692c4d..b7a5161 100644
--- a/Documentation/DocBook/gpu.tmpl
+++ b/Documentation/DocBook/gpu.tmpl
@@ -2147,6 +2147,16 @@ void intel_crt_init(struct drm_device *dev)
  the underlying hardware).</td>
  </tr>
  <tr>
+ <td valign="top" > "zpos" </td>
+ <td valign="top" >RANGE</td>
+ <td valign="top" >Min= driver dependent, Max= driver dependent</td>
+ <td valign="top" >Plane</td>
+ <td valign="top" >Plane's 'z' position during blending operation (0
for background, highest for frontmost).
+ If two planes assigned to same CRTC have equal zpos values, the
plane with higher plane
+ id is treated as closer to front. Can be IMMUTABLE if driver doesn't
support changing
+ planes' order. Exact value range is driver dependent.</td>
+ </tr>
+ <tr>
  <td rowspan="20" valign="top" >i915</td>
  <td rowspan="2" valign="top" >Generic</td>
  <td valign="top" >"Broadcast RGB"</td>
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
index 6eb94fc..18dc563 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -2,7 +2,7 @@
 # Makefile for the drm device driver.  This driver provides support for the

  parent reply	other threads:[~2016-04-01 12:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 14:44 [PATCH v5 0/5] drm/exynos: introduce generic zpos and blending properties Marek Szyprowski
2016-01-27 14:44 ` [PATCH v5 1/5] drm: add generic zpos property Marek Szyprowski
2016-02-29 15:12   ` Ville Syrjälä
2016-03-23  8:46     ` Benjamin Gaignard
2016-04-01 12:48     ` Benjamin Gaignard [this message]
2016-05-09  8:42       ` Benjamin Gaignard
2016-05-09  9:05         ` Daniel Vetter
2016-05-09 10:21           ` Tobias Jakobi
2016-01-27 14:44 ` [PATCH v5 2/5] drm/exynos: use generic code for managing zpos plane property Marek Szyprowski
2016-02-28 23:27   ` Inki Dae
2016-01-27 14:44 ` [PATCH v5 3/5] drm: simplify initialization of rotation property Marek Szyprowski
2016-02-29 15:06   ` Daniel Vetter
2016-02-29 15:09     ` Daniel Vetter
2016-02-29 15:17       ` Daniel Vetter
2016-02-29 15:13   ` Ville Syrjälä
2016-01-27 14:44 ` [PATCH v5 4/5] drm: add generic blending related properties Marek Szyprowski
2016-02-29 15:23   ` Ville Syrjälä
2016-01-27 14:44 ` [PATCH v5 5/5] drm/exynos: add support for blending properties Marek Szyprowski
2016-02-28 23:31   ` Inki Dae
2016-02-23  9:10 ` [PATCH v5 0/5] drm/exynos: introduce generic zpos and " Benjamin Gaignard

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=CA+M3ks4cg3T_q9Ug1_Uc4yrZKsK97rK+QA0FijDUnUKCMkpcAg@mail.gmail.com \
    --to=benjamin.gaignard@linaro.org \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fabien.dessenne@st.com \
    --cc=gustavo@padovan.org \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sw0312.kim@samsung.com \
    --cc=tjakobi@math.uni-bielefeld.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=vincent.abriou@st.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.