diff mbox

[v3] drm/edid: Complete CEA modedb(VIC 1-107)

Message ID 1485668465-1715-1-git-send-email-shashank.sharma@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sharma, Shashank Jan. 29, 2017, 5:41 a.m. UTC
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).

Cc: Jose Abreu <Jose.Abreu@synopsys.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>

V2: Addressed review comments from Jose:
- fix the timings for VIC 83, 90 and 91
- fix formatting for VIC 93-107

V3: Rebase on drm-tip

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>
---
 drivers/gpu/drm/drm_edid.c | 215 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 215 insertions(+)

Comments

Andrzej Hajda Jan. 30, 2017, 8 a.m. UTC | #1
On 29.01.2017 06:41, 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).
>
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
>
> V2: Addressed review comments from Jose:
> - fix the timings for VIC 83, 90 and 91
> - fix formatting for VIC 93-107
>
> V3: Rebase on drm-tip
>
> 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>
> ---

Have you addressed in some other patch my concerns regarding polluting
infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
only for HDMI 2.0 (CEA-861-F) ? It will happen
for all UHD modes, see [1][2] for previous discussion.

[1]: https://www.spinics.net/lists/intel-gfx/msg110524.html
[2]: https://www.spinics.net/lists/intel-gfx/msg110529.html

Regards
Andrzej
Sharma, Shashank Jan. 30, 2017, 8:45 a.m. UTC | #2
Regards

Shashank


On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
> On 29.01.2017 06:41, 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).
>>
>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>
>> V2: Addressed review comments from Jose:
>> - fix the timings for VIC 83, 90 and 91
>> - fix formatting for VIC 93-107
>>
>> V3: Rebase on drm-tip
>>
>> 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>
>> ---
> Have you addressed in some other patch my concerns regarding polluting
> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
> only for HDMI 2.0 (CEA-861-F) ? It will happen
> for all UHD modes, see [1][2] for previous discussion.
Hello Andrzej

As you already know, the aspect ratio is indexed with the VIC, which 
comes from EDID.
Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it does, 
its not compliant.

- Shashank
> [1]: https://www.spinics.net/lists/intel-gfx/msg110524.html
> [2]: https://www.spinics.net/lists/intel-gfx/msg110529.html
>
> Regards
> Andrzej
>
Sharma, Shashank Jan. 30, 2017, 8:46 a.m. UTC | #3
Fixed typo while adding Ville's mail address.

Regards
Shashank
On 1/30/2017 2:15 PM, Sharma, Shashank wrote:
> Regards
>
> Shashank
>
>
> On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
>> On 29.01.2017 06:41, 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).
>>>
>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>>
>>> V2: Addressed review comments from Jose:
>>> - fix the timings for VIC 83, 90 and 91
>>> - fix formatting for VIC 93-107
>>>
>>> V3: Rebase on drm-tip
>>>
>>> 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>
>>> ---
>> Have you addressed in some other patch my concerns regarding polluting
>> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
>> only for HDMI 2.0 (CEA-861-F) ? It will happen
>> for all UHD modes, see [1][2] for previous discussion.
> Hello Andrzej
>
> As you already know, the aspect ratio is indexed with the VIC, which 
> comes from EDID.
> Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it 
> does, its not compliant.
>
> - Shashank
>> [1]: https://www.spinics.net/lists/intel-gfx/msg110524.html
>> [2]: https://www.spinics.net/lists/intel-gfx/msg110529.html
>>
>> Regards
>> Andrzej
>>
>
Andrzej Hajda Jan. 30, 2017, 9:22 a.m. UTC | #4
On 30.01.2017 09:45, Sharma, Shashank wrote:
> Regards
>
> Shashank
>
>
> On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
>> On 29.01.2017 06:41, 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).
>>>
>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>>
>>> V2: Addressed review comments from Jose:
>>> - fix the timings for VIC 83, 90 and 91
>>> - fix formatting for VIC 93-107
>>>
>>> V3: Rebase on drm-tip
>>>
>>> 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>
>>> ---
>> Have you addressed in some other patch my concerns regarding polluting
>> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
>> only for HDMI 2.0 (CEA-861-F) ? It will happen
>> for all UHD modes, see [1][2] for previous discussion.
> Hello Andrzej
>
> As you already know, the aspect ratio is indexed with the VIC, which 
> comes from EDID.
> Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it does, 
> its not compliant.

Have you forgot our previous discussion? Let me cite myself:

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.


And your discussion with Ville:

> >/>>> 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.


It does not seem to be addressed.

Regards
Andrzej
Sharma, Shashank Jan. 30, 2017, 9:42 a.m. UTC | #5
Regards

Shashank


