mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-04 16:50:13 +01:00
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@redhat.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
(cherry picked from commit 68556d74b4)
This commit is contained in:
parent
b3fa60edc4
commit
d1a2a27579
1 changed files with 2 additions and 2 deletions
|
|
@ -976,8 +976,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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue