1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/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 drm: sun4i: rename sun4i_dotclock to sun4i_tcon_dclk 2023-05-10 16:03:10 +02:00
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 drm: Call drm_atomic_helper_shutdown() at shutdown time for misc drivers 2023-09-21 10:41:04 -07:00
sun4i_drv.h
sun4i_framebuffer.c drm: Drop drm_blend.h from drm_crtc.h 2022-06-20 23:53:55 +03:00
sun4i_framebuffer.h
sun4i_frontend.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sun4i_frontend.h drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sun4i_hdmi.h drm/sun4i: hdmi: Replace drm_detect_hdmi_monitor() with is_hdmi 2022-04-22 11:51:52 +02:00
sun4i_hdmi_ddc_clk.c drm/sun4i: hdmi ddc clk: Fix size of m divider 2020-06-10 09:11:49 +02:00
sun4i_hdmi_enc.c drm/sun4i: Fix compilation error 2024-05-29 10:03:11 +02:00
sun4i_hdmi_i2c.c drm: remove I2C_CLASS_DDC support 2024-01-18 21:10:41 +01:00
sun4i_hdmi_tmds_clk.c
sun4i_layer.c drm: Remove unnecessary include statements of drm_plane_helper.h 2022-07-26 18:42:04 +02:00
sun4i_layer.h
sun4i_lvds.c drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
sun4i_lvds.h
sun4i_rgb.c drm/bridge: Centralize error message when bridge attach fails 2021-07-28 16:33:12 +03:00
sun4i_rgb.h
sun4i_tcon.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sun4i_tcon.h drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
sun4i_tcon_dclk.c drm: sun4i: rename sun4i_dotclock to sun4i_tcon_dclk 2023-05-10 16:03:10 +02:00
sun4i_tcon_dclk.h drm: sun4i: rename sun4i_dotclock to sun4i_tcon_dclk 2023-05-10 16:03:10 +02:00
sun4i_tv.c drm/sun4i: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
sun6i_drc.c drm/sun4i: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
sun6i_mipi_dsi.c drm/sun4i: Convert to platform remove callback returning void 2023-06-08 09:04:12 -07:00
sun6i_mipi_dsi.h drm/sun4i: dsi: Add a variant structure 2022-11-07 14:09:54 +01:00
sun8i_csc.c drm/sun4i: csc: Add support for the new MMIO layout 2022-04-26 14:25:15 +02:00
sun8i_csc.h drm/sun4i: csc: Add support for the new MMIO layout 2022-04-26 14:25:15 +02:00
sun8i_dw_hdmi.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sun8i_dw_hdmi.h Linux 5.19-rc6 2022-07-13 10:54:56 +10:00
sun8i_hdmi_phy.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
sun8i_hdmi_phy_clk.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 This pull request is full of clk driver changes. In fact, there aren't any 2023-08-30 19:53:39 -07:00
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