From patchwork Thu Jan 7 13:30:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 59280 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp551259lbb; Thu, 7 Jan 2016 05:31:05 -0800 (PST) X-Received: by 10.66.235.202 with SMTP id uo10mr19825123pac.63.1452173465046; Thu, 07 Jan 2016 05:31:05 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id re5si9080459pab.139.2016.01.07.05.31.04; Thu, 07 Jan 2016 05:31:05 -0800 (PST) Received-SPF: pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDC306E66D; Thu, 7 Jan 2016 05:31:03 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id F12916E66D for ; Thu, 7 Jan 2016 05:31:01 -0800 (PST) Received: by mail-wm0-f44.google.com with SMTP id b14so123392854wmb.1 for ; Thu, 07 Jan 2016 05:31:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PBzyg31XzZuQNKiv04HxGNsQLvd29AxV9Gvj1rIEUIo=; b=fJG54inegRkD9Y0WzjvNLDGplGkdq06iirGr/TMdwVYYXvJOnZ9KQliqDsWN4nxHoa 5+fCh748/Ld3qxYTJwTtSS9/RnPKnebCKH+IoXcoIaY7YqzUsBoPA24kebkcF2aeGful QDc219NA/VU7yY+XWr5D4SIQuvITu/A1o1dI0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PBzyg31XzZuQNKiv04HxGNsQLvd29AxV9Gvj1rIEUIo=; b=QlYnE2NS6hAcCgU/twz/IHwHR1kCQMpLLAKwMJ07xfpvdgicvCATHsiJfNxSrKJGTf i2hLIrixQSmNSSpWCKvBUegdiQSclMBnluVqEvy1aKgLipwgm/84q4j79q+vgh/EhWiN XI2iPpfTGoaSp9c+FzvZEZhvDObngkYJTi4Z4ely94Sfgs78indxES/twh/P164UX8pQ 1fqjXZ9ypNzzfOJ8Qn8mlE9FwTb5ULMuowrIUTsbhuT7c0rVI6YkdgAuukGb393RI4EP sLxA6yy5jE2erWSZSmMJwyWpokWgmF3BB6fr4mAvfWBo26bESKxNpTwjlu5QWDN/BigG G6xA== X-Gm-Message-State: ALoCoQk6K2P1lauR7Q2Zm4JnqqpRG4gJMsqkqlm6fsPCfnWa/UzA07br71JK7ksgBXa107GN6RtNNTPLAB0Ng6xMHYjWDoqglg== X-Received: by 10.194.75.202 with SMTP id e10mr127998470wjw.160.1452173460427; Thu, 07 Jan 2016 05:31:00 -0800 (PST) Received: from LMENX321.lme.st.com (LPuteaux-656-1-48-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by smtp.gmail.com with ESMTPSA id i2sm11863922wjx.42.2016.01.07.05.30.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Jan 2016 05:30:59 -0800 (PST) From: Benjamin Gaignard To: dri-devel@lists.freedesktop.org, vincent.abriou@st.com, fabien.dessenne@st.com Subject: [PATCH 2/5] drm: sti: add atomic get/set properties for planes Date: Thu, 7 Jan 2016 14:30:38 +0100 Message-Id: <1452173441-30033-3-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452173441-30033-1-git-send-email-benjamin.gaignard@linaro.org> References: <1452173441-30033-1-git-send-email-benjamin.gaignard@linaro.org> Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Without those function zpos property isn't displayed in atomic mode. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_plane.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/drivers/gpu/drm/sti/sti_plane.c b/drivers/gpu/drm/sti/sti_plane.c index 2e5c751..e739c5a 100644 --- a/drivers/gpu/drm/sti/sti_plane.c +++ b/drivers/gpu/drm/sti/sti_plane.c @@ -69,6 +69,44 @@ static int sti_plane_set_property(struct drm_plane *drm_plane, return -EINVAL; } +static int sti_plane_atomic_set_property(struct drm_plane *drm_plane, + struct drm_plane_state *state, + struct drm_property *property, + uint64_t val) +{ + struct drm_device *dev = drm_plane->dev; + struct sti_private *private = dev->dev_private; + struct sti_plane *plane = to_sti_plane(drm_plane); + + DRM_DEBUG_DRIVER("\n"); + + if (property == private->plane_zorder_property) { + plane->zorder = val; + return 0; + } + + return -EINVAL; +} + +static int sti_plane_atomic_get_property(struct drm_plane *drm_plane, + const struct drm_plane_state *state, + struct drm_property *property, + uint64_t *val) +{ + struct drm_device *dev = drm_plane->dev; + struct sti_private *private = dev->dev_private; + struct sti_plane *plane = to_sti_plane(drm_plane); + + DRM_DEBUG_DRIVER("\n"); + + if (property == private->plane_zorder_property) { + *val = plane->zorder; + return 0; + } + + return -EINVAL; +} + static void sti_plane_attach_zorder_property(struct drm_plane *drm_plane) { struct drm_device *dev = drm_plane->dev; @@ -116,4 +154,6 @@ struct drm_plane_funcs sti_plane_helpers_funcs = { .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, + .atomic_set_property = sti_plane_atomic_set_property, + .atomic_get_property = sti_plane_atomic_get_property, };