linux/drivers/gpu/drm/vc4
Maxime Ripard f2df84e096
drm/vc4: kms: Store the unassigned channel list in the state
If a CRTC is enabled but not active, and that we're then doing a page
flip on another CRTC, drm_atomic_get_crtc_state will bring the first
CRTC state into the global state, and will make us wait for its vblank
as well, even though that might never occur.

Instead of creating the list of the free channels each time atomic_check
is called, and calling drm_atomic_get_crtc_state to retrieve the
allocated channels, let's create a private state object in the main
atomic state, and use it to store the available channels.

Since vc4 has a semaphore (with a value of 1, so a lock) in its commit
implementation to serialize all the commits, even the nonblocking ones, we
are free from the use-after-free race if two subsequent commits are not ran
in their submission order.

Fixes: 87ebcd42fb ("drm/vc4: crtc: Assign output to channel automatically")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Tested-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Hoegeun Kwon <hoegeun.kwon@samsung.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20201120144245.398711-2-maxime@cerno.tech
2020-11-23 17:59:23 +01:00
..
Kconfig drm/vc4: Fix Kconfig indentation 2019-11-25 10:04:41 +01:00
Makefile drm/vc4: hdmi: Add PHY init and disable function 2020-09-07 18:06:04 +02:00
vc4_bo.c drm/vc4: Use devm_drm_dev_alloc 2020-11-02 12:14:50 +01:00
vc4_crtc.c drm/vc4: crtc: Keep the previously assigned HVS FIFO 2020-09-25 16:56:21 +02:00
vc4_debugfs.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
vc4_dpi.c drm/vc4: Use simple encoder 2020-04-02 14:16:45 +02:00
vc4_drv.c drm/vc4: drv: Remove unused variable 2020-11-03 10:11:05 +01:00
vc4_drv.h drm/vc4: kms: Store the unassigned channel list in the state 2020-11-23 17:59:23 +01:00
vc4_dsi.c drm/vc4: Use simple encoder 2020-04-02 14:16:45 +02:00
vc4_fence.c
vc4_gem.c drm/vc4: Use devm_drm_dev_alloc 2020-11-02 12:14:50 +01:00
vc4_hdmi_phy.c drm/vc4: hdmi: Support the BCM2711 HDMI controllers 2020-09-07 18:14:54 +02:00
vc4_hdmi_regs.h drm/vc4: Update type of reg parameter in vc4_hdmi_{read,write} 2020-09-11 11:30:16 +02:00
vc4_hdmi.c drm/vc4: hdmi: Disable Wifi Frequencies 2020-11-19 15:46:08 +01:00
vc4_hdmi.h drm/vc4: hdmi: Disable Wifi Frequencies 2020-11-19 15:46:08 +01:00
vc4_hvs.c drm/vc4: Use the helper to retrieve vc4_dev when needed 2020-11-02 12:14:46 +01:00
vc4_irq.c drm/vc4: Allocate binner bo when starting to use the V3D 2019-05-23 17:32:21 +02:00
vc4_kms.c drm/vc4: kms: Store the unassigned channel list in the state 2020-11-23 17:59:23 +01:00
vc4_packet.h
vc4_perfmon.c drm/vc4: Disable V3D interactions if the v3d component didn't probe. 2019-04-03 12:49:18 -07:00
vc4_plane.c drm/vc4: Handing the return value of drm_universal_plane_init 2020-09-16 04:48:37 -04:00
vc4_qpu_defines.h
vc4_regs.h drm/vc4: hdmi: Support the BCM2711 HDMI controllers 2020-09-07 18:14:54 +02:00
vc4_render_cl.c drm/vc4: Make sure to emit a tile coordinates between two MSAA loads. 2019-04-01 09:33:38 -07:00
vc4_trace_points.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vc4_trace.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
vc4_txp.c drm/vc4: crtc: Move the HVS gamma LUT setup to our init function 2020-09-07 18:03:39 +02:00
vc4_v3d.c drm/vc4: Use devm_drm_dev_alloc 2020-11-02 12:14:50 +01:00
vc4_validate_shaders.c
vc4_validate.c
vc4_vec.c drm/vc4: Use simple encoder 2020-04-02 14:16:45 +02:00