linux-yocto/drivers/gpu/drm/sun4i
Ondrej Jirman f8d59fac57
drm/sun4i: Fix layer zpos change/atomic modesetting
Identical configurations of planes can lead to different (and wrong)
layer -> pipe routing at HW level, depending on the order of atomic
plane changes.

For example:

- Layer 1 is configured to zpos 0 and thus uses pipe 0. No other layer
  is enabled. This is a typical situation at boot.

- When a compositor takes over and layer 3 is enabled,
  sun8i_ui_layer_enable() will get called with old_zpos=0 zpos=1, which
  will lead to incorrect disabling of pipe 0 and enabling of pipe 1.

What happens is that sun8i_ui_layer_enable() function may disable
blender pipes even if it is no longer assigned to its layer.

To correct this, move the routing setup out of individual plane's
atomic_update into crtc's atomic_update, where it can be calculated
and updated all at once.

Remove the atomic_disable callback because it is no longer needed.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240224150604.3855534-4-megi@xff.cz
Signed-off-by: Maxime Ripard <mripard@kernel.org>
2024-06-10 12:44:41 +02:00
..
Kconfig drm/sun4i: hdmi: Switch to HDMI connector 2024-05-28 10:24:43 +02:00
Makefile
sun4i_backend.c drm/sun4i: Add more parameters to sunxi_engine commit callback 2024-06-10 12:44:40 +02:00
sun4i_backend.h
sun4i_crtc.c drm/sun4i: Add more parameters to sunxi_engine commit callback 2024-06-10 12:44:40 +02:00
sun4i_crtc.h
sun4i_drv.c
sun4i_drv.h
sun4i_framebuffer.c
sun4i_framebuffer.h
sun4i_frontend.c
sun4i_frontend.h
sun4i_hdmi_ddc_clk.c
sun4i_hdmi_enc.c drm/sun4i: Fix compilation error 2024-05-29 10:03:11 +02:00
sun4i_hdmi_i2c.c
sun4i_hdmi_tmds_clk.c
sun4i_hdmi.h
sun4i_layer.c
sun4i_layer.h
sun4i_lvds.c
sun4i_lvds.h
sun4i_rgb.c
sun4i_rgb.h
sun4i_tcon_dclk.c
sun4i_tcon_dclk.h
sun4i_tcon.c
sun4i_tcon.h
sun4i_tv.c
sun6i_drc.c
sun6i_mipi_dsi.c
sun6i_mipi_dsi.h
sun8i_csc.c
sun8i_csc.h
sun8i_dw_hdmi.c
sun8i_dw_hdmi.h
sun8i_hdmi_phy_clk.c
sun8i_hdmi_phy.c
sun8i_mixer.c drm/sun4i: Fix layer zpos change/atomic modesetting 2024-06-10 12:44:41 +02:00
sun8i_mixer.h drm/sun4i: Fix layer zpos change/atomic modesetting 2024-06-10 12:44:41 +02:00
sun8i_tcon_top.c
sun8i_tcon_top.h
sun8i_ui_layer.c drm/sun4i: Fix layer zpos change/atomic modesetting 2024-06-10 12:44:41 +02:00
sun8i_ui_layer.h drm/sun4i: Unify sun8i_*_layer structs 2024-06-10 12:44:40 +02:00
sun8i_ui_scaler.c
sun8i_ui_scaler.h
sun8i_vi_layer.c drm/sun4i: Fix layer zpos change/atomic modesetting 2024-06-10 12:44:41 +02:00
sun8i_vi_layer.h drm/sun4i: Unify sun8i_*_layer structs 2024-06-10 12:44:40 +02:00
sun8i_vi_scaler.c
sun8i_vi_scaler.h
sunxi_engine.h drm/sun4i: Add more parameters to sunxi_engine commit callback 2024-06-10 12:44:40 +02:00