OSDN Git Service

drm: stm: implement get_scanout_position function
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>
Fri, 29 Jun 2018 13:01:40 +0000 (15:01 +0200)
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>
Thu, 27 Sep 2018 13:04:26 +0000 (15:04 +0200)
commit53273b5222082c021ac8889387ffe4cc89206f14
tree9e08fe302ac557e92d02bcc64aa20884f38d2cac
parent17fd7a9d324fd3af613ddd76f0439481acaad23d
drm: stm: implement get_scanout_position function

Hardware allow to read the position in scanout buffer so
we can use this information to make wait of vblank more accurate.

Active area bounds (start, end, total height) have already been
computed and written in ltdc registers, read them and get the
current line position to compute vpos value.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Reviewed-by: Yannick Fertré <yannick.fertre@st.com>
Tested-by: Yannick Fertré <yannick.fertre@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180629130140.16004-1-benjamin.gaignard@linaro.org
drivers/gpu/drm/stm/drv.c
drivers/gpu/drm/stm/ltdc.c
drivers/gpu/drm/stm/ltdc.h