summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-05-11 04:38:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-05-11 04:38:09 +0000
commit7628574d6191a8df71e64d77bc40e9bfb5c4af00 (patch)
tree474c8c3dce5ecee851d1ebb1764d33660da1a5e2 /sys/dev
parent25ff03497c88f3882f8343c4bb33220d434a8f29 (diff)
drm/edid: Fix off-by-one in DispID DTD pixel clock
From Ville Syrjala 85b1efa12a7fa209e0e3e254d6ea466c8ec3d083 in linux 4.19.y/4.19.121 6292b8efe32e6be408af364132f09572aed14382 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/drm_edid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_edid.c b/sys/dev/pci/drm/drm_edid.c
index ebd1792ffcd..f34e2e94f7e 100644
--- a/sys/dev/pci/drm/drm_edid.c
+++ b/sys/dev/pci/drm/drm_edid.c
@@ -4712,7 +4712,7 @@ static struct drm_display_mode *drm_mode_displayid_detailed(struct drm_device *d
struct drm_display_mode *mode;
unsigned pixel_clock = (timings->pixel_clock[0] |
(timings->pixel_clock[1] << 8) |
- (timings->pixel_clock[2] << 16));
+ (timings->pixel_clock[2] << 16)) + 1;
unsigned hactive = (timings->hactive[0] | timings->hactive[1] << 8) + 1;
unsigned hblank = (timings->hblank[0] | timings->hblank[1] << 8) + 1;
unsigned hsync = (timings->hsync[0] | (timings->hsync[1] & 0x7f) << 8) + 1;