On 1/30/2017 2:52 PM, Andrzej Hajda wrote:
> On 30.01.2017 09:45, Sharma, Shashank wrote:
>> Regards
>>
>> Shashank
>>
>>
>> On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
>>> On 29.01.2017 06:41, 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).
>>>>
>>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>>>
>>>> V2: Addressed review comments from Jose:
>>>> - fix the timings for VIC 83, 90 and 91
>>>> - fix formatting for VIC 93-107
>>>>
>>>> V3: Rebase on drm-tip
>>>>
>>>> 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>
>>>> ---
>>> Have you addressed in some other patch my concerns regarding polluting
>>> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
>>> only for HDMI 2.0 (CEA-861-F) ? It will happen
>>> for all UHD modes, see [1][2] for previous discussion.
>> Hello Andrzej
>>
>> As you already know, the aspect ratio is indexed with the VIC, which
>> comes from EDID.
>> Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it does,
>> its not compliant.
> Have you forgot our previous discussion? Let me cite myself:
>
> 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.
>
>
> And your discussion with Ville:
>
>>> />>> 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.
>
> It does not seem to be addressed.
>
> Regards
> Andrzej
Hey, thanks for bringing this out again. I checked the specs again, 
there are three things here:
- The spec has a section on this, and it states that in such cases CEA 
VIC should be supplied to the AVI IF.
- Also, for HDMI infoframe blocks, we dont refer to cea_edid_modes[] 
rather we go to edid_4k_modes[]
- Again, as there is no aspect ratio parsing layer in DRM right now 
(after the revert), we are doing the right thing to give aspect as per 
CEA, which is suggested by spec too.
Andrzej Hajda Jan. 30, 2017, 10:17 a.m. UTC | #6
On 30.01.2017 10:42, Sharma, Shashank wrote:
> Regards
>
> Shashank
>
>
> On 1/30/2017 2:52 PM, Andrzej Hajda wrote:
>> On 30.01.2017 09:45, Sharma, Shashank wrote:
>>> Regards
>>>
>>> Shashank
>>>
>>>
>>> On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
>>>> On 29.01.2017 06:41, 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).
>>>>>
>>>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>>>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>>>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>>>>
>>>>> V2: Addressed review comments from Jose:
>>>>> - fix the timings for VIC 83, 90 and 91
>>>>> - fix formatting for VIC 93-107
>>>>>
>>>>> V3: Rebase on drm-tip
>>>>>
>>>>> 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>
>>>>> ---
>>>> Have you addressed in some other patch my concerns regarding polluting
>>>> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
>>>> only for HDMI 2.0 (CEA-861-F) ? It will happen
>>>> for all UHD modes, see [1][2] for previous discussion.
>>> Hello Andrzej
>>>
>>> As you already know, the aspect ratio is indexed with the VIC, which
>>> comes from EDID.
>>> Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it does,
>>> its not compliant.
>> Have you forgot our previous discussion? Let me cite myself:
>>
>> 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.
>>
>>
>> And your discussion with Ville:
>>
>>>> />>> 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.
>> It does not seem to be addressed.
>>
>> Regards
>> Andrzej
> Hey, thanks for bringing this out again. I checked the specs again, 
> there are three things here:
> - The spec has a section on this, and it states that in such cases CEA 
> VIC should be supplied to the AVI IF.

This phrase is not precise, but if it means that in case of
3840x2160@30Hz source should set VIC to 95 also for HDMI1.4 compliant
sinks it is in opposition to statement from HDMI1.4 specification:
> When transmitting any extended video format indicated through use of
> the HDMI_VIC field
> in the HDMI Vendor Specific InfoFrame or any other format which is not
> described in the
> above cases, an HDMI Source shall set the AVI InfoFrame VIC field to zero.

I do not think HDMI20 could invalidate claims from HDMI1.4.


> - Also, for HDMI infoframe blocks, we dont refer to cea_edid_modes[] 
> rather we go to edid_4k_modes[]

cea_edid_modes is used in generating AVI infoframe,
edid_4k_modes is used in generating vendor infoframe

> - Again, as there is no aspect ratio parsing layer in DRM right now 
> (after the revert), we are doing the right thing to give aspect as per 
> CEA, which is suggested by spec too.
>

I do not understand this phrase. Are you talking about aspect ratios or
about video format?

Regards
Andrzej
Sharma, Shashank Jan. 30, 2017, 11:01 a.m. UTC | #7
Regards

Shashank


