drm/edid: Parse VRR cap fields from HFVSDB block
Subsystems (2)
PATCH 1/1 drm/edid: Parse VRR cap fields from HFVSDB block
This patch parses HFVSDB fields for VRR capabilities of an HDMI2.1 sink and stores the VRR caps in a new structure in drm_hdmi_info.
--- drivers/gpu/drm/drm_edid.c | 26 ++++++++++++++++++++++++-- include/drm/drm_connector.h | 27 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +24 -2
@@ -5823,6 +5823,21 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector, hdmi->y420_dc_modes = dc_mask; } +static void drm_parse_vrr_info (struct drm_hdmi_vrr_cap *hdmi_vrr, +const u8 *hf_scds) +{ +if (hf_scds[8 ] &DRM_EDID_CNMVRR ) + hdmi_vrr->cnm_vrr = true; +if (hf_scds[8 ] &DRM_EDID_CINEMA_VRR ) + hdmi_vrr->cinema_vrr = true; +if (hf_scds[8 ] &DRM_EDID_MDELTA ) + hdmi_vrr->m_delta = true; + + hdmi_vrr->vrr_min = hf_scds[9 ] &DRM_EDID_VRR_MIN_MASK ; + hdmi_vrr->vrr_max = (hf_scds[9 ] &DRM_EDID_VRR_MAX_UPPER_MASK ) <<2 ; + hdmi_vrr->vrr_max |= hf_scds[10 ] &DRM_EDID_VRR_MAX_LOWER_MASK ; +} +static void drm_parse_dsc_info (struct drm_hdmi_dsc_cap *hdmi_dsc,const u8 *hf_scds) {
@@ -5901,9 +5916,11 @@ static void drm_parse_hdmi_forum_scds(struct drm_connector *connector,struct drm_display_info *display = &connector->display_info;struct drm_hdmi_info *hdmi = &display->hdmi;struct drm_hdmi_dsc_cap *hdmi_dsc = &hdmi->dsc_cap; +struct drm_hdmi_vrr_cap *hdmi_vrr = &hdmi->vrr_cap;int max_tmds_clock =0 ;u8 max_frl_rate =0 ;bool dsc_support = false; +bool vrr_support = false; display->has_hdmi_infoframe = true;
@@ -5949,14 +5966,19 @@ static void drm_parse_hdmi_forum_scds(struct drm_connector *connector,drm_parse_ycbcr420_deep_color_info (connector, hf_scds); +if (cea_db_payload_len (hf_scds) >=8 && hf_scds[8 ]) { +drm_parse_vrr_info (hdmi_vrr, hf_scds); + vrr_support = true; + } +if (cea_db_payload_len (hf_scds) >=11 && hf_scds[11 ]) {drm_parse_dsc_info (hdmi_dsc, hf_scds); dsc_support = true; }drm_dbg_kms (connector->dev, -"HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, DSC 1.2 support: %s\n" , - max_tmds_clock,str_yes_no (max_frl_rate),str_yes_no (dsc_support)); +"HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, VRR support: %s, DSC 1.2 support: %s\n" , + max_tmds_clock,str_yes_no (max_frl_rate),str_yes_no (vrr_support),str_yes_no (dsc_support)); } static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,
include/drm/drm_connector.h +27 -0
@@ -219,6 +219,30 @@ struct drm_hdmi_dsc_cap {u8 total_chunk_kbytes; }; + +/** +* struct drm_hdmi_vrr_cap - VRR capabilities of HDMI sink +* Describes the VRR support provided by HDMI 2.1 sink. +* The information is fetched fom additional HFVSDB blocks defined +* for HDMI 2.1. +*/ +struct drm_hdmi_vrr_cap { +/** @cnm_vrr: sink supports negative Mvrr values*/ +bool cnm_vrr; + +/** @cinema_vrr: sink supports fractional and integer media rates < VRRmin*/ +bool cinema_vrr; + +/** @m_delta: sink can anticipate and compensate for frame-to-frame variation in Mvrr */ +bool m_delta; + +/** @vrr_min: VRRmin - lowest framerate in Hz that sink can support in VRR */ +u8 vrr_min; + +/** @vrr_max: VRRmax - highest framerate in Hz that sink can support in VRR */ +u16 vrr_max; +}; +/** * struct drm_hdmi_info - runtime information about the connected HDMI sink *
@@ -259,6 +283,9 @@ struct drm_hdmi_info {/** @dsc_cap: DSC capabilities of the sink */ struct drm_hdmi_dsc_cap dsc_cap; + +/** @vrr_cap: VRR capabilities of the sink */ +struct drm_hdmi_vrr_cap vrr_cap; };/**
Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/edid: Parse VRR cap fields from HFVSDB block
== Series Details ==
== Series Details ==
Series: drm/edid: Parse VRR cap fields from HFVSDB block
URL : https://patchwork.freedesktop.org/series/109801/
State : warning
== Summary ==
Error: dim checkpatch failed1eed49c11931 drm/edid: Parse VRR cap fields from HFVSDB block -:68: WARNING:LONG_LINE: line length of 112 exceeds 100 columns #68: FILE: drivers/gpu/drm/drm_edid.c:5981:
+ max_tmds_clock, str_yes_no(max_frl_rate), str_yes_no(vrr_support), str_yes_no(dsc_support));
-:80: CHECK:LINE_SPACING: Please don't use multiple blank lines #80: FILE: include/drm/drm_connector.h:222:
+
total: 0 errors, 1 warnings, 1 checks, 92 lines checked
Patchwork
CI[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/edid: Parse VRR cap fields from HFVSDB block
In reply to Ankit Nautiyal== Series Details ==
== Series Details ==
Series: drm/edid: Parse VRR cap fields from HFVSDB block
URL : https://patchwork.freedesktop.org/series/109801/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for drm/edid: Parse VRR cap fields from HFVSDB block
In reply to Ankit Nautiyal== Series Details ==
== Series Details ==
Series: drm/edid: Parse VRR cap fields from HFVSDB block
URL : https://patchwork.freedesktop.org/series/109801/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12254 -> Patchwork_109801v1
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/index.html
Participating hosts (45 -> 43)
------------------------------
Additional (2): fi-hsw-4770 bat-atsm-1
Missing (4): fi-bdw-samus fi-bxt-dsi fi-icl-u2 fi-kbl-guc
Known issues
------------
Here are the changes found in Patchwork_109801v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_pm_backlight@basic-brightness:
- fi-hsw-4770: NOTRUN -> [SKIP][1] ([fdo#109271] / [i915#3012])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-hsw-4770: NOTRUN -> [INCOMPLETE][2] ([i915#7221])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@[email protected]
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- fi-hsw-4770: NOTRUN -> [SKIP][3] ([fdo#109271]) +9 similar issues
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@[email protected]
* igt@kms_chamelium@dp-crc-fast:
- fi-hsw-4770: NOTRUN -> [SKIP][4] ([fdo#109271] / [fdo#111827]) +7 similar issues
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@[email protected]
* igt@kms_psr@sprite_plane_onoff:
- fi-hsw-4770: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#1072]) +3 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@kms_psr@sprite_plane_onoff.html
* igt@runner@aborted:
- fi-hsw-4770: NOTRUN -> [FAIL][6] ([fdo#109271] / [i915#4312] / [i915#5594])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/fi-hsw-4770/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
[i915#7220]: https://gitlab.freedesktop.org/drm/intel/issues/7220
[i915#7221]: https://gitlab.freedesktop.org/drm/intel/issues/7221
Build changes
-------------
* Linux: CI_DRM_12254 -> Patchwork_109801v1
CI-20190529: 20190529
CI_DRM_12254: 2e6cdde56f896add665edb8d2f6d3dfce8b1b3b6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7018: 8312a2fe3f3287ba4ac4bc8d100de0734480f482 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109801v1: 2e6cdde56f896add665edb8d2f6d3dfce8b1b3b6 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
b9b77a1b6ed3 drm/edid: Parse VRR cap fields from HFVSDB block
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/index.html
Quoted 5 lines · Ankit Nautiyal
This patch parses HFVSDB fields for VRR capabilities of an HDMI2.1 sink and stores the VRR caps in a new structure in
drm_hdmi_info.Signed-off-by Ankit Nautiyal <[email protected]>
Makes sense to add this VRR info to drm_hdmi_info struct and not combine with DP VRR info struct in display info since hdmi info has other HDMI cap info stored here.
Manasi
Quoted 113 lines
--- drivers/gpu/drm/drm_edid.c | 26 ++++++++++++++++++++++++-- include/drm/drm_connector.h | 27 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-)drivers/gpu/drm/drm_edid.c +24
-2@@ -5823,6 +5823,21 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector, hdmi->y420_dc_modes = dc_mask; } +static void drm_parse_vrr_info (struct drm_hdmi_vrr_cap *hdmi_vrr, +const u8 *hf_scds) +{ +if (hf_scds[8 ] &DRM_EDID_CNMVRR ) + hdmi_vrr->cnm_vrr = true; +if (hf_scds[8 ] &DRM_EDID_CINEMA_VRR ) + hdmi_vrr->cinema_vrr = true; +if (hf_scds[8 ] &DRM_EDID_MDELTA ) + hdmi_vrr->m_delta = true; + + hdmi_vrr->vrr_min = hf_scds[9 ] &DRM_EDID_VRR_MIN_MASK ; + hdmi_vrr->vrr_max = (hf_scds[9 ] &DRM_EDID_VRR_MAX_UPPER_MASK ) <<2 ; + hdmi_vrr->vrr_max |= hf_scds[10 ] &DRM_EDID_VRR_MAX_LOWER_MASK ; +} +static void drm_parse_dsc_info (struct drm_hdmi_dsc_cap *hdmi_dsc,const u8 *hf_scds) {@@ -5901,9 +5916,11 @@ static void drm_parse_hdmi_forum_scds(struct drm_connector *connector,struct drm_display_info *display = &connector->display_info;struct drm_hdmi_info *hdmi = &display->hdmi;struct drm_hdmi_dsc_cap *hdmi_dsc = &hdmi->dsc_cap; +struct drm_hdmi_vrr_cap *hdmi_vrr = &hdmi->vrr_cap;int max_tmds_clock =0 ;u8 max_frl_rate =0 ;bool dsc_support = false; +bool vrr_support = false; display->has_hdmi_infoframe = true;@@ -5949,14 +5966,19 @@ static void drm_parse_hdmi_forum_scds(struct drm_connector *connector,drm_parse_ycbcr420_deep_color_info (connector, hf_scds); +if (cea_db_payload_len (hf_scds) >=8 && hf_scds[8 ]) { +drm_parse_vrr_info (hdmi_vrr, hf_scds); + vrr_support = true; + } +if (cea_db_payload_len (hf_scds) >=11 && hf_scds[11 ]) {drm_parse_dsc_info (hdmi_dsc, hf_scds); dsc_support = true; }drm_dbg_kms (connector->dev, -"HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, DSC 1.2 support: %s\n" , - max_tmds_clock,str_yes_no (max_frl_rate),str_yes_no (dsc_support)); +"HF-VSDB: max TMDS clock: %d KHz, HDMI 2.1 support: %s, VRR support: %s, DSC 1.2 support: %s\n" , + max_tmds_clock,str_yes_no (max_frl_rate),str_yes_no (vrr_support),str_yes_no (dsc_support)); } static void drm_parse_hdmi_deep_color_info(struct drm_connector *connector,include/drm/drm_connector.h +27
-0@@ -219,6 +219,30 @@ struct drm_hdmi_dsc_cap {u8 total_chunk_kbytes; }; + +/** +* struct drm_hdmi_vrr_cap - VRR capabilities of HDMI sink +* Describes the VRR support provided by HDMI 2.1 sink. +* The information is fetched fom additional HFVSDB blocks defined +* for HDMI 2.1. +*/ +struct drm_hdmi_vrr_cap { +/** @cnm_vrr: sink supports negative Mvrr values*/ +bool cnm_vrr; + +/** @cinema_vrr: sink supports fractional and integer media rates < VRRmin*/ +bool cinema_vrr; + +/** @m_delta: sink can anticipate and compensate for frame-to-frame variation in Mvrr */ +bool m_delta; + +/** @vrr_min: VRRmin - lowest framerate in Hz that sink can support in VRR */ +u8 vrr_min; + +/** @vrr_max: VRRmax - highest framerate in Hz that sink can support in VRR */ +u16 vrr_max; +}; +/** * struct drm_hdmi_info - runtime information about the connected HDMI sink * @@ -259,6 +283,9 @@ struct drm_hdmi_info {/** @dsc_cap: DSC capabilities of the sink */ struct drm_hdmi_dsc_cap dsc_cap; + +/** @vrr_cap: VRR capabilities of the sink */ +struct drm_hdmi_vrr_cap vrr_cap; };/** Signature · 1 line
2.25.1
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for drm/edid: Parse VRR cap fields from HFVSDB block
In reply to Ankit Nautiyal== Series Details ==
== Series Details ==
Series: drm/edid: Parse VRR cap fields from HFVSDB block
URL : https://patchwork.freedesktop.org/series/109801/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_12254_full -> Patchwork_109801v1_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in Patchwork_109801v1_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gen9_exec_parse@allowed-single:
- shard-tglb: NOTRUN -> [SKIP][1] ([i915#2527] / [i915#2856])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@[email protected]
* igt@i915_selftest@live@workarounds:
- shard-tglb: NOTRUN -> [INCOMPLETE][2] ([i915#7222])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@i915_selftest@[email protected]
* igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip:
- shard-tglb: [PASS][3] -> [FAIL][4] ([i915#3743])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12254/shard-tglb7/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb1/igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-0-hflip-async-flip.html
* igt@kms_ccs@pipe-b-crc-sprite-planes-basic-4_tiled_dg2_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][5] ([i915#6095])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_ccs@pipe-b-crc-sprite-planes-basic-4_tiled_dg2_mc_ccs.html
* igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs:
- shard-tglb: NOTRUN -> [SKIP][6] ([i915#3689] / [i915#3886])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_mc_ccs.html
* igt@kms_content_protection@content_type_change:
- shard-tglb: NOTRUN -> [SKIP][7] ([i915#7118])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_content_protection@content_type_change.html
* igt@kms_cursor_crc@cursor-sliding-32x10:
- shard-tglb: NOTRUN -> [SKIP][8] ([i915#3555]) +1 similar issue
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@[email protected]
* igt@kms_flip@2x-flip-vs-dpms-off-vs-modeset-interruptible:
- shard-tglb: NOTRUN -> [SKIP][9] ([fdo#109274] / [fdo#111825] / [i915#3637])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@[email protected]
* igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-pgflip-blt:
- shard-tglb: NOTRUN -> [SKIP][10] ([fdo#109280] / [fdo#111825]) +2 similar issues
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-pgflip-blt.html
* igt@kms_plane_scaling@plane-upscale-with-rotation-factor-0-25@pipe-c-edp-1:
- shard-tglb: NOTRUN -> [SKIP][11] ([i915#5176]) +3 similar issues
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_plane_scaling@[email protected]
#### Possible fixes ####
* igt@gem_ctx_exec@basic-nohangcheck:
- shard-tglb: [FAIL][12] ([i915#6268]) -> [PASS][13]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12254/shard-tglb1/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb1/igt@[email protected]
* igt@gem_huc_copy@huc-copy:
- shard-tglb: [SKIP][14] ([i915#2190]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12254/shard-tglb7/igt@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb1/igt@[email protected]
* igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip:
- shard-tglb: [FAIL][16] ([i915#3743]) -> [PASS][17]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12254/shard-tglb1/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/shard-tglb7/igt@kms_big_fb@x-tiled-max-hw-stride-32bpp-rotate-180-hflip-async-flip.html
[fdo#109274]: https://bugs.freedesktop.org/show_bug.cgi?id=109274
[fdo#109280]: https://bugs.freedesktop.org/show_bug.cgi?id=109280
[fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
[i915#2856]: https://gitlab.freedesktop.org/drm/intel/issues/2856
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3689]: https://gitlab.freedesktop.org/drm/intel/issues/3689
[i915#3743]: https://gitlab.freedesktop.org/drm/intel/issues/3743
[i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
[i915#5176]: https://gitlab.freedesktop.org/drm/intel/issues/5176
[i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
[i915#6268]: https://gitlab.freedesktop.org/drm/intel/issues/6268
[i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
[i915#7222]: https://gitlab.freedesktop.org/drm/intel/issues/7222
Build changes
-------------
* Linux: CI_DRM_12254 -> Patchwork_109801v1
CI-20190529: 20190529
CI_DRM_12254: 2e6cdde56f896add665edb8d2f6d3dfce8b1b3b6 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7018: 8312a2fe3f3287ba4ac4bc8d100de0734480f482 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_109801v1: 2e6cdde56f896add665edb8d2f6d3dfce8b1b3b6 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109801v1/index.html