Message ID | 1478079970-26783-1-git-send-email-shashank.sharma@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
The failure has nothing to do with the patch, seems irrelevant.
Regards
Shashank
-----Original Message-----
From: Patchwork [mailto:patchwork@emeril.freedesktop.org]
Sent: Wednesday, November 2, 2016 3:48 PM
To: Sharma, Shashank <shashank.sharma@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: ✗ Fi.CI.BAT: warning for drm: Complete CEA modedb(VIC 1-107) (rev3)
== Series Details ==
Series: drm: Complete CEA modedb(VIC 1-107) (rev3)
URL : https://patchwork.freedesktop.org/series/14090/
State : warning
== Summary ==
Series 14090v3 drm: Complete CEA modedb(VIC 1-107) https://patchwork.freedesktop.org/api/1.0/series/14090/revisions/3/mbox/
Test gem_mmap_gtt:
Subgroup basic-wc:
fail -> PASS (fi-byt-n2820)
Test kms_flip:
Subgroup basic-flip-vs-wf_vblank:
pass -> SKIP (fi-byt-n2820)
fi-bdw-5557u total:241 pass:226 dwarn:0 dfail:0 fail:0 skip:15
fi-bsw-n3050 total:241 pass:201 dwarn:0 dfail:0 fail:0 skip:40
fi-bxt-t5700 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-j1900 total:241 pass:213 dwarn:0 dfail:0 fail:0 skip:28
fi-byt-n2820 total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
fi-hsw-4770 total:241 pass:221 dwarn:0 dfail:0 fail:0 skip:20
fi-hsw-4770r total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-ivb-3520m total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-ivb-3770 total:241 pass:218 dwarn:0 dfail:0 fail:0 skip:23
fi-kbl-7200u total:241 pass:219 dwarn:0 dfail:0 fail:0 skip:22
fi-skl-6260u total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
fi-skl-6700hq total:241 pass:220 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6700k total:241 pass:219 dwarn:1 dfail:0 fail:0 skip:21
fi-skl-6770hq total:241 pass:227 dwarn:0 dfail:0 fail:0 skip:14
fi-snb-2520m total:241 pass:208 dwarn:0 dfail:0 fail:0 skip:33
fi-snb-2600 total:241 pass:207 dwarn:0 dfail:0 fail:0 skip:34
ee4d94ad08355b213e125a35cb3ae5f40c51314c drm-intel-nightly: 2016y-11m-02d-07h-37m-43s UTC integration manifest
0eb8834 drm: Complete CEA modedb(VIC 1-107)
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_2886/
> -----Original Message----- > From: Shashank Sharma [mailto:shashank.sharma@intel.com] > Sent: Wednesday, November 02, 2016 5:46 AM > To: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org > Cc: airlied@redhat.com; daniel.vetter@intel.com; > Jose.Abreu@synopsys.com; Shashank Sharma; Deucher, Alexander > Subject: [PATCH v2] drm: Complete CEA modedb(VIC 1-107) > > CEA-861-F specs defines new 4k video modes to be used with > HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > way till VIC=107. > > Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > to be able to parse 4k modes using the existing techniques, we have > to complete the modedb (VIC=65 onwards). > > This patch adds: > - Timings for existing CEA video modes (from VIC=65 till VIC=92) > - Newly added 4k modes (from VIC=93 to VIC=107). I don't have the spec in front of me to double check the timings, but assuming the previous typos were addressed, the patch is: Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Cc: Jose Abreu <Jose.Abreu@synopsys.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > > V2: Addressed review comments from Jose: > - fix the timings for VIC 83, 90 and 91 > - fix formatting for VIC 93-107 > --- > drivers/gpu/drm/drm_edid.c | 215 > +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 215 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 9506933..d18602c 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -994,6 +994,221 @@ struct minimode { > 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > .vrefresh = 100, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9, }, > + /* 65 - 1280x720@24Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, > 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 66 - 1280x720@25Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, > 3700, > + 3740, 3960, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 67 - 1280x720@30Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, > 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 68 - 1280x720@50Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, > 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 69 - 1280x720@60Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, > 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 70 - 1280x720@100Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, > 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 71 - 1280x720@120Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, > 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 72 - 1920x1080@24Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, > 2558, > + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 73 - 1920x1080@25Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, > 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 74 - 1920x1080@30Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, > 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 75 - 1920x1080@50Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, > 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 76 - 1920x1080@60Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, > 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 77 - 1920x1080@100Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, > 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 78 - 1920x1080@120Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, > 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | > DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 79 - 1680x720@24Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, > 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 80 - 1680x720@25Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, > 2908, > + 2948, 3168, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 81 - 1680x720@30Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, > 2380, > + 2420, 2640, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 82 - 1680x720@50Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, > 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 83 - 1680x720@60Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, > 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 84 - 1680x720@100Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, > 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 85 - 1680x720@120Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, > 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 86 - 2560x1080@24Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, > 3558, > + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 87 - 2560x1080@25Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, > 3008, > + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 88 - 2560x1080@30Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, > 2560, 3328, > + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 89 - 2560x1080@50Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, > 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 90 - 2560x1080@60Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, > 2560, 2808, > + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 91 - 2560x1080@100Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, > 2560, 2778, > + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 92 - 2560x1080@120Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, > 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27, }, > + /* 93 - 3840x2160p@24Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9,}, > + /* 94 - 3840x2160p@25Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9}, > + /* 95 - 3840x2160p@30Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9}, > + /* 96 - 3840x2160p@50Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, > 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9}, > + /* 97 - 3840x2160p@60Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, > 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_16_9}, > + /* 98 - 4096x2160p@24Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, > 4096, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_256_135}, > + /* 99 - 4096x2160p@25Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, > 4096, 5064, > + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_256_135}, > + /* 100 - 4096x2160p@30Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, > 4096, 4184, > + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_256_135}, > + /* 101 - 4096x2160p@50Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, > 4096, 5064, > + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_256_135}, > + /* 102 - 4096x2160p@60Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, > 4096, 4184, > + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_256_135}, > + /* 103 - 3840x2160p@24Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27}, > + /* 104 - 3840x2160p@25Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27}, > + /* 105 - 3840x2160p@30Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, > 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27}, > + /* 106 - 3840x2160p@50Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, > 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27}, > + /* 107 - 3840x2160p@60Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, > 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = > HDMI_PICTURE_ASPECT_64_27}, > }; > > /* > -- > 1.9.1
On 02.11.2016 10:46, Shashank Sharma wrote: > CEA-861-F specs defines new 4k video modes to be used with > HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > way till VIC=107. > > Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > to be able to parse 4k modes using the existing techniques, we have > to complete the modedb (VIC=65 onwards). > > This patch adds: > - Timings for existing CEA video modes (from VIC=65 till VIC=92) > - Newly added 4k modes (from VIC=93 to VIC=107). As I understand it modifies edid_cea_modes array. This array is used by couple of functions, particularly by drm_match_cea_mode, which is used by drm_hdmi_avi_infoframe_from_display_mode. I.e. since this patch AVI infoframes generated using drm core code will be different - they can contain VIC codes unknown to TV. I am not sure if it is harmful, but for sure this patch has visible impact on drivers behavior. Maybe it would be good to allow drivers to keep full compatibility with HDMI 1.4? Regards Andrzej > > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Cc: Jose Abreu <Jose.Abreu@synopsys.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > > V2: Addressed review comments from Jose: > - fix the timings for VIC 83, 90 and 91 > - fix formatting for VIC 93-107 > --- > drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 215 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 9506933..d18602c 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -994,6 +994,221 @@ struct minimode { > 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, > + /* 65 - 1280x720@24Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 66 - 1280x720@25Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, > + 3740, 3960, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 67 - 1280x720@30Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 68 - 1280x720@50Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 69 - 1280x720@60Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 70 - 1280x720@100Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 71 - 1280x720@120Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 72 - 1920x1080@24Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, > + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 73 - 1920x1080@25Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 74 - 1920x1080@30Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 75 - 1920x1080@50Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 76 - 1920x1080@60Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 77 - 1920x1080@100Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 78 - 1920x1080@120Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 79 - 1680x720@24Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 80 - 1680x720@25Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, > + 2948, 3168, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 81 - 1680x720@30Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, > + 2420, 2640, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 82 - 1680x720@50Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 83 - 1680x720@60Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 84 - 1680x720@100Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 85 - 1680x720@120Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 86 - 2560x1080@24Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, > + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 87 - 2560x1080@25Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, > + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 88 - 2560x1080@30Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, > + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 89 - 2560x1080@50Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 90 - 2560x1080@60Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, > + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 91 - 2560x1080@100Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, > + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 92 - 2560x1080@120Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 93 - 3840x2160p@24Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, > + /* 94 - 3840x2160p@25Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > + /* 95 - 3840x2160p@30Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > + /* 96 - 3840x2160p@50Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > + /* 97 - 3840x2160p@60Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > + /* 98 - 4096x2160p@24Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > + /* 99 - 4096x2160p@25Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, > + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > + /* 100 - 4096x2160p@30Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, > + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > + /* 101 - 4096x2160p@50Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, > + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > + /* 102 - 4096x2160p@60Hz 256:135 */ > + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, > + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > + /* 103 - 3840x2160p@24Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > + /* 104 - 3840x2160p@25Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > + /* 105 - 3840x2160p@30Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > + /* 106 - 3840x2160p@50Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > + /* 107 - 3840x2160p@60Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > }; > > /*
Regards Shashank On 11/2/2016 7:58 PM, Andrzej Hajda wrote: > On 02.11.2016 10:46, Shashank Sharma wrote: >> CEA-861-F specs defines new 4k video modes to be used with >> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >> way till VIC=107. >> >> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >> to be able to parse 4k modes using the existing techniques, we have >> to complete the modedb (VIC=65 onwards). >> >> This patch adds: >> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >> - Newly added 4k modes (from VIC=93 to VIC=107). > As I understand it modifies edid_cea_modes array. This array > is used by couple of functions, particularly by drm_match_cea_mode, > which is used by drm_hdmi_avi_infoframe_from_display_mode. > I.e. since this patch AVI infoframes generated using drm core code will > be different - they can contain VIC codes unknown to TV. > I am not sure if it is harmful, but for sure this patch has visible > impact on drivers behavior. > > Maybe it would be good to allow drivers to keep full compatibility with > HDMI 1.4? Hello Andrzej, Thanks for the comment. If you watch the code flow carefully, this is driven by EDID. So any VIC, which is translated/transformed using this array, would be coming from the EDID itself. So I dont think there would be a problem if the mode is defined in the EDID section itself, coz we are expecting the TV to know what its mentioning in EDID. This is how a typical flow would look: - hot-plug - driver reads modes specified in EDID basic. - driver parses various CEA extension blocks. - For both of the above mentioned steps, driver will probe the functions like do_cea_modes which uses edid_cea_modes[] array. - driver will add the probed modes in EDID, into connector - driver will pass the connector to userspace - userspace will pick one of the probed modes for modeset. - during modeset, we will set VIC part for a CEA mode, in the AVI infoframe section. So in other words, the only source of a VIC (cea_mode) is from TV's own EDID. This means we should never run into an unknown VIC. There can be a 0 VIC (for non CEA modes), but not unknown one. Regards Shashank > Regards > Andrzej > > >> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >> >> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >> Cc: Alex Deucher <alexander.deucher@amd.com> >> >> V2: Addressed review comments from Jose: >> - fix the timings for VIC 83, 90 and 91 >> - fix formatting for VIC 93-107 >> --- >> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 215 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index 9506933..d18602c 100644 >> --- a/drivers/gpu/drm/drm_edid.c >> +++ b/drivers/gpu/drm/drm_edid.c >> @@ -994,6 +994,221 @@ struct minimode { >> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >> + /* 65 - 1280x720@24Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 66 - 1280x720@25Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >> + 3740, 3960, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 67 - 1280x720@30Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 68 - 1280x720@50Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >> + 1760, 1980, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 69 - 1280x720@60Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >> + 1430, 1650, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 70 - 1280x720@100Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >> + 1760, 1980, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 71 - 1280x720@120Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >> + 1430, 1650, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 72 - 1920x1080@24Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 73 - 1920x1080@25Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 74 - 1920x1080@30Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 75 - 1920x1080@50Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 76 - 1920x1080@60Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 77 - 1920x1080@100Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 78 - 1920x1080@120Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 79 - 1680x720@24Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 80 - 1680x720@25Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >> + 2948, 3168, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 81 - 1680x720@30Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >> + 2420, 2640, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 82 - 1680x720@50Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >> + 1980, 2200, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 83 - 1680x720@60Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >> + 1980, 2200, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 84 - 1680x720@100Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >> + 1780, 2000, 0, 720, 725, 730, 825, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 85 - 1680x720@120Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >> + 1780, 2000, 0, 720, 725, 730, 825, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 86 - 2560x1080@24Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 87 - 2560x1080@25Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 88 - 2560x1080@30Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 89 - 2560x1080@50Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 90 - 2560x1080@60Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 91 - 2560x1080@100Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 92 - 2560x1080@120Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 93 - 3840x2160p@24Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, >> + /* 94 - 3840x2160p@25Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >> + /* 95 - 3840x2160p@30Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >> + /* 96 - 3840x2160p@50Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >> + /* 97 - 3840x2160p@60Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >> + /* 98 - 4096x2160p@24Hz 256:135 */ >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >> + /* 99 - 4096x2160p@25Hz 256:135 */ >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, >> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >> + /* 100 - 4096x2160p@30Hz 256:135 */ >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, >> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >> + /* 101 - 4096x2160p@50Hz 256:135 */ >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, >> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >> + /* 102 - 4096x2160p@60Hz 256:135 */ >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, >> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >> + /* 103 - 3840x2160p@24Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >> + /* 104 - 3840x2160p@25Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >> + /* 105 - 3840x2160p@30Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >> + /* 106 - 3840x2160p@50Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >> + /* 107 - 3840x2160p@60Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >> }; >> >> /* >
On 02.11.2016 15:44, Sharma, Shashank wrote: > Regards > > Shashank > > > On 11/2/2016 7:58 PM, Andrzej Hajda wrote: >> On 02.11.2016 10:46, Shashank Sharma wrote: >>> CEA-861-F specs defines new 4k video modes to be used with >>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >>> way till VIC=107. >>> >>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >>> to be able to parse 4k modes using the existing techniques, we have >>> to complete the modedb (VIC=65 onwards). >>> >>> This patch adds: >>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >>> - Newly added 4k modes (from VIC=93 to VIC=107). >> As I understand it modifies edid_cea_modes array. This array >> is used by couple of functions, particularly by drm_match_cea_mode, >> which is used by drm_hdmi_avi_infoframe_from_display_mode. >> I.e. since this patch AVI infoframes generated using drm core code will >> be different - they can contain VIC codes unknown to TV. >> I am not sure if it is harmful, but for sure this patch has visible >> impact on drivers behavior. >> >> Maybe it would be good to allow drivers to keep full compatibility with >> HDMI 1.4? > Hello Andrzej, > Thanks for the comment. > If you watch the code flow carefully, this is driven by EDID. So any > VIC, which is translated/transformed using this array, would be coming > from the EDID itself. > So I dont think there would be a problem if the mode is defined in the > EDID section itself, coz we are expecting the TV to know what its > mentioning in EDID. > > This is how a typical flow would look: > - hot-plug > - driver reads modes specified in EDID basic. > - driver parses various CEA extension blocks. > - For both of the above mentioned steps, driver will probe the > functions like do_cea_modes which uses edid_cea_modes[] array. > - driver will add the probed modes in EDID, into connector > - driver will pass the connector to userspace > - userspace will pick one of the probed modes for modeset. > - during modeset, we will set VIC part for a CEA mode, in the AVI > infoframe section. > > So in other words, the only source of a VIC (cea_mode) is from TV's own > EDID. > This means we should never run into an unknown VIC. There can be a 0 VIC > (for non CEA modes), but not unknown one. For example 3840x2160@30Hz has no VIC in HDMI 1.4 but it can be present in HDMI vendor specific block with HDMI_VIC 1, on the other side it has VIC 95 in HDMI 2.0. So before your patch AVI infoframe.video_code is set to 0, after your patch is set to 95. Regards Andrzej > > Regards > Shashank >> Regards >> Andrzej >> >> >>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>> >>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >>> Cc: Alex Deucher <alexander.deucher@amd.com> >>> >>> V2: Addressed review comments from Jose: >>> - fix the timings for VIC 83, 90 and 91 >>> - fix formatting for VIC 93-107 >>> --- >>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 215 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >>> index 9506933..d18602c 100644 >>> --- a/drivers/gpu/drm/drm_edid.c >>> +++ b/drivers/gpu/drm/drm_edid.c >>> @@ -994,6 +994,221 @@ struct minimode { >>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >>> + /* 65 - 1280x720@24Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 66 - 1280x720@25Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >>> + 3740, 3960, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 67 - 1280x720@30Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 68 - 1280x720@50Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 69 - 1280x720@60Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 70 - 1280x720@100Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 71 - 1280x720@120Hz */ >>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 72 - 1920x1080@24Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 73 - 1920x1080@25Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 74 - 1920x1080@30Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 75 - 1920x1080@50Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 76 - 1920x1080@60Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 77 - 1920x1080@100Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 78 - 1920x1080@120Hz */ >>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 79 - 1680x720@24Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 80 - 1680x720@25Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >>> + 2948, 3168, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 81 - 1680x720@30Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >>> + 2420, 2640, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 82 - 1680x720@50Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 83 - 1680x720@60Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 84 - 1680x720@100Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 85 - 1680x720@120Hz */ >>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 86 - 2560x1080@24Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 87 - 2560x1080@25Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 88 - 2560x1080@30Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 89 - 2560x1080@50Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 90 - 2560x1080@60Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 91 - 2560x1080@100Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 92 - 2560x1080@120Hz */ >>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>> + /* 93 - 3840x2160p@24Hz 16:9 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, >>> + /* 94 - 3840x2160p@25Hz 16:9 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>> + /* 95 - 3840x2160p@30Hz 16:9 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>> + /* 96 - 3840x2160p@50Hz 16:9 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>> + /* 97 - 3840x2160p@60Hz 16:9 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>> + /* 98 - 4096x2160p@24Hz 256:135 */ >>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, >>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>> + /* 99 - 4096x2160p@25Hz 256:135 */ >>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, >>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>> + /* 100 - 4096x2160p@30Hz 256:135 */ >>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, >>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>> + /* 101 - 4096x2160p@50Hz 256:135 */ >>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, >>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>> + /* 102 - 4096x2160p@60Hz 256:135 */ >>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, >>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>> + /* 103 - 3840x2160p@24Hz 64:27 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>> + /* 104 - 3840x2160p@25Hz 64:27 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>> + /* 105 - 3840x2160p@30Hz 64:27 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>> + /* 106 - 3840x2160p@50Hz 64:27 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>> + /* 107 - 3840x2160p@60Hz 64:27 */ >>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>> }; >>> >>> /* > > >
Regards Shashank On 11/2/2016 8:44 PM, Andrzej Hajda wrote: > On 02.11.2016 15:44, Sharma, Shashank wrote: >> Regards >> >> Shashank >> >> >> On 11/2/2016 7:58 PM, Andrzej Hajda wrote: >>> On 02.11.2016 10:46, Shashank Sharma wrote: >>>> CEA-861-F specs defines new 4k video modes to be used with >>>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >>>> way till VIC=107. >>>> >>>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >>>> to be able to parse 4k modes using the existing techniques, we have >>>> to complete the modedb (VIC=65 onwards). >>>> >>>> This patch adds: >>>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >>>> - Newly added 4k modes (from VIC=93 to VIC=107). >>> As I understand it modifies edid_cea_modes array. This array >>> is used by couple of functions, particularly by drm_match_cea_mode, >>> which is used by drm_hdmi_avi_infoframe_from_display_mode. >>> I.e. since this patch AVI infoframes generated using drm core code will >>> be different - they can contain VIC codes unknown to TV. >>> I am not sure if it is harmful, but for sure this patch has visible >>> impact on drivers behavior. >>> >>> Maybe it would be good to allow drivers to keep full compatibility with >>> HDMI 1.4? >> Hello Andrzej, >> Thanks for the comment. >> If you watch the code flow carefully, this is driven by EDID. So any >> VIC, which is translated/transformed using this array, would be coming >> from the EDID itself. >> So I dont think there would be a problem if the mode is defined in the >> EDID section itself, coz we are expecting the TV to know what its >> mentioning in EDID. >> >> This is how a typical flow would look: >> - hot-plug >> - driver reads modes specified in EDID basic. >> - driver parses various CEA extension blocks. >> - For both of the above mentioned steps, driver will probe the >> functions like do_cea_modes which uses edid_cea_modes[] array. >> - driver will add the probed modes in EDID, into connector >> - driver will pass the connector to userspace >> - userspace will pick one of the probed modes for modeset. >> - during modeset, we will set VIC part for a CEA mode, in the AVI >> infoframe section. >> >> So in other words, the only source of a VIC (cea_mode) is from TV's own >> EDID. >> This means we should never run into an unknown VIC. There can be a 0 VIC >> (for non CEA modes), but not unknown one. > For example 3840x2160@30Hz has no VIC in HDMI 1.4 but it can > be present in HDMI vendor specific block with HDMI_VIC 1, on the > other side it has VIC 95 in HDMI 2.0. So before your patch > AVI infoframe.video_code is set to 0, after your patch is set to 95. I agree, this particular case is true only for 4k@30 mode can be present in vendor specific blocks. But as per HDMI compliance test cases, if all the timings match to the mode specified, the VIC should be 95. I was going through the HDMI 1.4 spec, and CEA-861-D/E specs with these corner cases, and we saw that its ok to specify the right VIC, as per the CEA specs. Do you also think this is the right thing to do ? I have another patch coming up, where we can check the EDID version before setting VIC in AVI IF. - Shashank > > Regards > Andrzej > > >> Regards >> Shashank >>> Regards >>> Andrzej >>> >>> >>>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >>>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>>> >>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>> >>>> V2: Addressed review comments from Jose: >>>> - fix the timings for VIC 83, 90 and 91 >>>> - fix formatting for VIC 93-107 >>>> --- >>>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 215 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >>>> index 9506933..d18602c 100644 >>>> --- a/drivers/gpu/drm/drm_edid.c >>>> +++ b/drivers/gpu/drm/drm_edid.c >>>> @@ -994,6 +994,221 @@ struct minimode { >>>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >>>> + /* 65 - 1280x720@24Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 66 - 1280x720@25Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >>>> + 3740, 3960, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 67 - 1280x720@30Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 68 - 1280x720@50Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 69 - 1280x720@60Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 70 - 1280x720@100Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 71 - 1280x720@120Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 72 - 1920x1080@24Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >>>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 73 - 1920x1080@25Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 74 - 1920x1080@30Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 75 - 1920x1080@50Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 76 - 1920x1080@60Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 77 - 1920x1080@100Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 78 - 1920x1080@120Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 79 - 1680x720@24Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 80 - 1680x720@25Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >>>> + 2948, 3168, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 81 - 1680x720@30Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >>>> + 2420, 2640, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 82 - 1680x720@50Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 83 - 1680x720@60Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 84 - 1680x720@100Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 85 - 1680x720@120Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 86 - 2560x1080@24Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >>>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 87 - 2560x1080@25Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >>>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 88 - 2560x1080@30Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >>>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 89 - 2560x1080@50Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 90 - 2560x1080@60Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >>>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 91 - 2560x1080@100Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >>>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 92 - 2560x1080@120Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 93 - 3840x2160p@24Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, >>>> + /* 94 - 3840x2160p@25Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 95 - 3840x2160p@30Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 96 - 3840x2160p@50Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 97 - 3840x2160p@60Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 98 - 4096x2160p@24Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 99 - 4096x2160p@25Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 100 - 4096x2160p@30Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 101 - 4096x2160p@50Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 102 - 4096x2160p@60Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 103 - 3840x2160p@24Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 104 - 3840x2160p@25Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 105 - 3840x2160p@30Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 106 - 3840x2160p@50Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 107 - 3840x2160p@60Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> }; >>>> >>>> /* >> >>
On Wed, Nov 02, 2016 at 08:14:22PM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 11/2/2016 7:58 PM, Andrzej Hajda wrote: > > On 02.11.2016 10:46, Shashank Sharma wrote: > >> CEA-861-F specs defines new 4k video modes to be used with > >> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > >> way till VIC=107. > >> > >> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > >> to be able to parse 4k modes using the existing techniques, we have > >> to complete the modedb (VIC=65 onwards). > >> > >> This patch adds: > >> - Timings for existing CEA video modes (from VIC=65 till VIC=92) > >> - Newly added 4k modes (from VIC=93 to VIC=107). > > As I understand it modifies edid_cea_modes array. This array > > is used by couple of functions, particularly by drm_match_cea_mode, > > which is used by drm_hdmi_avi_infoframe_from_display_mode. > > I.e. since this patch AVI infoframes generated using drm core code will > > be different - they can contain VIC codes unknown to TV. > > I am not sure if it is harmful, but for sure this patch has visible > > impact on drivers behavior. > > > > Maybe it would be good to allow drivers to keep full compatibility with > > HDMI 1.4? > Hello Andrzej, > Thanks for the comment. > If you watch the code flow carefully, this is driven by EDID. So any > VIC, which is translated/transformed using this array, would be coming > from the EDID itself. No. The user is free to specify any mode they wish. It doesn't have to come from the EDID. Not sure specifying a modern VIC for an older display is a good idea or not. If not, we could always check the cea_rev assuming it changed whenever the list if VICs was expanded. > So I dont think there would be a problem if the mode is defined in the > EDID section itself, coz we are expecting the TV to know what its > mentioning in EDID. > > This is how a typical flow would look: > - hot-plug > - driver reads modes specified in EDID basic. > - driver parses various CEA extension blocks. > - For both of the above mentioned steps, driver will probe the > functions like do_cea_modes which uses edid_cea_modes[] array. > - driver will add the probed modes in EDID, into connector > - driver will pass the connector to userspace > - userspace will pick one of the probed modes for modeset. > - during modeset, we will set VIC part for a CEA mode, in the AVI > infoframe section. > > So in other words, the only source of a VIC (cea_mode) is from TV's own > EDID. > This means we should never run into an unknown VIC. There can be a 0 VIC > (for non CEA modes), but not unknown one. > > Regards > Shashank > > Regards > > Andrzej > > > > > >> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > >> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > >> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > >> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > >> > >> Cc: Jose Abreu <Jose.Abreu@synopsys.com> > >> Cc: Alex Deucher <alexander.deucher@amd.com> > >> > >> V2: Addressed review comments from Jose: > >> - fix the timings for VIC 83, 90 and 91 > >> - fix formatting for VIC 93-107 > >> --- > >> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > >> 1 file changed, 215 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > >> index 9506933..d18602c 100644 > >> --- a/drivers/gpu/drm/drm_edid.c > >> +++ b/drivers/gpu/drm/drm_edid.c > >> @@ -994,6 +994,221 @@ struct minimode { > >> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, > >> + /* 65 - 1280x720@24Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, > >> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 66 - 1280x720@25Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, > >> + 3740, 3960, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 67 - 1280x720@30Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, > >> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 68 - 1280x720@50Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, > >> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 69 - 1280x720@60Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, > >> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 70 - 1280x720@100Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, > >> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 71 - 1280x720@120Hz */ > >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, > >> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 72 - 1920x1080@24Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, > >> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 73 - 1920x1080@25Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, > >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 74 - 1920x1080@30Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, > >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 75 - 1920x1080@50Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, > >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 76 - 1920x1080@60Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, > >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 77 - 1920x1080@100Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > >> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 78 - 1920x1080@120Hz */ > >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, > >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 79 - 1680x720@24Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, > >> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 80 - 1680x720@25Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, > >> + 2948, 3168, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 81 - 1680x720@30Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, > >> + 2420, 2640, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 82 - 1680x720@50Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, > >> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 83 - 1680x720@60Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, > >> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 84 - 1680x720@100Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, > >> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 85 - 1680x720@120Hz */ > >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, > >> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 86 - 2560x1080@24Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, > >> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 87 - 2560x1080@25Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, > >> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 88 - 2560x1080@30Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, > >> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 89 - 2560x1080@50Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, > >> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 90 - 2560x1080@60Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, > >> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 91 - 2560x1080@100Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, > >> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 92 - 2560x1080@120Hz */ > >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, > >> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >> + /* 93 - 3840x2160p@24Hz 16:9 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, > >> + /* 94 - 3840x2160p@25Hz 16:9 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >> + /* 95 - 3840x2160p@30Hz 16:9 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >> + /* 96 - 3840x2160p@50Hz 16:9 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >> + /* 97 - 3840x2160p@60Hz 16:9 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >> + /* 98 - 4096x2160p@24Hz 256:135 */ > >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, > >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >> + /* 99 - 4096x2160p@25Hz 256:135 */ > >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, > >> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >> + /* 100 - 4096x2160p@30Hz 256:135 */ > >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, > >> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >> + /* 101 - 4096x2160p@50Hz 256:135 */ > >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, > >> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >> + /* 102 - 4096x2160p@60Hz 256:135 */ > >> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, > >> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >> + /* 103 - 3840x2160p@24Hz 64:27 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >> + /* 104 - 3840x2160p@25Hz 64:27 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >> + /* 105 - 3840x2160p@30Hz 64:27 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >> + /* 106 - 3840x2160p@50Hz 64:27 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >> + /* 107 - 3840x2160p@60Hz 64:27 */ > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >> }; > >> > >> /* > > > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Regards Shashank On 11/2/2016 9:32 PM, Ville Syrjälä wrote: > On Wed, Nov 02, 2016 at 08:14:22PM +0530, Sharma, Shashank wrote: >> Regards >> >> Shashank >> >> >> On 11/2/2016 7:58 PM, Andrzej Hajda wrote: >>> On 02.11.2016 10:46, Shashank Sharma wrote: >>>> CEA-861-F specs defines new 4k video modes to be used with >>>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >>>> way till VIC=107. >>>> >>>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >>>> to be able to parse 4k modes using the existing techniques, we have >>>> to complete the modedb (VIC=65 onwards). >>>> >>>> This patch adds: >>>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >>>> - Newly added 4k modes (from VIC=93 to VIC=107). >>> As I understand it modifies edid_cea_modes array. This array >>> is used by couple of functions, particularly by drm_match_cea_mode, >>> which is used by drm_hdmi_avi_infoframe_from_display_mode. >>> I.e. since this patch AVI infoframes generated using drm core code will >>> be different - they can contain VIC codes unknown to TV. >>> I am not sure if it is harmful, but for sure this patch has visible >>> impact on drivers behavior. >>> >>> Maybe it would be good to allow drivers to keep full compatibility with >>> HDMI 1.4? >> Hello Andrzej, >> Thanks for the comment. >> If you watch the code flow carefully, this is driven by EDID. So any >> VIC, which is translated/transformed using this array, would be coming >> from the EDID itself. > No. The user is free to specify any mode they wish. It doesn't have to > come from the EDID. Not sure specifying a modern VIC for an older > display is a good idea or not. If not, we could always check the cea_rev > assuming it changed whenever the list if VICs was expanded. I agree, that user can specify a mode, out of EDID too. I am anyways planning to add a patch, where before loading HDMI 2.0 VICs in AVI IF, we are checking the EDID rev. That should solve our problem. So if edid_rev < 2.0 do_not_load VICs from 93 - 107, but keep it 0. Shashank >> So I dont think there would be a problem if the mode is defined in the >> EDID section itself, coz we are expecting the TV to know what its >> mentioning in EDID. >> >> This is how a typical flow would look: >> - hot-plug >> - driver reads modes specified in EDID basic. >> - driver parses various CEA extension blocks. >> - For both of the above mentioned steps, driver will probe the >> functions like do_cea_modes which uses edid_cea_modes[] array. >> - driver will add the probed modes in EDID, into connector >> - driver will pass the connector to userspace >> - userspace will pick one of the probed modes for modeset. >> - during modeset, we will set VIC part for a CEA mode, in the AVI >> infoframe section. >> >> So in other words, the only source of a VIC (cea_mode) is from TV's own >> EDID. >> This means we should never run into an unknown VIC. There can be a 0 VIC >> (for non CEA modes), but not unknown one. >> >> Regards >> Shashank >>> Regards >>> Andrzej >>> >>> >>>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >>>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>>> >>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>> >>>> V2: Addressed review comments from Jose: >>>> - fix the timings for VIC 83, 90 and 91 >>>> - fix formatting for VIC 93-107 >>>> --- >>>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 215 insertions(+) >>>> >>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >>>> index 9506933..d18602c 100644 >>>> --- a/drivers/gpu/drm/drm_edid.c >>>> +++ b/drivers/gpu/drm/drm_edid.c >>>> @@ -994,6 +994,221 @@ struct minimode { >>>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >>>> + /* 65 - 1280x720@24Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 66 - 1280x720@25Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >>>> + 3740, 3960, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 67 - 1280x720@30Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 68 - 1280x720@50Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 69 - 1280x720@60Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 70 - 1280x720@100Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 71 - 1280x720@120Hz */ >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 72 - 1920x1080@24Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >>>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 73 - 1920x1080@25Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 74 - 1920x1080@30Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 75 - 1920x1080@50Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 76 - 1920x1080@60Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 77 - 1920x1080@100Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >>>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 78 - 1920x1080@120Hz */ >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 79 - 1680x720@24Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 80 - 1680x720@25Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >>>> + 2948, 3168, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 81 - 1680x720@30Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >>>> + 2420, 2640, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 82 - 1680x720@50Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 83 - 1680x720@60Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 84 - 1680x720@100Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 85 - 1680x720@120Hz */ >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 86 - 2560x1080@24Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >>>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 87 - 2560x1080@25Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >>>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 88 - 2560x1080@30Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >>>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 89 - 2560x1080@50Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 90 - 2560x1080@60Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >>>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 91 - 2560x1080@100Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >>>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 92 - 2560x1080@120Hz */ >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>> + /* 93 - 3840x2160p@24Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, >>>> + /* 94 - 3840x2160p@25Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 95 - 3840x2160p@30Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 96 - 3840x2160p@50Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 97 - 3840x2160p@60Hz 16:9 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>> + /* 98 - 4096x2160p@24Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 99 - 4096x2160p@25Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 100 - 4096x2160p@30Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 101 - 4096x2160p@50Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 102 - 4096x2160p@60Hz 256:135 */ >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>> + /* 103 - 3840x2160p@24Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 104 - 3840x2160p@25Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 105 - 3840x2160p@30Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 106 - 3840x2160p@50Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> + /* 107 - 3840x2160p@60Hz 64:27 */ >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>> }; >>>> >>>> /* >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx@lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, Nov 02, 2016 at 09:39:48PM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 11/2/2016 9:32 PM, Ville Syrjälä wrote: > > On Wed, Nov 02, 2016 at 08:14:22PM +0530, Sharma, Shashank wrote: > >> Regards > >> > >> Shashank > >> > >> > >> On 11/2/2016 7:58 PM, Andrzej Hajda wrote: > >>> On 02.11.2016 10:46, Shashank Sharma wrote: > >>>> CEA-861-F specs defines new 4k video modes to be used with > >>>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > >>>> way till VIC=107. > >>>> > >>>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > >>>> to be able to parse 4k modes using the existing techniques, we have > >>>> to complete the modedb (VIC=65 onwards). > >>>> > >>>> This patch adds: > >>>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) > >>>> - Newly added 4k modes (from VIC=93 to VIC=107). > >>> As I understand it modifies edid_cea_modes array. This array > >>> is used by couple of functions, particularly by drm_match_cea_mode, > >>> which is used by drm_hdmi_avi_infoframe_from_display_mode. > >>> I.e. since this patch AVI infoframes generated using drm core code will > >>> be different - they can contain VIC codes unknown to TV. > >>> I am not sure if it is harmful, but for sure this patch has visible > >>> impact on drivers behavior. > >>> > >>> Maybe it would be good to allow drivers to keep full compatibility with > >>> HDMI 1.4? > >> Hello Andrzej, > >> Thanks for the comment. > >> If you watch the code flow carefully, this is driven by EDID. So any > >> VIC, which is translated/transformed using this array, would be coming > >> from the EDID itself. > > No. The user is free to specify any mode they wish. It doesn't have to > > come from the EDID. Not sure specifying a modern VIC for an older > > display is a good idea or not. If not, we could always check the cea_rev > > assuming it changed whenever the list if VICs was expanded. > I agree, that user can specify a mode, out of EDID too. > I am anyways planning to add a patch, where before loading HDMI 2.0 VICs > in AVI IF, we are checking the EDID rev. > That should solve our problem. > > So if edid_rev < 2.0 > do_not_load VICs from 93 - 107, but keep it 0. Why edid_rev and not cea_rev? > > Shashank > >> So I dont think there would be a problem if the mode is defined in the > >> EDID section itself, coz we are expecting the TV to know what its > >> mentioning in EDID. > >> > >> This is how a typical flow would look: > >> - hot-plug > >> - driver reads modes specified in EDID basic. > >> - driver parses various CEA extension blocks. > >> - For both of the above mentioned steps, driver will probe the > >> functions like do_cea_modes which uses edid_cea_modes[] array. > >> - driver will add the probed modes in EDID, into connector > >> - driver will pass the connector to userspace > >> - userspace will pick one of the probed modes for modeset. > >> - during modeset, we will set VIC part for a CEA mode, in the AVI > >> infoframe section. > >> > >> So in other words, the only source of a VIC (cea_mode) is from TV's own > >> EDID. > >> This means we should never run into an unknown VIC. There can be a 0 VIC > >> (for non CEA modes), but not unknown one. > >> > >> Regards > >> Shashank > >>> Regards > >>> Andrzej > >>> > >>> > >>>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > >>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > >>>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > >>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > >>>> > >>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> > >>>> Cc: Alex Deucher <alexander.deucher@amd.com> > >>>> > >>>> V2: Addressed review comments from Jose: > >>>> - fix the timings for VIC 83, 90 and 91 > >>>> - fix formatting for VIC 93-107 > >>>> --- > >>>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > >>>> 1 file changed, 215 insertions(+) > >>>> > >>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > >>>> index 9506933..d18602c 100644 > >>>> --- a/drivers/gpu/drm/drm_edid.c > >>>> +++ b/drivers/gpu/drm/drm_edid.c > >>>> @@ -994,6 +994,221 @@ struct minimode { > >>>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, > >>>> + /* 65 - 1280x720@24Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, > >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 66 - 1280x720@25Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, > >>>> + 3740, 3960, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 67 - 1280x720@30Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, > >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 68 - 1280x720@50Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, > >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 69 - 1280x720@60Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, > >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 70 - 1280x720@100Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, > >>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 71 - 1280x720@120Hz */ > >>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, > >>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 72 - 1920x1080@24Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, > >>>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 73 - 1920x1080@25Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, > >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 74 - 1920x1080@30Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, > >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 75 - 1920x1080@50Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, > >>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 76 - 1920x1080@60Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, > >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 77 - 1920x1080@100Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > >>>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 78 - 1920x1080@120Hz */ > >>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, > >>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 79 - 1680x720@24Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, > >>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 80 - 1680x720@25Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, > >>>> + 2948, 3168, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 81 - 1680x720@30Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, > >>>> + 2420, 2640, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 82 - 1680x720@50Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, > >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 83 - 1680x720@60Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, > >>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 84 - 1680x720@100Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, > >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 85 - 1680x720@120Hz */ > >>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, > >>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 86 - 2560x1080@24Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, > >>>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 87 - 2560x1080@25Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, > >>>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 88 - 2560x1080@30Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, > >>>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 89 - 2560x1080@50Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, > >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 90 - 2560x1080@60Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, > >>>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 91 - 2560x1080@100Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, > >>>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 92 - 2560x1080@120Hz */ > >>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, > >>>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>> + /* 93 - 3840x2160p@24Hz 16:9 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, > >>>> + /* 94 - 3840x2160p@25Hz 16:9 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>> + /* 95 - 3840x2160p@30Hz 16:9 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>> + /* 96 - 3840x2160p@50Hz 16:9 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>> + /* 97 - 3840x2160p@60Hz 16:9 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>> + /* 98 - 4096x2160p@24Hz 256:135 */ > >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, > >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>> + /* 99 - 4096x2160p@25Hz 256:135 */ > >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, > >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>> + /* 100 - 4096x2160p@30Hz 256:135 */ > >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, > >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>> + /* 101 - 4096x2160p@50Hz 256:135 */ > >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, > >>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>> + /* 102 - 4096x2160p@60Hz 256:135 */ > >>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, > >>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>> + /* 103 - 3840x2160p@24Hz 64:27 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>> + /* 104 - 3840x2160p@25Hz 64:27 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>> + /* 105 - 3840x2160p@30Hz 64:27 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>> + /* 106 - 3840x2160p@50Hz 64:27 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>> + /* 107 - 3840x2160p@60Hz 64:27 */ > >>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>> }; > >>>> > >>>> /* > >> _______________________________________________ > >> Intel-gfx mailing list > >> Intel-gfx@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Regards Shashank On 11/2/2016 9:50 PM, Ville Syrjälä wrote: > On Wed, Nov 02, 2016 at 09:39:48PM +0530, Sharma, Shashank wrote: >> Regards >> >> Shashank >> >> >> On 11/2/2016 9:32 PM, Ville Syrjälä wrote: >>> On Wed, Nov 02, 2016 at 08:14:22PM +0530, Sharma, Shashank wrote: >>>> Regards >>>> >>>> Shashank >>>> >>>> >>>> On 11/2/2016 7:58 PM, Andrzej Hajda wrote: >>>>> On 02.11.2016 10:46, Shashank Sharma wrote: >>>>>> CEA-861-F specs defines new 4k video modes to be used with >>>>>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >>>>>> way till VIC=107. >>>>>> >>>>>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >>>>>> to be able to parse 4k modes using the existing techniques, we have >>>>>> to complete the modedb (VIC=65 onwards). >>>>>> >>>>>> This patch adds: >>>>>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >>>>>> - Newly added 4k modes (from VIC=93 to VIC=107). >>>>> As I understand it modifies edid_cea_modes array. This array >>>>> is used by couple of functions, particularly by drm_match_cea_mode, >>>>> which is used by drm_hdmi_avi_infoframe_from_display_mode. >>>>> I.e. since this patch AVI infoframes generated using drm core code will >>>>> be different - they can contain VIC codes unknown to TV. >>>>> I am not sure if it is harmful, but for sure this patch has visible >>>>> impact on drivers behavior. >>>>> >>>>> Maybe it would be good to allow drivers to keep full compatibility with >>>>> HDMI 1.4? >>>> Hello Andrzej, >>>> Thanks for the comment. >>>> If you watch the code flow carefully, this is driven by EDID. So any >>>> VIC, which is translated/transformed using this array, would be coming >>>> from the EDID itself. >>> No. The user is free to specify any mode they wish. It doesn't have to >>> come from the EDID. Not sure specifying a modern VIC for an older >>> display is a good idea or not. If not, we could always check the cea_rev >>> assuming it changed whenever the list if VICs was expanded. >> I agree, that user can specify a mode, out of EDID too. >> I am anyways planning to add a patch, where before loading HDMI 2.0 VICs >> in AVI IF, we are checking the EDID rev. >> That should solve our problem. >> >> So if edid_rev < 2.0 >> do_not_load VICs from 93 - 107, but keep it 0. > Why edid_rev and not cea_rev? We can do that also, but in the current structure, we are already caching EDID rev, its just about re-using it. AFAIK, we don't have CEA extension cached anywhere. Shashank >> Shashank >>>> So I dont think there would be a problem if the mode is defined in the >>>> EDID section itself, coz we are expecting the TV to know what its >>>> mentioning in EDID. >>>> >>>> This is how a typical flow would look: >>>> - hot-plug >>>> - driver reads modes specified in EDID basic. >>>> - driver parses various CEA extension blocks. >>>> - For both of the above mentioned steps, driver will probe the >>>> functions like do_cea_modes which uses edid_cea_modes[] array. >>>> - driver will add the probed modes in EDID, into connector >>>> - driver will pass the connector to userspace >>>> - userspace will pick one of the probed modes for modeset. >>>> - during modeset, we will set VIC part for a CEA mode, in the AVI >>>> infoframe section. >>>> >>>> So in other words, the only source of a VIC (cea_mode) is from TV's own >>>> EDID. >>>> This means we should never run into an unknown VIC. There can be a 0 VIC >>>> (for non CEA modes), but not unknown one. >>>> >>>> Regards >>>> Shashank >>>>> Regards >>>>> Andrzej >>>>> >>>>> >>>>>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >>>>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >>>>>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >>>>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >>>>>> >>>>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >>>>>> Cc: Alex Deucher <alexander.deucher@amd.com> >>>>>> >>>>>> V2: Addressed review comments from Jose: >>>>>> - fix the timings for VIC 83, 90 and 91 >>>>>> - fix formatting for VIC 93-107 >>>>>> --- >>>>>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >>>>>> 1 file changed, 215 insertions(+) >>>>>> >>>>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >>>>>> index 9506933..d18602c 100644 >>>>>> --- a/drivers/gpu/drm/drm_edid.c >>>>>> +++ b/drivers/gpu/drm/drm_edid.c >>>>>> @@ -994,6 +994,221 @@ struct minimode { >>>>>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>>>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >>>>>> + /* 65 - 1280x720@24Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 66 - 1280x720@25Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >>>>>> + 3740, 3960, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 67 - 1280x720@30Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 68 - 1280x720@50Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >>>>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 69 - 1280x720@60Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >>>>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 70 - 1280x720@100Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >>>>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 71 - 1280x720@120Hz */ >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >>>>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 72 - 1920x1080@24Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >>>>>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 73 - 1920x1080@25Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >>>>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 74 - 1920x1080@30Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 75 - 1920x1080@50Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >>>>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 76 - 1920x1080@60Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 77 - 1920x1080@100Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >>>>>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 78 - 1920x1080@120Hz */ >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 79 - 1680x720@24Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 80 - 1680x720@25Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >>>>>> + 2948, 3168, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 81 - 1680x720@30Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >>>>>> + 2420, 2640, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 82 - 1680x720@50Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >>>>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 83 - 1680x720@60Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >>>>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 84 - 1680x720@100Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >>>>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 85 - 1680x720@120Hz */ >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >>>>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 86 - 2560x1080@24Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >>>>>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 87 - 2560x1080@25Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >>>>>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 88 - 2560x1080@30Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >>>>>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 89 - 2560x1080@50Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >>>>>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 90 - 2560x1080@60Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >>>>>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 91 - 2560x1080@100Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >>>>>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 92 - 2560x1080@120Hz */ >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >>>>>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >>>>>> + /* 93 - 3840x2160p@24Hz 16:9 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, >>>>>> + /* 94 - 3840x2160p@25Hz 16:9 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>>>> + /* 95 - 3840x2160p@30Hz 16:9 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>>>> + /* 96 - 3840x2160p@50Hz 16:9 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>>>> + /* 97 - 3840x2160p@60Hz 16:9 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, >>>>>> + /* 98 - 4096x2160p@24Hz 256:135 */ >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>>>> + /* 99 - 4096x2160p@25Hz 256:135 */ >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, >>>>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>>>> + /* 100 - 4096x2160p@30Hz 256:135 */ >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, >>>>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>>>> + /* 101 - 4096x2160p@50Hz 256:135 */ >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, >>>>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>>>> + /* 102 - 4096x2160p@60Hz 256:135 */ >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, >>>>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, >>>>>> + /* 103 - 3840x2160p@24Hz 64:27 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>>>> + /* 104 - 3840x2160p@25Hz 64:27 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>>>> + /* 105 - 3840x2160p@30Hz 64:27 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>>>> + /* 106 - 3840x2160p@50Hz 64:27 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>>>> + /* 107 - 3840x2160p@60Hz 64:27 */ >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, >>>>>> }; >>>>>> >>>>>> /* >>>> _______________________________________________ >>>> Intel-gfx mailing list >>>> Intel-gfx@lists.freedesktop.org >>>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
On Wed, Nov 02, 2016 at 03:16:10PM +0530, Shashank Sharma wrote: > CEA-861-F specs defines new 4k video modes to be used with > HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > way till VIC=107. > > Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > to be able to parse 4k modes using the existing techniques, we have > to complete the modedb (VIC=65 onwards). > > This patch adds: > - Timings for existing CEA video modes (from VIC=65 till VIC=92) > - Newly added 4k modes (from VIC=93 to VIC=107). > > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Cc: Jose Abreu <Jose.Abreu@synopsys.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > > V2: Addressed review comments from Jose: > - fix the timings for VIC 83, 90 and 91 > - fix formatting for VIC 93-107 > --- > drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 215 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 9506933..d18602c 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -994,6 +994,221 @@ struct minimode { > 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, > + /* 65 - 1280x720@24Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 66 - 1280x720@25Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, > + 3740, 3960, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 67 - 1280x720@30Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 68 - 1280x720@50Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 69 - 1280x720@60Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 70 - 1280x720@100Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, > + 1760, 1980, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 71 - 1280x720@120Hz */ > + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, > + 1430, 1650, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 72 - 1920x1080@24Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, > + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 73 - 1920x1080@25Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 74 - 1920x1080@30Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 75 - 1920x1080@50Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 76 - 1920x1080@60Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 77 - 1920x1080@100Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 78 - 1920x1080@120Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, > + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 79 - 1680x720@24Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, > + 3080, 3300, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 80 - 1680x720@25Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, > + 2948, 3168, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 81 - 1680x720@30Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, > + 2420, 2640, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 82 - 1680x720@50Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 83 - 1680x720@60Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, > + 1980, 2200, 0, 720, 725, 730, 750, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 84 - 1680x720@100Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 85 - 1680x720@120Hz */ > + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, > + 1780, 2000, 0, 720, 725, 730, 825, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 86 - 2560x1080@24Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, > + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 87 - 2560x1080@25Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, > + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 88 - 2560x1080@30Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, > + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 89 - 2560x1080@50Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 90 - 2560x1080@60Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, > + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 91 - 2560x1080@100Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, > + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 92 - 2560x1080@120Hz */ > + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, > + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > + /* 93 - 3840x2160p@24Hz 16:9 */ ^^^^ We don't have that for the old formats, and you didn't add it to most of the new ones either. > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), These things are not indented correctly. > + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, ^ Neither is this. Also space missing where pointed. > + /* 94 - 3840x2160p@25Hz 16:9 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, ^ ", " missing for the remaining formats, as well as the wrong indentation. Noticed it all when trying to compare with what I parsed from the spec with awk (I don't trust typing in all those numbers by hand). I've noticed some other inconsistencies with what my script gave, but I'll have to look those over manually if it's a failure in my script or your table. I spotted a few inconsistencies with what we already had as well, so I need to look those over too.
On Wed, Nov 02, 2016 at 09:57:12PM +0530, Sharma, Shashank wrote: > Regards > > Shashank > > > On 11/2/2016 9:50 PM, Ville Syrjälä wrote: > > On Wed, Nov 02, 2016 at 09:39:48PM +0530, Sharma, Shashank wrote: > >> Regards > >> > >> Shashank > >> > >> > >> On 11/2/2016 9:32 PM, Ville Syrjälä wrote: > >>> On Wed, Nov 02, 2016 at 08:14:22PM +0530, Sharma, Shashank wrote: > >>>> Regards > >>>> > >>>> Shashank > >>>> > >>>> > >>>> On 11/2/2016 7:58 PM, Andrzej Hajda wrote: > >>>>> On 02.11.2016 10:46, Shashank Sharma wrote: > >>>>>> CEA-861-F specs defines new 4k video modes to be used with > >>>>>> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > >>>>>> way till VIC=107. > >>>>>> > >>>>>> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > >>>>>> to be able to parse 4k modes using the existing techniques, we have > >>>>>> to complete the modedb (VIC=65 onwards). > >>>>>> > >>>>>> This patch adds: > >>>>>> - Timings for existing CEA video modes (from VIC=65 till VIC=92) > >>>>>> - Newly added 4k modes (from VIC=93 to VIC=107). > >>>>> As I understand it modifies edid_cea_modes array. This array > >>>>> is used by couple of functions, particularly by drm_match_cea_mode, > >>>>> which is used by drm_hdmi_avi_infoframe_from_display_mode. > >>>>> I.e. since this patch AVI infoframes generated using drm core code will > >>>>> be different - they can contain VIC codes unknown to TV. > >>>>> I am not sure if it is harmful, but for sure this patch has visible > >>>>> impact on drivers behavior. > >>>>> > >>>>> Maybe it would be good to allow drivers to keep full compatibility with > >>>>> HDMI 1.4? > >>>> Hello Andrzej, > >>>> Thanks for the comment. > >>>> If you watch the code flow carefully, this is driven by EDID. So any > >>>> VIC, which is translated/transformed using this array, would be coming > >>>> from the EDID itself. > >>> No. The user is free to specify any mode they wish. It doesn't have to > >>> come from the EDID. Not sure specifying a modern VIC for an older > >>> display is a good idea or not. If not, we could always check the cea_rev > >>> assuming it changed whenever the list if VICs was expanded. > >> I agree, that user can specify a mode, out of EDID too. > >> I am anyways planning to add a patch, where before loading HDMI 2.0 VICs > >> in AVI IF, we are checking the EDID rev. > >> That should solve our problem. > >> > >> So if edid_rev < 2.0 > >> do_not_load VICs from 93 - 107, but keep it 0. > > Why edid_rev and not cea_rev? > We can do that also, but in the current structure, we are already > caching EDID rev, its just about re-using it. > AFAIK, we don't have CEA extension cached anywhere. Yes we do. > > Shashank > >> Shashank > >>>> So I dont think there would be a problem if the mode is defined in the > >>>> EDID section itself, coz we are expecting the TV to know what its > >>>> mentioning in EDID. > >>>> > >>>> This is how a typical flow would look: > >>>> - hot-plug > >>>> - driver reads modes specified in EDID basic. > >>>> - driver parses various CEA extension blocks. > >>>> - For both of the above mentioned steps, driver will probe the > >>>> functions like do_cea_modes which uses edid_cea_modes[] array. > >>>> - driver will add the probed modes in EDID, into connector > >>>> - driver will pass the connector to userspace > >>>> - userspace will pick one of the probed modes for modeset. > >>>> - during modeset, we will set VIC part for a CEA mode, in the AVI > >>>> infoframe section. > >>>> > >>>> So in other words, the only source of a VIC (cea_mode) is from TV's own > >>>> EDID. > >>>> This means we should never run into an unknown VIC. There can be a 0 VIC > >>>> (for non CEA modes), but not unknown one. > >>>> > >>>> Regards > >>>> Shashank > >>>>> Regards > >>>>> Andrzej > >>>>> > >>>>> > >>>>>> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > >>>>>> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > >>>>>> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > >>>>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > >>>>>> > >>>>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com> > >>>>>> Cc: Alex Deucher <alexander.deucher@amd.com> > >>>>>> > >>>>>> V2: Addressed review comments from Jose: > >>>>>> - fix the timings for VIC 83, 90 and 91 > >>>>>> - fix formatting for VIC 93-107 > >>>>>> --- > >>>>>> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > >>>>>> 1 file changed, 215 insertions(+) > >>>>>> > >>>>>> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > >>>>>> index 9506933..d18602c 100644 > >>>>>> --- a/drivers/gpu/drm/drm_edid.c > >>>>>> +++ b/drivers/gpu/drm/drm_edid.c > >>>>>> @@ -994,6 +994,221 @@ struct minimode { > >>>>>> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, > >>>>>> + /* 65 - 1280x720@24Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, > >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 66 - 1280x720@25Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, > >>>>>> + 3740, 3960, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 67 - 1280x720@30Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, > >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 68 - 1280x720@50Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, > >>>>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 69 - 1280x720@60Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, > >>>>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 70 - 1280x720@100Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, > >>>>>> + 1760, 1980, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 71 - 1280x720@120Hz */ > >>>>>> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, > >>>>>> + 1430, 1650, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 72 - 1920x1080@24Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, > >>>>>> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 73 - 1920x1080@25Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, > >>>>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 74 - 1920x1080@30Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, > >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 75 - 1920x1080@50Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, > >>>>>> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 76 - 1920x1080@60Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, > >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 77 - 1920x1080@100Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > >>>>>> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 78 - 1920x1080@120Hz */ > >>>>>> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, > >>>>>> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 79 - 1680x720@24Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, > >>>>>> + 3080, 3300, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 80 - 1680x720@25Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, > >>>>>> + 2948, 3168, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 81 - 1680x720@30Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, > >>>>>> + 2420, 2640, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 82 - 1680x720@50Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, > >>>>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 83 - 1680x720@60Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, > >>>>>> + 1980, 2200, 0, 720, 725, 730, 750, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 84 - 1680x720@100Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, > >>>>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 85 - 1680x720@120Hz */ > >>>>>> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, > >>>>>> + 1780, 2000, 0, 720, 725, 730, 825, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 86 - 2560x1080@24Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, > >>>>>> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 87 - 2560x1080@25Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, > >>>>>> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 88 - 2560x1080@30Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, > >>>>>> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 89 - 2560x1080@50Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, > >>>>>> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 90 - 2560x1080@60Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, > >>>>>> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 91 - 2560x1080@100Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, > >>>>>> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 92 - 2560x1080@120Hz */ > >>>>>> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, > >>>>>> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > >>>>>> + /* 93 - 3840x2160p@24Hz 16:9 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, > >>>>>> + /* 94 - 3840x2160p@25Hz 16:9 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>>>> + /* 95 - 3840x2160p@30Hz 16:9 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>>>> + /* 96 - 3840x2160p@50Hz 16:9 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>>>> + /* 97 - 3840x2160p@60Hz 16:9 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > >>>>>> + /* 98 - 4096x2160p@24Hz 256:135 */ > >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, > >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>>>> + /* 99 - 4096x2160p@25Hz 256:135 */ > >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, > >>>>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>>>> + /* 100 - 4096x2160p@30Hz 256:135 */ > >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, > >>>>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>>>> + /* 101 - 4096x2160p@50Hz 256:135 */ > >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, > >>>>>> + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>>>> + /* 102 - 4096x2160p@60Hz 256:135 */ > >>>>>> + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, > >>>>>> + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, > >>>>>> + /* 103 - 3840x2160p@24Hz 64:27 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, > >>>>>> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>>>> + /* 104 - 3840x2160p@25Hz 64:27 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>>>> + /* 105 - 3840x2160p@30Hz 64:27 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>>>> + /* 106 - 3840x2160p@50Hz 64:27 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, > >>>>>> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>>>> + /* 107 - 3840x2160p@60Hz 64:27 */ > >>>>>> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, > >>>>>> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > >>>>>> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > >>>>>> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > >>>>>> }; > >>>>>> > >>>>>> /* > >>>> _______________________________________________ > >>>> Intel-gfx mailing list > >>>> Intel-gfx@lists.freedesktop.org > >>>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Regards Shashank On 11/2/2016 10:04 PM, Ville Syrjälä wrote: > On Wed, Nov 02, 2016 at 03:16:10PM +0530, Shashank Sharma wrote: >> CEA-861-F specs defines new 4k video modes to be used with >> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >> way till VIC=107. >> >> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >> to be able to parse 4k modes using the existing techniques, we have >> to complete the modedb (VIC=65 onwards). >> >> This patch adds: >> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >> - Newly added 4k modes (from VIC=93 to VIC=107). >> >> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >> >> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >> Cc: Alex Deucher <alexander.deucher@amd.com> >> >> V2: Addressed review comments from Jose: >> - fix the timings for VIC 83, 90 and 91 >> - fix formatting for VIC 93-107 >> --- >> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 215 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index 9506933..d18602c 100644 >> --- a/drivers/gpu/drm/drm_edid.c >> +++ b/drivers/gpu/drm/drm_edid.c >> @@ -994,6 +994,221 @@ struct minimode { >> 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, >> + /* 65 - 1280x720@24Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 66 - 1280x720@25Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, >> + 3740, 3960, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 67 - 1280x720@30Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 68 - 1280x720@50Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, >> + 1760, 1980, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 69 - 1280x720@60Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, >> + 1430, 1650, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 70 - 1280x720@100Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, >> + 1760, 1980, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 71 - 1280x720@120Hz */ >> + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, >> + 1430, 1650, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 72 - 1920x1080@24Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, >> + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 73 - 1920x1080@25Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 74 - 1920x1080@30Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 75 - 1920x1080@50Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 76 - 1920x1080@60Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 77 - 1920x1080@100Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 78 - 1920x1080@120Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, >> + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 79 - 1680x720@24Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, >> + 3080, 3300, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 80 - 1680x720@25Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, >> + 2948, 3168, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 81 - 1680x720@30Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, >> + 2420, 2640, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 82 - 1680x720@50Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, >> + 1980, 2200, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 83 - 1680x720@60Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, >> + 1980, 2200, 0, 720, 725, 730, 750, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 84 - 1680x720@100Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, >> + 1780, 2000, 0, 720, 725, 730, 825, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 85 - 1680x720@120Hz */ >> + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, >> + 1780, 2000, 0, 720, 725, 730, 825, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 86 - 2560x1080@24Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, >> + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 87 - 2560x1080@25Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, >> + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 88 - 2560x1080@30Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, >> + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 89 - 2560x1080@50Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, >> + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 90 - 2560x1080@60Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, >> + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 91 - 2560x1080@100Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, >> + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 92 - 2560x1080@120Hz */ >> + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, >> + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, >> + /* 93 - 3840x2160p@24Hz 16:9 */ > ^^^^ > > We don't have that for the old formats, and you didn't add it to most > of the new ones either. > >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, >> + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > These things are not indented correctly. > >> + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, > ^ > Neither is this. Also space missing where pointed. > >> + /* 94 - 3840x2160p@25Hz 16:9 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, >> + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, > ^ > > ", " missing for the remaining formats, as well as the wrong > indentation. > > Noticed it all when trying to compare with what I parsed from the spec > with awk (I don't trust typing in all those numbers by hand). I've > noticed some other inconsistencies with what my script gave, but I'll > have to look those over manually if it's a failure in my script or > your table. I spotted a few inconsistencies with what we already had > as well, so I need to look those over too. Thanks, by the time I will work over the indents pointed out. Shashank >
On Wed, Nov 02, 2016 at 03:16:10PM +0530, Shashank Sharma wrote: > CEA-861-F specs defines new 4k video modes to be used with > HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the > way till VIC=107. > > Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now > to be able to parse 4k modes using the existing techniques, we have > to complete the modedb (VIC=65 onwards). > > This patch adds: > - Timings for existing CEA video modes (from VIC=65 till VIC=92) > - Newly added 4k modes (from VIC=93 to VIC=107). > > Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> > Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> > Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Cc: Jose Abreu <Jose.Abreu@synopsys.com> > Cc: Alex Deucher <alexander.deucher@amd.com> > > V2: Addressed review comments from Jose: > - fix the timings for VIC 83, 90 and 91 > - fix formatting for VIC 93-107 > --- > drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 215 insertions(+) > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 9506933..d18602c 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -994,6 +994,221 @@ struct minimode { <snip> > + /* 77 - 1920x1080@100Hz */ > + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, My script gave me: { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, Manual reading of the spec agrees with my script. <snip> > + /* 104 - 3840x2160p@25Hz 64:27 */ > + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, > + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, > + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, My script gave me: { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, Manual reading of the spec agrees with my script. Outside those two I don't see any errors in your table when compared to my script's output. I do see some differences in the already existing modes though. I'll look those over and send a patch if necessary.
Regards Shashank On 11/2/2016 10:27 PM, Ville Syrjälä wrote: > On Wed, Nov 02, 2016 at 03:16:10PM +0530, Shashank Sharma wrote: >> CEA-861-F specs defines new 4k video modes to be used with >> HDMI 2.0 EDIDs. These modes start at VIC=93 and go all the >> way till VIC=107. >> >> Our existing CEA modedb contains only 64 modes (VIC=1 to VIC=64). Now >> to be able to parse 4k modes using the existing techniques, we have >> to complete the modedb (VIC=65 onwards). >> >> This patch adds: >> - Timings for existing CEA video modes (from VIC=65 till VIC=92) >> - Newly added 4k modes (from VIC=93 to VIC=107). >> >> Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> >> Signed-off-by: Sonika Jindal <sonika.jindal@intel.com> >> Reviewed-by: Jose Abreu <Jose.Abreu@synopsys.com> >> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> >> >> Cc: Jose Abreu <Jose.Abreu@synopsys.com> >> Cc: Alex Deucher <alexander.deucher@amd.com> >> >> V2: Addressed review comments from Jose: >> - fix the timings for VIC 83, 90 and 91 >> - fix formatting for VIC 93-107 >> --- >> drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 215 insertions(+) >> >> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c >> index 9506933..d18602c 100644 >> --- a/drivers/gpu/drm/drm_edid.c >> +++ b/drivers/gpu/drm/drm_edid.c >> @@ -994,6 +994,221 @@ struct minimode { > <snip> >> + /* 77 - 1920x1080@100Hz */ >> + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, >> + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > My script gave me: > { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, > 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, > DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > > Manual reading of the spec agrees with my script. > > <snip> >> + /* 104 - 3840x2160p@25Hz 64:27 */ >> + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, >> + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, >> + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), >> + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, > My script gave me: > { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, > 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, > DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), > .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, > > Manual reading of the spec agrees with my script. > > Outside those two I don't see any errors in your table when compared to my > script's output. I do see some differences in the already existing modes though. > I'll look those over and send a patch if necessary. > Got it, Thanks. Will cross check, correct and re-send. Shashank
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 9506933..d18602c 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -994,6 +994,221 @@ struct minimode { 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, }, + /* 65 - 1280x720@24Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040, + 3080, 3300, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 66 - 1280x720@25Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700, + 3740, 3960, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 67 - 1280x720@30Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040, + 3080, 3300, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 68 - 1280x720@50Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720, + 1760, 1980, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 69 - 1280x720@60Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390, + 1430, 1650, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 70 - 1280x720@100Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720, + 1760, 1980, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 71 - 1280x720@120Hz */ + { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390, + 1430, 1650, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 72 - 1920x1080@24Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558, + 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 73 - 1920x1080@25Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448, + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 74 - 1920x1080@30Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008, + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 75 - 1920x1080@50Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448, + 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 76 - 1920x1080@60Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008, + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 77 - 1920x1080@100Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448, + 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 78 - 1920x1080@120Hz */ + { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008, + 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 79 - 1680x720@24Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040, + 3080, 3300, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 80 - 1680x720@25Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908, + 2948, 3168, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 81 - 1680x720@30Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380, + 2420, 2640, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 82 - 1680x720@50Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940, + 1980, 2200, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 83 - 1680x720@60Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940, + 1980, 2200, 0, 720, 725, 730, 750, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 84 - 1680x720@100Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740, + 1780, 2000, 0, 720, 725, 730, 825, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 85 - 1680x720@120Hz */ + { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740, + 1780, 2000, 0, 720, 725, 730, 825, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 86 - 2560x1080@24Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558, + 3602, 3750, 0, 1080, 1084, 1089, 1100, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 87 - 2560x1080@25Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008, + 3052, 3200, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 88 - 2560x1080@30Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328, + 3372, 3520, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 89 - 2560x1080@50Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108, + 3152, 3300, 0, 1080, 1084, 1089, 1125, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 90 - 2560x1080@60Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808, + 2852, 3000, 0, 1080, 1084, 1089, 1100, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 91 - 2560x1080@100Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778, + 2822, 2970, 0, 1080, 1084, 1089, 1250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 92 - 2560x1080@120Hz */ + { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108, + 3152, 3300, 0, 1080, 1084, 1089, 1250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, }, + /* 93 - 3840x2160p@24Hz 16:9 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,}, + /* 94 - 3840x2160p@25Hz 16:9 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896, + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, + /* 95 - 3840x2160p@30Hz 16:9 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, + /* 96 - 3840x2160p@50Hz 16:9 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, + /* 97 - 3840x2160p@60Hz 16:9 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9}, + /* 98 - 4096x2160p@24Hz 256:135 */ + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116, + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, + /* 99 - 4096x2160p@25Hz 256:135 */ + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064, + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, + /* 100 - 4096x2160p@30Hz 256:135 */ + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184, + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, + /* 101 - 4096x2160p@50Hz 256:135 */ + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064, + 5152, 5280, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, + /* 102 - 4096x2160p@60Hz 256:135 */ + { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184, + 4272, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135}, + /* 103 - 3840x2160p@24Hz 64:27 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116, + 5204, 5500, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, + /* 104 - 3840x2160p@25Hz 64:27 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, + /* 105 - 3840x2160p@30Hz 64:27 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016, + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, + /* 106 - 3840x2160p@50Hz 64:27 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896, + 4984, 5280, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, + /* 107 - 3840x2160p@60Hz 64:27 */ + { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016, + 4104, 4400, 0, 2160, 2168, 2178, 2250, 0, + DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC), + .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27}, }; /*