Skip to content

Commit d71cbff

Browse files
committed
drm/vkms: Annotate vblank timer
This is needed to signal the fences from page flips, annotate it accordingly. We need to annotate entire timer callback since if we get stuck anywhere in there, then the timer stops, and hence fences stop. Just annotating the top part that does the vblank handling isn't enough. Tested-by: Melissa Wen <[email protected]> Reviewed-by: Rodrigo Siqueira <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Chris Wilson <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Christian König <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Cc: Rodrigo Siqueira <[email protected]> Cc: Haneen Mohammed <[email protected]> Cc: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 53fc08c commit d71cbff

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/gpu/drm/vkms/vkms_crtc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0+
22

3+
#include <linux/dma-fence.h>
4+
35
#include <drm/drm_atomic.h>
46
#include <drm/drm_atomic_helper.h>
57
#include <drm/drm_probe_helper.h>
@@ -14,7 +16,9 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
1416
struct drm_crtc *crtc = &output->crtc;
1517
struct vkms_crtc_state *state;
1618
u64 ret_overrun;
17-
bool ret;
19+
bool ret, fence_cookie;
20+
21+
fence_cookie = dma_fence_begin_signalling();
1822

1923
ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer,
2024
output->period_ns);
@@ -49,6 +53,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
4953
DRM_DEBUG_DRIVER("Composer worker already queued\n");
5054
}
5155

56+
dma_fence_end_signalling(fence_cookie);
57+
5258
return HRTIMER_RESTART;
5359
}
5460

0 commit comments

Comments
 (0)