summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2020-11-20 15:42:44 +0100
committerMaxime Ripard <maxime@cerno.tech>2020-11-23 17:59:23 +0100
commitf2df84e096a8254ddb18c531b185fc2a45879077 (patch)
tree56bac36b1c90847f04ce35bc73b0cb3d01b89ab7 /lib
parent9fa1d7e60ad5ad2f7859ea8912d7b0b57821a5b7 (diff)
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: 87ebcd42fb7b ("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
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions