Skip to content

Commit f2c7ca8

Browse files
committed
drm/atomic-helper: Don't set deadline for modesets
If the crtc is being switched on or off then the semantics of computing the timestampe of the next vblank is somewhat ill-defined. And indeed, the code splats with a warning in the timestamp computation code. Specifically it hits the check to make sure that atomic drivers have full set up the timing constants in the drm_vblank structure, and that's just not the case before the crtc is actually on. For robustness it seems best to just not set deadlines for modesets. v2: Also skip on inactive crtc (Ville) Link: https://lore.kernel.org/dri-devel/[email protected]/ Fixes: d39e48c ("drm/atomic-helper: Set fence deadline for vblank") Cc: Ville Syrjälä <[email protected]> Cc: Rob Clark <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Reported-by: Dmitry Baryshkov <[email protected]> Tested-by: Dmitry Baryshkov <[email protected]> # test patch only Cc: Dmitry Baryshkov <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Reviewed-by: Rob Clark <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5d84409 commit f2c7ca8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,6 +1528,12 @@ static void set_fence_deadline(struct drm_device *dev,
15281528
for_each_new_crtc_in_state (state, crtc, new_crtc_state, i) {
15291529
ktime_t v;
15301530

1531+
if (drm_atomic_crtc_needs_modeset(new_crtc_state))
1532+
continue;
1533+
1534+
if (!new_crtc_state->active)
1535+
continue;
1536+
15311537
if (drm_crtc_next_vblank_start(crtc, &v))
15321538
continue;
15331539

0 commit comments

Comments
 (0)