From: Inki Dae <inki.dae@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>
Cc: linux-samsung-soc@vger.kernel.org,
Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/7] drm/exynos: make zpos property immutable
Date: Thu, 12 Mar 2015 00:10:37 +0900 [thread overview]
Message-ID: <55005AED.70305@samsung.com> (raw)
In-Reply-To: <1424352158-728-5-git-send-email-gustavo@padovan.org>
On 2015년 02월 19일 22:22, Gustavo Padovan wrote:
> 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 504bd6e..2fbac9b 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_plane.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_plane.c
> @@ -184,27 +184,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,
It's a good idea for a hardware overlay to a plane object isn't changed
by user-space. However, this patch would make the compatibility of the
existing application - using set_property ioctl to change hardware
overlay to particular plane - to be broken because the set_property
ioctl request will always be failed without the set_property callback.
So how about leaving warning message 'the hardware overlay cannot be
changed to another anymore' when the set_property ioctl is requested by
user-space, and returning just 0?
Thanks,
Inki Dae
> };
>
> static void exynos_plane_attach_zpos_property(struct drm_plane *plane,
> @@ -216,8 +199,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;
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-03-11 15:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 13:22 [PATCH 0/7] drm/exynos: clean ups Gustavo Padovan
2015-02-19 13:22 ` [PATCH 1/7] drm/exynos: remove unused exynos_crtc->win_enable() callback Gustavo Padovan
2015-02-19 13:22 ` [PATCH 2/7] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-19 13:22 ` [PATCH 3/7] drm/exynos: preset zpos value for overlay planes Gustavo Padovan
2015-02-19 13:22 ` [PATCH 4/7] drm/exynos: make zpos property immutable Gustavo Padovan
2015-03-11 15:10 ` Inki Dae [this message]
2015-02-19 13:22 ` [PATCH 5/7] drm/exynos: remove exynos_plane_destroy() Gustavo Padovan
2015-02-19 13:22 ` [PATCH 6/7] drm/exynos: remove leftover functions declarations Gustavo Padovan
2015-02-19 13:22 ` [PATCH 7/7] drm/exynos: track vblank events on a per crtc basis Gustavo Padovan
2015-03-12 14:42 ` [PATCH 0/7] drm/exynos: clean ups Inki Dae
2015-03-12 14:57 ` Gustavo Padovan
2015-03-12 18:45 ` Gustavo Padovan
2015-03-13 2:33 ` Inki Dae
-- strict thread matches above, loose matches on Subject: below --
2015-03-23 20:37 [PATCH 0/7] drm/exynos: clean up patches (preparing for atomic) Gustavo Padovan
2015-03-23 20:37 ` [PATCH 4/7] drm/exynos: make zpos property immutable 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=55005AED.70305@samsung.com \
--to=inki.dae@samsung.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=gustavo@padovan.org \
--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.