aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorMarek Szyprowski <m.szyprowski@samsung.com>2016-06-13 05:11:26 -0400
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2016-07-29 03:59:30 -0400
commit44d1240d006c9cd0249263b5449c8e4752500f6a (patch)
tree7d4696d61dbeee0d4f653fbfbcec7f5d255a4e70 /drivers/gpu/drm/drm_atomic.c
parent62c2cd0f49333a2bb53602ec23039ca99a19cb9d (diff)
drm: add generic zpos property
version 8: - move drm_blend.o from drm-y to drm_kms_helper-y to avoid EXPORT_SYMBOL(drm_atomic_helper_normalize_zpos) - remove dead function declarations in drm_crtc.h version 7: - remove useless EXPORT_SYMBOL() - better z-order wording in Documentation version 6: - add zpos in gpu documentation file - merge Ville patch about zpos initial value and API improvement. I have split Ville patch between zpos core and drivers version 5: - remove zpos range check and comeback to 0 to N-1 normalization algorithm version 4: - make sure that normalized zpos value is stay in the defined property range and warn user if not This patch adds support for generic plane's zpos property property with well-defined semantics: - added zpos properties to plane and plane state structures - added helpers for normalizing zpos properties of given set of planes - well defined semantics: planes are sorted by zpos values and then plane id value if zpos equals Normalized zpos values are calculated automatically when generic muttable zpos property has been initialized. Drivers can simply use plane_state->normalized_zpos in their atomic_check and/or plane_update callbacks without any additional calls to DRM core. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Compare to Marek's original patch zpos property is now specific to each plane and no more to the core. Normalize function take care of the range of per plane defined range before set normalized_zpos. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Ville Syrjala <ville.syrjala@linux.intel.com> Cc: Joonyoung Shim <jy0922.shim@samsung.com> Cc: Seung-Woo Kim <sw0312.kim@samsung.com> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Cc: Gustavo Padovan <gustavo@padovan.org> Cc: vincent.abriou@st.com Cc: fabien.dessenne@st.com Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 8d2f111fa113..fa3930757972 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -711,6 +711,8 @@ int drm_atomic_plane_set_property(struct drm_plane *plane,
711 state->src_h = val; 711 state->src_h = val;
712 } else if (property == config->rotation_property) { 712 } else if (property == config->rotation_property) {
713 state->rotation = val; 713 state->rotation = val;
714 } else if (property == plane->zpos_property) {
715 state->zpos = val;
714 } else if (plane->funcs->atomic_set_property) { 716 } else if (plane->funcs->atomic_set_property) {
715 return plane->funcs->atomic_set_property(plane, state, 717 return plane->funcs->atomic_set_property(plane, state,
716 property, val); 718 property, val);
@@ -767,6 +769,8 @@ drm_atomic_plane_get_property(struct drm_plane *plane,
767 *val = state->src_h; 769 *val = state->src_h;
768 } else if (property == config->rotation_property) { 770 } else if (property == config->rotation_property) {
769 *val = state->rotation; 771 *val = state->rotation;
772 } else if (property == plane->zpos_property) {
773 *val = state->zpos;
770 } else if (plane->funcs->atomic_get_property) { 774 } else if (plane->funcs->atomic_get_property) {
771 return plane->funcs->atomic_get_property(plane, state, property, val); 775 return plane->funcs->atomic_get_property(plane, state, property, val);
772 } else { 776 } else {