diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2015-04-01 12:02:09 -0400 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2015-04-12 22:39:39 -0400 |
commit | 92104886e4834c2ceb8748efa49d040714018eb5 (patch) | |
tree | cbd5b1d0261d89dcb5b8acc4d5d62bad73a51457 | |
parent | 6e2a3b66e78b693065ee67af91175a1a7e4dc209 (diff) |
drm/exynos: make zpos property immutable
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>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_plane.c | 21 |
1 files 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 cee980e86fcd..d8bb6a1040ef 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) | |||
184 | drm_plane_cleanup(plane); | 184 | drm_plane_cleanup(plane); |
185 | } | 185 | } |
186 | 186 | ||
187 | static int exynos_plane_set_property(struct drm_plane *plane, | ||
188 | struct drm_property *property, | ||
189 | uint64_t val) | ||
190 | { | ||
191 | struct drm_device *dev = plane->dev; | ||
192 | struct exynos_drm_plane *exynos_plane = to_exynos_plane(plane); | ||
193 | struct exynos_drm_private *dev_priv = dev->dev_private; | ||
194 | |||
195 | if (property == dev_priv->plane_zpos_property) { | ||
196 | exynos_plane->zpos = val; | ||
197 | return 0; | ||
198 | } | ||
199 | |||
200 | return -EINVAL; | ||
201 | } | ||
202 | |||
203 | static struct drm_plane_funcs exynos_plane_funcs = { | 187 | static struct drm_plane_funcs exynos_plane_funcs = { |
204 | .update_plane = exynos_update_plane, | 188 | .update_plane = exynos_update_plane, |
205 | .disable_plane = exynos_disable_plane, | 189 | .disable_plane = exynos_disable_plane, |
206 | .destroy = exynos_plane_destroy, | 190 | .destroy = exynos_plane_destroy, |
207 | .set_property = exynos_plane_set_property, | ||
208 | }; | 191 | }; |
209 | 192 | ||
210 | static void exynos_plane_attach_zpos_property(struct drm_plane *plane, | 193 | 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, | |||
216 | 199 | ||
217 | prop = dev_priv->plane_zpos_property; | 200 | prop = dev_priv->plane_zpos_property; |
218 | if (!prop) { | 201 | if (!prop) { |
219 | prop = drm_property_create_range(dev, 0, "zpos", 0, | 202 | prop = drm_property_create_range(dev, DRM_MODE_PROP_IMMUTABLE, |
220 | MAX_PLANE - 1); | 203 | "zpos", 0, MAX_PLANE - 1); |
221 | if (!prop) | 204 | if (!prop) |
222 | return; | 205 | return; |
223 | 206 | ||