On 1/30/2017 3:47 PM, Andrzej Hajda wrote:
> On 30.01.2017 10:42, Sharma, Shashank wrote:
>> Regards
>>
>> Shashank
>>
>>
>> On 1/30/2017 2:52 PM, Andrzej Hajda wrote:
>>> On 30.01.2017 09:45, Sharma, Shashank wrote:
>>>> Regards
>>>>
>>>> Shashank
>>>>
>>>>
>>>> On 1/30/2017 1:30 PM, Andrzej Hajda wrote:
>>>>> On 29.01.2017 06:41, 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).
>>>>>>
>>>>>> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
>>>>>> Cc: Alex Deucher <alexander.deucher@amd.com>
>>>>>> Cc: Andrzej Hajda <a.hajda@samsung.com>
>>>>>>
>>>>>> V2: Addressed review comments from Jose:
>>>>>> - fix the timings for VIC 83, 90 and 91
>>>>>> - fix formatting for VIC 93-107
>>>>>>
>>>>>> V3: Rebase on drm-tip
>>>>>>
>>>>>> 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>
>>>>>> ---
>>>>> Have you addressed in some other patch my concerns regarding polluting
>>>>> infoframes generated for HDMI 1.4 devices (CEA-861-E) with VICs specific
>>>>> only for HDMI 2.0 (CEA-861-F) ? It will happen
>>>>> for all UHD modes, see [1][2] for previous discussion.
>>>> Hello Andrzej
>>>>
>>>> As you already know, the aspect ratio is indexed with the VIC, which
>>>> comes from EDID.
>>>> Now, why would a HDMI 1.4 monitor, contain a HDMI 2.0 VIC ? If it does,
>>>> its not compliant.
>>> Have you forgot our previous discussion? Let me cite myself:
>>>
>>> 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.
>>>
>>>
>>> And your discussion with Ville:
>>>
>>>>> />>> 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.
>>> It does not seem to be addressed.
>>>
>>> Regards
>>> Andrzej
>> Hey, thanks for bringing this out again. I checked the specs again,
>> there are three things here:
>> - The spec has a section on this, and it states that in such cases CEA
>> VIC should be supplied to the AVI IF.
> This phrase is not precise, but if it means that in case of
> 3840x2160@30Hz source should set VIC to 95 also for HDMI1.4 compliant
> sinks it is in opposition to statement from HDMI1.4 specification:
>> When transmitting any extended video format indicated through use of
>> the HDMI_VIC field
>> in the HDMI Vendor Specific InfoFrame or any other format which is not
>> described in the
>> above cases, an HDMI Source shall set the AVI InfoFrame VIC field to zero.
> I do not think HDMI20 could invalidate claims from HDMI1.4.
These claims are not made in HDMI 2.0 specs, CEA is the body which 
defines VICs, AVI-IF and aspects, so its defined in CEA-861-F spec
IF you check the CEA-861-F spec, you will find this section.
>
>> - Also, for HDMI infoframe blocks, we dont refer to cea_edid_modes[]
>> rather we go to edid_4k_modes[]
> cea_edid_modes is used in generating AVI infoframe,
> edid_4k_modes is used in generating vendor infoframe
>> - Again, as there is no aspect ratio parsing layer in DRM right now
>> (after the revert), we are doing the right thing to give aspect as per
>> CEA, which is suggested by spec too.
>>
> I do not understand this phrase. Are you talking about aspect ratios or
> about video format?
As edid_cea_modes is being used in drm_hdmi_avi_if_from_display_mode, 
only place where its being used to load AVI IF (with aspect ratio 
information), I was talking about both.
But lets talk about VIC only from here.

Shashank
>
> Regards
> Andrzej
>
Sharma, Shashank Jan. 30, 2017, 11:29 a.m. UTC | #8
I just realized that the CEA spec talks about picking HDMI 2.0/861-F VIC 
over HDMI14b VIC in case of 3D side-by-side format (not in 2D),

In this case, we might have to add a check while loading the VIC filed 
in AVI IF (as you suggested)

Will come back with a V2 (if required), once I have more information on 
this.
>>> 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
Shashank
Harry Wentland Jan. 30, 2017, 8:43 p.m. UTC | #9
We'd like these in amdgpu as well. I've only skimmed the patch but it looks pretty good to me.

Acked-by: Harry Wentland <harry.wentland@amd.com>

Harry


On 2017-01-29 12:41 AM, 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).
>
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
>
> V2: Addressed review comments from Jose:
> - fix the timings for VIC 83, 90 and 91
> - fix formatting for VIC 93-107
>
> V3: Rebase on drm-tip
>
> 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>
> ---
>  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 baa6ccb..b4eae1f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -995,6 +995,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},
>  };
>  
>  /*
Ville Syrjala Jan. 31, 2017, 2:52 p.m. UTC | #10
On Sun, Jan 29, 2017 at 11:11:05AM +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).

Looks like CEA-861-F also defines news VICs in the range 193-253 as
well. The way we're parsing things at the moment would actually
confuse those with the ones we already have. So it looks to me like
more work is needed to parse all the new stuff correctly.

And the way the spec lays stuff out makes me think that we might not
necessarily want to stuff anything with VIC 65 or higher into the
existing table.

> 
> Cc: Jose Abreu <Jose.Abreu@synopsys.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> 
> V2: Addressed review comments from Jose:
> - fix the timings for VIC 83, 90 and 91
> - fix formatting for VIC 93-107
> 
> V3: Rebase on drm-tip
> 
> 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>
> ---
>  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 baa6ccb..b4eae1f 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -995,6 +995,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
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index baa6ccb..b4eae1f 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -995,6 +995,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},
 };
 
 /*