ec8a468d6344ae45b41e05fcabf618fd283c308c
[openwrt/staging/blogic.git] /
1 From 2c0bfade955e4e660941db287020d06c9e22267f Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 11 Jul 2019 15:12:05 +0100
4 Subject: [PATCH 711/806] drm/vc4: Pass the drm vrefresh to the firmware on
5 mode set
6
7 More for completeness than need, but use drm_mode_vrefresh
8 to compute the vrefresh value, and pass that down to the
9 firmware on mode set.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 ---
13 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 6 +++---
14 1 file changed, 3 insertions(+), 3 deletions(-)
15
16 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
17 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
18 @@ -737,8 +737,8 @@ static void vc4_crtc_mode_set_nofb(struc
19 mode->hdisplay, mode->hsync_start, mode->hsync_end,
20 mode->htotal, mode->hskew, mode->vdisplay,
21 mode->vsync_start, mode->vsync_end, mode->vtotal,
22 - mode->vscan, mode->vrefresh, mode->picture_aspect_ratio,
23 - mode->flags);
24 + mode->vscan, drm_mode_vrefresh(mode),
25 + mode->picture_aspect_ratio, mode->flags);
26 mb.timings.display = vc4_crtc->display_number;
27
28 mb.timings.video_id_code = frame.avi.video_code;
29 @@ -754,7 +754,7 @@ static void vc4_crtc_mode_set_nofb(struc
30 mb.timings.vsync_end = mode->vsync_end;
31 mb.timings.vtotal = mode->vtotal;
32 mb.timings.vscan = mode->vscan;
33 - mb.timings.vrefresh = 0;
34 + mb.timings.vrefresh = drm_mode_vrefresh(mode);
35 mb.timings.flags = 0;
36 if (mode->flags & DRM_MODE_FLAG_PHSYNC)
37 mb.timings.flags |= TIMINGS_FLAGS_H_SYNC_POS;