All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: linux-samsung-soc@vger.kernel.org
Cc: jy0922.shim@samsung.com, inki.dae@samsung.com,
	dri-devel@lists.freedesktop.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Subject: [PATCH -v2 04/14] drm/exynos: make zpos property immutable
Date: Fri,  6 Feb 2015 17:37:48 -0200	[thread overview]
Message-ID: <1423251478-17043-5-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1423251478-17043-1-git-send-email-gustavo@padovan.org>

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

We already set each plane zpos at init, after that changes to zpos are
not expected. This patch turns zpos into a read-only property so now it is
impossible to set zpos.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/gpu/drm/exynos/exynos_drm_plane.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c
index 8292819..3847545 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
@@ -185,27 +185,10 @@ static void exynos_plane_destroy(struct drm_plane *plane)
 	drm_plane_cleanup(plane);
 }
 
-static int exynos_plane_set_property(struct drm_plane *plane,
-				     struct drm_property *property,
-				     uint64_t val)
-{
-	struct drm_device *dev = plane->dev;
-	struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane);
-	struct exynos_drm_private *dev_priv = dev->dev_private;
-
-	if (property == dev_priv->plane_zpos_property) {
-		exynos_plane->zpos = val;
-		return 0;
-	}
-
-	return -EINVAL;
-}
-
 static struct drm_plane_funcs exynos_plane_funcs = {
 	.update_plane	= exynos_update_plane,
 	.disable_plane	= exynos_disable_plane,
 	.destroy	= exynos_plane_destroy,
-	.set_property	= exynos_plane_set_property,
 };
 
 static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
@@ -217,8 +200,8 @@ static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
 
 	prop = dev_priv->plane_zpos_property;
 	if (!prop) {
-		prop = drm_property_create_range(dev, 0, "zpos", 0,
-						 MAX_PLANE - 1);
+		prop = drm_property_create_range(dev, DRM_MODE_PROP_IMMUTABLE,
+						 "zpos", 0, MAX_PLANE - 1);
 		if (!prop)
 			return;
 
-- 
1.9.3

  parent reply	other threads:[~2015-02-06 19:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 19:37 [PATCH -v2 00/14] drm/exynos: clean up + atomic phase 1 and 2 Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 01/14] drm/exynos: remove unused exynos_crtc->win_enable() callback Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 02/14] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 03/14] drm/exynos: preset zpos value for overlay planes Gustavo Padovan
2015-02-06 19:37 ` Gustavo Padovan [this message]
2015-02-06 19:37 ` [PATCH -v2 05/14] drm/exynos: remove exynos_plane_destroy() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 06/14] drm/exynos: remove leftover functions declarations Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 07/14] drm/exynos: track vblank events on a per crtc basis Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 08/14] drm/exynos: atomic phase 1: use drm_plane_helper_update() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 09/14] drm/exynos: atomic phase 1: use drm_plane_helper_disable() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 10/14] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush() Gustavo Padovan
2015-02-09 14:53   ` Inki Dae
2015-02-09 16:10     ` Daniel Stone
2015-02-09 17:07       ` Gustavo Padovan
2015-02-10  3:13         ` Inki Dae
2015-02-10 12:43           ` Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 11/14] drm/exynos: atomic phase 1: add .mode_set_nofb() callback Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 12/14] drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 13/14] drm/exynos: atomic phase 2: keep track of framebuffer pointer Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 14/14] drm/exynos: make exynos_plane_mode_set() static Gustavo Padovan

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=1423251478-17043-5-git-send-email-gustavo@padovan.org \
    --to=gustavo@padovan.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=inki.dae@samsung.com \
    --cc=jy0922.shim@samsung.com \
    --cc=linux-samsung-soc@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 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.