[PATCH -v4 5/8] drm/exynos: make zpos property immutable

Gustavo Padovan gustavo at padovan.org
Fri Apr 3 07:59:53 PDT 2015


Hi Inki,

2015-04-03 Inki Dae <inki.dae at samsung.com>:

> On 2015년 04월 02일 01:02, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan at 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 at 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,
> 
> As I commented like below before, This patch would make the
> compatibility of the existing application which uses set_property ioctl
> to be broken. Didn't you check my comment?
> http://www.spinics.net/lists/dri-devel/msg78852.html

I checked that and it is currently not possible to output a error message
when an property is set to immutable. The drm core will return earlier
and never call the driver's set_property callback. We won't be able to add
the error message but I think we need this patch.

	Gustavo


More information about the dri-devel mailing list