]> git.baikalelectronics.ru Git - kernel.git/commit
drm/sun4i: sun8i: Avoid clearing blending order at each atomic commit
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Tue, 17 Jul 2018 12:25:22 +0000 (14:25 +0200)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Tue, 17 Jul 2018 15:30:59 +0000 (17:30 +0200)
commitc0cb6cc81493eb91fcfca3ea674e2a3f9d0ef807
tree25e67b0fd7295b747ba0180afee078c54f841d4e
parent68db90ccd7461a45bac211cced3bee7d79487fec
drm/sun4i: sun8i: Avoid clearing blending order at each atomic commit

Blending order is set based on the z position of each DRM plane. The
blending order register is currently cleared at each atomic DRM commit,
with the intent that each committed plane will set the appropriate
bits (based on its z-pos) when enabling the plane.

However, it sometimes happens that a particular plane is left unchanged
by an atomic commit and thus will not be configured again. In that
scenario, blending order is cleared and only the bits relevant for the
planes affected by the commit are set. This leaves the planes that did
not change without their blending order set in the register, leading
to that plane not being displayed.

Instead of clearing the blending order register at every atomic commit,
this change moves the register's initial clear at bind time and only
clears the bits for a specific plane when disabling it or changing its
zpos.

This way, planes that are left untouched by a DRM atomic commit are
no longer disabled.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180717122522.11327-1-paul.kocialkowski@bootlin.com
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sun8i_ui_layer.c
drivers/gpu/drm/sun4i/sun8i_vi_layer.c