]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.1/drm-fix-timestamp-docs-for-variable-refresh-properties.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / queue-5.1 / drm-fix-timestamp-docs-for-variable-refresh-properties.patch
1 From 0cbd0adc4429930567083d18cc8c0fbc5f635d96 Mon Sep 17 00:00:00 2001
2 From: Mario Kleiner <mario.kleiner.de@gmail.com>
3 Date: Thu, 18 Apr 2019 08:01:57 +0200
4 Subject: drm: Fix timestamp docs for variable refresh properties.
5
6 From: Mario Kleiner <mario.kleiner.de@gmail.com>
7
8 commit 0cbd0adc4429930567083d18cc8c0fbc5f635d96 upstream.
9
10 As discussed with Nicholas and Daniel Vetter (patchwork
11 link to discussion below), the VRR timestamping behaviour
12 produced utterly useless and bogus vblank/pageflip
13 timestamps. We have found a way to fix this and provide
14 sane behaviour.
15
16 As of Linux 5.2, the amdgpu driver will be able to
17 provide exactly the same vblank / pageflip timestamp
18 semantic in variable refresh rate mode as in standard
19 fixed refresh rate mode. This is achieved by deferring
20 core vblank handling (drm_crtc_handle_vblank()) until
21 the end of front porch, and also defer the sending of
22 pageflip completion events until end of front porch,
23 when we can safely compute correct pageflip/vblank
24 timestamps.
25
26 The same approach will be possible for other VRR
27 capable kms drivers, so we can actually have sane
28 and useful timestamps in VRR mode.
29
30 This patch removes the section of the docs that
31 describes the broken timestamp behaviour present
32 in Linux 5.0/5.1.
33
34 Fixes: ab7a664f7a2d ("drm: Document variable refresh properties")
35 Link: https://patchwork.freedesktop.org/patch/285333/
36 Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
37 Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
38 Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
39 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
40 Link: https://patchwork.freedesktop.org/patch/msgid/20190418060157.18968-1-mario.kleiner.de@gmail.com
41 Cc: stable@vger.kernel.org
42 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
43
44 ---
45 drivers/gpu/drm/drm_connector.c | 6 ------
46 1 file changed, 6 deletions(-)
47
48 --- a/drivers/gpu/drm/drm_connector.c
49 +++ b/drivers/gpu/drm/drm_connector.c
50 @@ -1385,12 +1385,6 @@ EXPORT_SYMBOL(drm_mode_create_scaling_mo
51 *
52 * The driver may place further restrictions within these minimum
53 * and maximum bounds.
54 - *
55 - * The semantics for the vertical blank timestamp differ when
56 - * variable refresh rate is active. The vertical blank timestamp
57 - * is defined to be an estimate using the current mode's fixed
58 - * refresh rate timings. The semantics for the page-flip event
59 - * timestamp remain the same.
60 */
61
62 /**