xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Tue Nov 14 20:56:24 UTC 2017


 hw/xfree86/modes/xf86EdidModes.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 68556d74b49e99d3490166c446079f7d5de26ca4
Author: Hector Martin <marcan at marcan.st>
Date:   Wed Nov 15 03:12:31 2017 +0900

    edid: fix off-by-one error in CEA mode numbering
    
    The CEA extension short video descriptors contain the VIC, which starts
    at 1, not 0.
    
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Hector Martin <marcan at marcan.st>

diff --git a/hw/xfree86/modes/xf86EdidModes.c b/hw/xfree86/modes/xf86EdidModes.c
index 908c5a4cf..ff04eca03 100644
--- a/hw/xfree86/modes/xf86EdidModes.c
+++ b/hw/xfree86/modes/xf86EdidModes.c
@@ -970,8 +970,8 @@ handle_cea_svd(struct cea_video_block *video, void *data)
     int vid;
 
     vid = video->video_code & 0x7f;
-    if (vid < CEA_VIDEO_MODES_NUM) {
-        Mode = xf86DuplicateMode(CEAVideoModes + vid);
+    if (vid >= 1 && vid <= CEA_VIDEO_MODES_NUM) {
+        Mode = xf86DuplicateMode(CEAVideoModes + (vid - 1));
         *Modes = xf86ModesAdd(*Modes, Mode);
     }
 }


More information about the xorg-commit mailing list