Skip to contentSkip to conversation

Add HDR Metadata Parsing and handling in DRM layer

PATCH Superseded Uma Shankar 5 participants 18 messages Apr 2, 2019 – Apr 9, 2019

Subsystems (4)

v7 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v7 cover Add HDR Metadata Parsing and handling in DRM layer

This patch series enables HDR support in drm. It basically defines HDR metadata structures, property to pass content (after blending) metadata from user space compositors to driver.

Dynamic Range and Mastering infoframe creation and sending.

ToDo:
1. We need to get the color framework in place for all planes which support HDR content in hardware. This is already in progres and patches are out for review in mailing list.
2. UserSpace/Compositors: Blending policies and metadata blob creation and passing to driver. Work is already in progress by Intel's middleware teams on wayland and the patches for the same are in review.

Please review and share your feedbacks/suggestions.

Note: The intention for these patches is to get a design feedback on the uapi changes, generic property design and infoframe handling. This cannot get merged as of now without the userspace support in place.

A POC has already been developed by Ville based on wayland. Please refer below link to see the component interactions and usage:
https://lists.freedesktop.org/archives/wayland-devel/2017-December/036403.html

v2: Updated Ville's POC changes to the patch series.Incorporated cleanups and fixes from Ville. Rebase on latest drm-tip.

v3: Fixed a warning causing builds to break on CI. No major change.

v4: Addressed Shashank's review comments.

v5: Rebase on top of Ville's infoframe refactoring changes. Fixed non modeset case for HDR metadata update. Dropped a redundant patch.

v6: Addressed Shashank's review comments and added RB's received.

v7: Squashed 2 patches, dropped 1 change and addressed Brian Starkey's and Shashank's review comments.

Note: Media driver and VAAPI changes for HDR are already out, with compositors changes also expected to land soon. Weston changes already floated and reviews started in community and is in active development along with GL efforts.

Uma Shankar (7):
drm: Add HDR source metadata property
drm: Parse HDR metadata info from EDID
drm: Enable HDR infoframe support
drm/i915: Attach HDR metadata property to connector drm/i915: Write HDR infoframe and send to panel drm/i915:Enabled Modeset when HDR Infoframe changes drm/i915: Set Infoframe for non modeset case for HDR

Ville Syrjälä (2):
drm/i915: Add HLG EOTF
drm/i915: Enable infoframes on GLK+ for HDR

 drivers/gpu/drm/drm_atomic.c        |   2 +
 drivers/gpu/drm/drm_atomic_uapi.c   |  13 +++
 drivers/gpu/drm/drm_connector.c     |   6 ++
 drivers/gpu/drm/drm_edid.c          | 102 ++++++++++++++++++++
 drivers/gpu/drm/i915/i915_reg.h     |   4 +
 drivers/gpu/drm/i915/intel_atomic.c |  14 ++-
 drivers/gpu/drm/i915/intel_ddi.c    |  13 +++
 drivers/gpu/drm/i915/intel_drv.h    |   1 +
 drivers/gpu/drm/i915/intel_hdmi.c   |  79 ++++++++++++++-
 drivers/video/hdmi.c                | 186 ++++++++++++++++++++++++++++++++++++
 include/drm/drm_connector.h         |  10 ++
 include/drm/drm_edid.h              |   5 +
 include/drm/drm_mode_config.h       |   6 ++
 include/linux/hdmi.h                |  38 ++++++++
 include/uapi/drm/drm_mode.h         |  22 +++++
 15 files changed, 496 insertions(+), 5 deletions(-)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

✗ Fi.CI.CHECKPATCH: warning for Add HDR Metadata Parsing and handling in DRM layer (rev7)

== Series Details ==

== Series Details ==

Series: Add HDR Metadata Parsing and handling in DRM layer (rev7)
URL : https://patchwork.freedesktop.org/series/25091/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
2d47c2744ec3 drm: Add HDR source metadata property
-:62: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#62: FILE: drivers/gpu/drm/drm_atomic_uapi.c:728:
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 129 lines checked a74478938abf drm: Parse HDR metadata info from EDID 5613a94ff569 drm: Enable HDR infoframe support be02643ba319 drm/i915: Attach HDR metadata property to connector cccc437647c3 drm/i915: Write HDR infoframe and send to panel 481385d9fb84 drm/i915: Add HLG EOTF
5fb019cb6417 drm/i915: Enable infoframes on GLK+ for HDR -:51: WARNING:LONG_LINE: line over 100 characters
#51: FILE: drivers/gpu/drm/i915/i915_reg.h:8209:
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i) _MMIO_TRANS2(trans, _GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)

total: 0 errors, 1 warnings, 0 checks, 81 lines checked 53f4085ffd6d drm/i915:Enabled Modeset when HDR Infoframe changes 5e363bfa6d9c drm/i915: Set Infoframe for non modeset case for HDR

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.SPARSE: warning for Add HDR Metadata Parsing and handling in DRM layer (rev7)

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Add HDR Metadata Parsing and handling in DRM layer (rev7)
URL : https://patchwork.freedesktop.org/series/25091/
State : warning

== Summary ==

$ dim sparse origin/drm-tip
Sparse version: v0.5.2
Commit: drm: Add HDR source metadata property
Okay!

Commit: drm: Parse HDR metadata info from EDID
Okay!

Commit: drm: Enable HDR infoframe support
Okay!

Commit: drm/i915: Attach HDR metadata property to connector Okay!

Commit: drm/i915: Write HDR infoframe and send to panel
+ ^
+ ^~~~
+ ^~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+     ^~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+      ^~~~~~~~~~~~~~~
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~~
+           ^~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~~
+             ^~~~~~~~~~~~~~~~~~~~~~~~~

+ ^~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~
+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ^~~~~~~~~~~~~~~~~~~~~~~~~
+ }

-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void [noderef] <asn:4>**slot
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    expected void **slot
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4>**
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4>**
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void [noderef] <asn:4>**
-drivers/gpu/drm/i915/gvt/gtt.c:757:9:    got void **slot

-drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces)
-drivers/gpu/drm/i915/gvt/gtt.c:758:45: expected void [noderef] <asn:4>**slot
-drivers/gpu/drm/i915/gvt/gtt.c:758:45: got void **slot
-drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 (different address spaces) -drivers/gpu/drm/i915/gvt/mmio.c:282:23: warning: memcpy with byte count of 279040 -drivers/gpu/drm/i915/gvt/mmio.c:283:23: warning: memcpy with byte count of 279040
+At top level:
+ bool intel_hdmi_handle_sink_scrambling(struct intel_encoder *encoder,
+ bool intel_hdmi_hdcp_check_link(struct intel_digital_port *intel_dig_port) +builtin:0:0: error: Expected } at end of function
+builtin:0:0: error: got end-of-input
+cc1: all warnings being treated as errors

+  .check_2_2_link = intel_hdmi_hdcp2_check_link,
+  .check_link = intel_hdmi_hdcp_check_link,
+  .destroy = intel_hdmi_destroy,
+  .detect = intel_hdmi_detect,

-drivers/gpu/drm/i915/intel_hdmi.c:2080:34: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2080:34: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2097:42: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2097:42: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2101:42: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2101:42: warning: expression using sizeof(void) -drivers/gpu/drm/i915/intel_hdmi.c:2104:42: warning: expression using sizeof(void) +drivers/gpu/drm/i915/intel_hdmi.c:1215:1: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement] +drivers/gpu/drm/i915/intel_hdmi.c:1215:1: warning: mixing declarations and code +drivers/gpu/drm/i915/intel_hdmi.c:1231:12: error: invalid storage class for function ‘intel_hdmi_hdcp_read’ +drivers/gpu/drm/i915/intel_hdmi.c:1261:12: error: invalid storage class for function ‘intel_hdmi_hdcp_write’ +drivers/gpu/drm/i915/intel_hdmi.c:1296:5: error: invalid storage class for function ‘intel_hdmi_hdcp_write_an_aksv’ +drivers/gpu/drm/i915/intel_hdmi.c:1321:12: error: invalid storage class for function ‘intel_hdmi_hdcp_read_bksv’ +drivers/gpu/drm/i915/intel_hdmi.c:1333:5: error: invalid storage class for function ‘intel_hdmi_hdcp_read_bstatus’ +drivers/gpu/drm/i915/intel_hdmi.c:1345:5: error: invalid storage class for function ‘intel_hdmi_hdcp_repeater_present’ +drivers/gpu/drm/i915/intel_hdmi.c:1361:5: error: invalid storage class for function ‘intel_hdmi_hdcp_read_ri_prime’ +drivers/gpu/drm/i915/intel_hdmi.c:1373:5: error: invalid storage class for function ‘intel_hdmi_hdcp_read_ksv_ready’ +drivers/gpu/drm/i915/intel_hdmi.c:1389:5: error: invalid storage class for function ‘intel_hdmi_hdcp_read_ksv_fifo’ +drivers/gpu/drm/i915/intel_hdmi.c:1403:5: error: invalid storage class for function ‘intel_hdmi_hdcp_read_v_prime_part’ +drivers/gpu/drm/i915/intel_hdmi.c:1418:12: error: invalid storage class for function ‘kbl_repositioning_enc_en_signal’ +drivers/gpu/drm/i915/intel_hdmi.c:1450:5: error: invalid storage class for function ‘intel_hdmi_hdcp_toggle_signalling’ +drivers/gpu/drm/i915/intel_hdmi.c:1479:6: error: invalid storage class for function ‘intel_hdmi_hdcp_check_link’ +drivers/gpu/drm/i915/intel_hdmi.c:1531:5: error: invalid storage class for function ‘intel_hdmi_hdcp2_read_rx_status’ +drivers/gpu/drm/i915/intel_hdmi.c:1540:12: error: invalid storage class for function ‘get_hdcp2_msg_timeout’ +drivers/gpu/drm/i915/intel_hdmi.c:1555:5: error: invalid storage class for function ‘hdcp2_detect_msg_availability’ +drivers/gpu/drm/i915/intel_hdmi.c:1581:1: error: invalid storage class for function ‘intel_hdmi_hdcp2_wait_for_msg’ +drivers/gpu/drm/i915/intel_hdmi.c:1605:5: error: invalid storage class for function ‘intel_hdmi_hdcp2_write_msg’ +drivers/gpu/drm/i915/intel_hdmi.c:1615:5: error: invalid storage class for function ‘intel_hdmi_hdcp2_read_msg’ +drivers/gpu/drm/i915/intel_hdmi.c:1647:5: error: invalid storage class for function ‘intel_hdmi_hdcp2_check_link’ +drivers/gpu/drm/i915/intel_hdmi.c:1669:5: error: invalid storage class for function ‘intel_hdmi_hdcp2_capable’ +drivers/gpu/drm/i915/intel_hdmi.c:1685:26: error: invalid storage class for function ‘intel_hdmi_hdcp2_protocol’ +drivers/gpu/drm/i915/intel_hdmi.c:1691:19: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1691:19: note: (near initialization for ‘intel_hdmi_hdcp_shim.write_an_aksv’) +drivers/gpu/drm/i915/intel_hdmi.c:1692:15: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1692:15: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_bksv’) +drivers/gpu/drm/i915/intel_hdmi.c:1693:18: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1693:18: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_bstatus’) +drivers/gpu/drm/i915/intel_hdmi.c:1694:22: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1694:22: note: (near initialization for ‘intel_hdmi_hdcp_shim.repeater_present’) +drivers/gpu/drm/i915/intel_hdmi.c:1695:19: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1695:19: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_ri_prime’) +drivers/gpu/drm/i915/intel_hdmi.c:1696:20: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1696:20: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_ksv_ready’) +drivers/gpu/drm/i915/intel_hdmi.c:1697:19: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1697:19: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_ksv_fifo’) +drivers/gpu/drm/i915/intel_hdmi.c:1698:23: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1698:23: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_v_prime_part’) +drivers/gpu/drm/i915/intel_hdmi.c:1699:23: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1699:23: note: (near initialization for ‘intel_hdmi_hdcp_shim.toggle_signalling’) +drivers/gpu/drm/i915/intel_hdmi.c:1700:16: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1700:16: note: (near initialization for ‘intel_hdmi_hdcp_shim.check_link’) +drivers/gpu/drm/i915/intel_hdmi.c:1701:19: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1701:19: note: (near initialization for ‘intel_hdmi_hdcp_shim.write_2_2_msg’) +drivers/gpu/drm/i915/intel_hdmi.c:1702:18: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1702:18: note: (near initialization for ‘intel_hdmi_hdcp_shim.read_2_2_msg’) +drivers/gpu/drm/i915/intel_hdmi.c:1703:20: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1703:20: note: (near initialization for ‘intel_hdmi_hdcp_shim.check_2_2_link’) +drivers/gpu/drm/i915/intel_hdmi.c:1704:22: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:1704:22: note: (near initialization for ‘intel_hdmi_hdcp_shim.hdcp_2_2_capable’) +drivers/gpu/drm/i915/intel_hdmi.c:1708:13: error: invalid storage class for function ‘intel_hdmi_prepare’ +drivers/gpu/drm/i915/intel_hdmi.c:1747:13: error: invalid storage class for function ‘intel_hdmi_get_hw_state’ +drivers/gpu/drm/i915/intel_hdmi.c:1767:13: error: invalid storage class for function ‘intel_hdmi_get_config’ +drivers/gpu/drm/i915/intel_hdmi.c:1833:13: error: invalid storage class for function ‘intel_enable_hdmi_audio’ +drivers/gpu/drm/i915/intel_hdmi.c:1845:13: error: invalid storage class for function ‘g4x_enable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:1867:13: error: invalid storage class for function ‘ibx_enable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:1917:13: error: invalid storage class for function ‘cpt_enable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:1972:13: error: invalid storage class for function ‘vlv_enable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:1978:13: error: invalid storage class for function ‘intel_disable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:2036:13: error: invalid storage class for function ‘g4x_disable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:2047:13: error: invalid storage class for function ‘pch_disable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:2056:13: error: invalid storage class for function ‘pch_post_disable_hdmi’ +drivers/gpu/drm/i915/intel_hdmi.c:2063:12: error: invalid storage class for function ‘intel_hdmi_source_max_tmds_clock’ +drivers/gpu/drm/i915/intel_hdmi.c:2085:12: error: invalid storage class for function ‘hdmi_port_clock_limit’ +drivers/gpu/drm/i915/intel_hdmi.c:2111:1: error: invalid storage class for function ‘hdmi_port_clock_valid’ +drivers/gpu/drm/i915/intel_hdmi.c:2134:1: error: invalid storage class for function ‘intel_hdmi_mode_valid’ +drivers/gpu/drm/i915/intel_hdmi.c:2181:13: error: invalid storage class for function ‘hdmi_deep_color_possible’ +drivers/gpu/drm/i915/intel_hdmi.c:2253:1: error: invalid storage class for function ‘intel_hdmi_ycbcr420_config’ +drivers/gpu/drm/i915/intel_hdmi.c:2436:1: error: invalid storage class for function ‘intel_hdmi_unset_edid’ +drivers/gpu/drm/i915/intel_hdmi.c:2451:1: error: invalid storage class for function ‘intel_hdmi_dp_dual_mode_detect’ +drivers/gpu/drm/i915/intel_hdmi.c:2498:1: error: invalid storage class for function ‘intel_hdmi_set_edid’ +drivers/gpu/drm/i915/intel_hdmi.c:2538:1: error: invalid storage class for function ‘intel_hdmi_detect’ +drivers/gpu/drm/i915/intel_hdmi.c:2570:1: error: invalid storage class for function ‘intel_hdmi_force’ +drivers/gpu/drm/i915/intel_hdmi.c:2583:12: error: invalid storage class for function ‘intel_hdmi_get_modes’ +drivers/gpu/drm/i915/intel_hdmi.c:2594:13: error: invalid storage class for function ‘intel_hdmi_pre_enable’ +drivers/gpu/drm/i915/intel_hdmi.c:2608:13: error: invalid storage class for function ‘vlv_hdmi_pre_enable’ +drivers/gpu/drm/i915/intel_hdmi.c:2630:13: error: invalid storage class for function ‘vlv_hdmi_pre_pll_enable’ +drivers/gpu/drm/i915/intel_hdmi.c:2639:13: error: invalid storage class for function ‘chv_hdmi_pre_pll_enable’ +drivers/gpu/drm/i915/intel_hdmi.c:2648:13: error: invalid storage class for function ‘chv_hdmi_post_pll_disable’ +drivers/gpu/drm/i915/intel_hdmi.c:2655:13: error: invalid storage class for function ‘vlv_hdmi_post_disable’ +drivers/gpu/drm/i915/intel_hdmi.c:2663:13: error: invalid storage class for function ‘chv_hdmi_post_disable’ +drivers/gpu/drm/i915/intel_hdmi.c:2678:13: error: invalid storage class for function ‘chv_hdmi_pre_enable’ +drivers/gpu/drm/i915/intel_hdmi.c:2705:1: error: invalid storage class for function ‘intel_hdmi_connector_register’ +drivers/gpu/drm/i915/intel_hdmi.c:2718:13: error: invalid storage class for function ‘intel_hdmi_destroy’ +drivers/gpu/drm/i915/intel_hdmi.c:2727:12: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2727:12: note: (near initialization for ‘intel_hdmi_connector_funcs.detect’) +drivers/gpu/drm/i915/intel_hdmi.c:2728:11: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2728:11: note: (near initialization for ‘intel_hdmi_connector_funcs.force’) +drivers/gpu/drm/i915/intel_hdmi.c:2732:19: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2732:19: note: (near initialization for ‘intel_hdmi_connector_funcs.late_register’) +drivers/gpu/drm/i915/intel_hdmi.c:2734:13: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2734:13: note: (near initialization for ‘intel_hdmi_connector_funcs.destroy’) +drivers/gpu/drm/i915/intel_hdmi.c:2740:15: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2740:15: note: (near initialization for ‘intel_hdmi_connector_helper_funcs.get_modes’) +drivers/gpu/drm/i915/intel_hdmi.c:2741:16: error: initializer element is not constant +drivers/gpu/drm/i915/intel_hdmi.c:2741:16: note: (near initialization for ‘intel_hdmi_connector_helper_funcs.mode_valid’) +drivers/gpu/drm/i915/intel_hdmi.c:2750:1: error: invalid storage class for function ‘intel_hdmi_add_properties’ +drivers/gpu/drm/i915/intel_hdmi.c:2795:6: error: ‘intel_hdmi_handle_sink_scrambling’ defined but not used [-Werror=unused-function] +drivers/gpu/drm/i915/intel_hdmi.c:2820:11: error: invalid storage class for function ‘chv_port_to_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:2842:11: error: invalid storage class for function ‘bxt_port_to_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:2861:11: error: invalid storage class for function ‘cnp_port_to_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:2887:11: error: invalid storage class for function ‘icl_port_to_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:2918:11: error: invalid storage class for function ‘g4x_port_to_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:2941:11: error: invalid storage class for function ‘intel_hdmi_ddc_pin’ +drivers/gpu/drm/i915/intel_hdmi.c:3078:6: error: ‘intel_hdmi_init’ defined but not used [-Werror=unused-function] +drivers/gpu/drm/i915/intel_hdmi.c:3160:1: error: expected declaration or statement at end of input +drivers/gpu/drm/i915/intel_hdmi.c: In function ‘hsw_set_infoframes’:
+ enum hdcp_wired_protocol intel_hdmi_hdcp2_protocol(void)

+  .force = intel_hdmi_force,
+  .get_modes = intel_hdmi_get_modes,
+  .hdcp_2_2_capable = intel_hdmi_hdcp2_capable,

+ hdmi_port_clock_valid(struct intel_hdmi *hdmi,
-./include/linux/overflow.h:251:13: error: incorrect type in conditional -./include/linux/overflow.h:251:13: error: incorrect type in conditional -./include/linux/overflow.h:251:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/overflow.h:251:13: error: undefined identifier '__builtin_mul_overflow'
-./include/linux/overflow.h:251:13: got void
-./include/linux/overflow.h:251:13: got void
-./include/linux/overflow.h:251:13: warning: call with no type!
-./include/linux/overflow.h:251:13: warning: call with no type!
-./include/linux/slab.h:666:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/slab.h:666:13: warning: call with no type! -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000000000000000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constan

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

PATCH v7 1/9 drm: Add HDR source metadata property

In reply to Uma Shankar

This patch adds a blob property to get HDR metadata information from userspace. This will be send as part of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output metadata property.The blob data is received from userspace and saved in connector state, the same is returned as blob in get property call to userspace.

v2: Rebase and modified the metadata structure elements as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined new structure with header for dynamic metadata scalability. Merge get/set property functions for metadata in this patch.

---
 drivers/gpu/drm/drm_atomic.c      |  2 ++
 drivers/gpu/drm/drm_atomic_uapi.c | 13 +++++++++++++
 drivers/gpu/drm/drm_connector.c   |  6 ++++++
 include/drm/drm_connector.h       | 10 ++++++++++
 include/drm/drm_mode_config.h     |  6 ++++++
 include/linux/hdmi.h              | 10 ++++++++++
 include/uapi/drm/drm_mode.h       | 22 ++++++++++++++++++++++
 7 files changed, 69 insertions(+)
drivers/gpu/drm/drm_atomic.c +2 -0
index 5eb4013..8b9c126 100644
@@ -881,6 +881,8 @@ static void drm_atomic_connector_print_state(struct drm_printer *p,
 
 	drm_printf(p, "connector[%u]: %s\n", connector->base.id, connector->name);
 	drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)");
+	drm_printf(p, "\thdr_metadata_changed=%d\n",
+		   state->hdr_metadata_changed);
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
 		if (state->writeback_job && state->writeback_job->fb)
drivers/gpu/drm/drm_atomic_uapi.c +13 -0
index ea797d4..6d0d161 100644
@@ -673,6 +673,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_mode_config *config = &dev->mode_config;
+	bool replaced = false;
+	int ret;
 
 	if (property == config->prop_crtc_id) {
 		struct drm_crtc *crtc = drm_crtc_find(dev, NULL, val);
@@ -721,6 +723,14 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		 */
 		if (state->link_status != DRM_LINK_STATUS_GOOD)
 			state->link_status = val;
+	} else if (property == config->hdr_output_metadata_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,
+				val,
+				-1, sizeof(struct hdr_output_metadata),
+				&replaced);
+		state->hdr_metadata_changed |= replaced;
+		return ret;
 	} else if (property == config->aspect_ratio_property) {
 		state->picture_aspect_ratio = val;
 	} else if (property == config->content_type_property) {
@@ -807,6 +817,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		*val = state->colorspace;
 	} else if (property == connector->scaling_mode_property) {
 		*val = state->scaling_mode;
+	} else if (property == config->hdr_output_metadata_property) {
+		*val = (state->hdr_output_metadata_blob_ptr) ?
+			state->hdr_output_metadata_blob_ptr->base.id : 0;
 	} else if (property == connector->content_protection_property) {
 		*val = state->content_protection;
 	} else if (property == config->writeback_fb_id_property) {
drivers/gpu/drm/drm_connector.c +6 -0
index 2355124..0bdae90 100644
@@ -1058,6 +1058,12 @@ int drm_connector_create_standard_properties(struct drm_device *dev)
 		return -ENOMEM;
 	dev->mode_config.non_desktop_property = prop;
 
+	prop = drm_property_create(dev, DRM_MODE_PROP_BLOB,
+				   "HDR_OUTPUT_METADATA", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.hdr_output_metadata_property = prop;
+
 	return 0;
 }
 
include/drm/drm_connector.h +10 -0
index 02a1312..9e3a39c 100644
@@ -599,6 +599,13 @@ struct drm_connector_state {
 	 * and the connector bpc limitations obtained from edid.
 	 */
 	u8 max_bpc;
+
+	/**
+	 * @metadata_blob_ptr:
+	 * DRM blob property for HDR output metadata
+	 */
+	struct drm_property_blob *hdr_output_metadata_blob_ptr;
+	u8 hdr_metadata_changed : 1;
 };
 
 /**
@@ -1239,6 +1246,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_output_metadata hdr_metadata;
 };
 
 #define obj_to_connector(x) container_of(x, struct drm_connector, base)
include/drm/drm_mode_config.h +6 -0
index 7f60e8e..ef2656b 100644
@@ -836,6 +836,12 @@ struct drm_mode_config {
 	 */
 	struct drm_property *writeback_out_fence_ptr_property;
 
+	/*
+	 * hdr_metadata_property: Connector property containing hdr metatda
+	 * This will be provided by userspace compositors based on HDR content
+	 */
+	struct drm_property *hdr_output_metadata_property;
+
 	/* dumb ioctl parameters */
 	uint32_t preferred_depth, prefer_shadow;
 
include/linux/hdmi.h +10 -0
index 927ad64..a065194 100644
@@ -152,6 +152,16 @@ enum hdmi_content_type {
 	HDMI_CONTENT_TYPE_GAME,
 };
 
+enum hdmi_metadata_type {
+	HDMI_STATIC_METADATA_TYPE1 = 1,
+};
+
+enum hdmi_eotf {
+	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
+	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
+	HDMI_EOTF_SMPTE_ST2084,
+};
+
 struct hdmi_avi_infoframe {
 	enum hdmi_infoframe_type type;
 	unsigned char version;
include/uapi/drm/drm_mode.h +22 -0
index 09d7296..9d6bdf5 100644
@@ -629,6 +629,28 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata as per 861.G spec */
+struct hdr_static_metadata {
+	__u8 eotf;
+	__u8 metadata_type;
+	struct {
+		__u16 x, y;
+		} display_primaries[3];
+	struct {
+		__u16 x, y;
+		} white_point;
+	__u16 max_cll;
+	__u16 max_fall;
+	__u16 min_cll;
+};
+
+struct hdr_output_metadata {
+	__u32 metadata_type;
+	union {
+		struct hdr_static_metadata hdmi_type1;
+	};
+};
+
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Re: [v7 1/9] drm: Add HDR source metadata property

Hi Uma.

Some kerneldoc nits below.

Sam

include/drm/drm_connector.h struct drm_connector_state { · line 607

Quoted 12 lines
include/drm/drm_connector.h +6 -0
@@ -599,6 +599,13 @@ struct drm_connector_state {
 	 * and the connector bpc limitations obtained from edid.
 	 */
 	u8 max_bpc;
+
+	/**
+	 * @metadata_blob_ptr:
+	 * DRM blob property for HDR output metadata
+	 */
+	struct drm_property_blob *hdr_output_metadata_blob_ptr;

The kerneldoc comment uses the wrong name.

include/drm/drm_connector.h struct drm_connector_state { · line 608

Quoted 1 line
include/drm/drm_connector.h +1 -0
+	u8 hdr_metadata_changed : 1;

kerneldoc is missing.

include/drm/drm_connector.h struct drm_connector { · line 1251

Quoted 10 lines
include/drm/drm_connector.h +3 -0
 };
 
 /**
@@ -1239,6 +1246,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_output_metadata hdr_metadata;

Please format as kerneldoc.

Quoted 9 lines
include/drm/drm_connector.h +0 -0
 };
 
 

#define obj_to_connector(x) container_of(x, struct drm_connector, base)

include/drm/drm_mode_config.h +0 -0
index 7f60e8e..ef2656b 100644

include/drm/drm_mode_config.h struct drm_mode_config { · line 844

Quoted 9 lines
include/drm/drm_mode_config.h +6 -0
@@ -836,6 +836,12 @@ struct drm_mode_config {
 	 */
 	struct drm_property *writeback_out_fence_ptr_property;
 
+	/*
+	 * hdr_metadata_property: Connector property containing hdr metatda
+	 * This will be provided by userspace compositors based on HDR content
+	 */
+	struct drm_property *hdr_output_metadata_property;
+

kerneldoc comment uses wrong name

include/drm/drm_mode_config.h struct drm_mode_config { · line 846

Quoted 2 lines
include/drm/drm_mode_config.h +0 -0
 	/* dumb ioctl parameters */
 	uint32_t preferred_depth, prefer_shadow;

Please format as kerneldoc.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Re: [v7 1/9] drm: Add HDR source metadata property

In reply to Uma Shankar
Quoted 179 lines · Uma Shankar

This patch adds a blob property to get HDR metadata information from userspace. This will be send as part of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output metadata property.The blob data is received from userspace and saved in connector state, the same is returned as blob in get property call to userspace.

v2: Rebase and modified the metadata structure elements as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined new structure with header for dynamic metadata scalability. Merge get/set property functions for metadata in this patch.

---
 drivers/gpu/drm/drm_atomic.c      |  2 ++
 drivers/gpu/drm/drm_atomic_uapi.c | 13 +++++++++++++
 drivers/gpu/drm/drm_connector.c   |  6 ++++++
 include/drm/drm_connector.h       | 10 ++++++++++
 include/drm/drm_mode_config.h     |  6 ++++++
 include/linux/hdmi.h              | 10 ++++++++++
 include/uapi/drm/drm_mode.h       | 22 ++++++++++++++++++++++
 7 files changed, 69 insertions(+)
drivers/gpu/drm/drm_atomic.c +2 -0
index 5eb4013..8b9c126 100644
@@ -881,6 +881,8 @@ static void drm_atomic_connector_print_state(struct drm_printer *p,
 
 	drm_printf(p, "connector[%u]: %s\n", connector->base.id, connector->name);
 	drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name : "(null)");
+	drm_printf(p, "\thdr_metadata_changed=%d\n",
+		   state->hdr_metadata_changed);
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
 		if (state->writeback_job && state->writeback_job->fb)
drivers/gpu/drm/drm_atomic_uapi.c +13 -0
index ea797d4..6d0d161 100644
@@ -673,6 +673,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_mode_config *config = &dev->mode_config;
+	bool replaced = false;
+	int ret;
 
 	if (property == config->prop_crtc_id) {
 		struct drm_crtc *crtc = drm_crtc_find(dev, NULL, val);
@@ -721,6 +723,14 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		 */
 		if (state->link_status != DRM_LINK_STATUS_GOOD)
 			state->link_status = val;
+	} else if (property == config->hdr_output_metadata_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,
+				val,
+				-1, sizeof(struct hdr_output_metadata),
+				&replaced);
+		state->hdr_metadata_changed |= replaced;
+		return ret;
 	} else if (property == config->aspect_ratio_property) {
 		state->picture_aspect_ratio = val;
 	} else if (property == config->content_type_property) {
@@ -807,6 +817,9 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector,
 		*val = state->colorspace;
 	} else if (property == connector->scaling_mode_property) {
 		*val = state->scaling_mode;
+	} else if (property == config->hdr_output_metadata_property) {
+		*val = (state->hdr_output_metadata_blob_ptr) ?
+			state->hdr_output_metadata_blob_ptr->base.id : 0;
 	} else if (property == connector->content_protection_property) {
 		*val = state->content_protection;
 	} else if (property == config->writeback_fb_id_property) {
drivers/gpu/drm/drm_connector.c +6 -0
index 2355124..0bdae90 100644
@@ -1058,6 +1058,12 @@ int drm_connector_create_standard_properties(struct drm_device *dev)
 		return -ENOMEM;
 	dev->mode_config.non_desktop_property = prop;
 
+	prop = drm_property_create(dev, DRM_MODE_PROP_BLOB,
+				   "HDR_OUTPUT_METADATA", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.hdr_output_metadata_property = prop;
+
 	return 0;
 }
 
include/drm/drm_connector.h +10 -0
index 02a1312..9e3a39c 100644
@@ -599,6 +599,13 @@ struct drm_connector_state {
 	 * and the connector bpc limitations obtained from edid.
 	 */
 	u8 max_bpc;
+
+	/**
+	 * @metadata_blob_ptr:
+	 * DRM blob property for HDR output metadata
+	 */
+	struct drm_property_blob *hdr_output_metadata_blob_ptr;
+	u8 hdr_metadata_changed : 1;
 };
 
 /**
@@ -1239,6 +1246,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_output_metadata hdr_metadata;
 };
 
 #define obj_to_connector(x) container_of(x, struct drm_connector, base)
include/drm/drm_mode_config.h +6 -0
index 7f60e8e..ef2656b 100644
@@ -836,6 +836,12 @@ struct drm_mode_config {
 	 */
 	struct drm_property *writeback_out_fence_ptr_property;
 
+	/*
+	 * hdr_metadata_property: Connector property containing hdr metatda
+	 * This will be provided by userspace compositors based on HDR content
+	 */
+	struct drm_property *hdr_output_metadata_property;
+
 	/* dumb ioctl parameters */
 	uint32_t preferred_depth, prefer_shadow;
 
include/linux/hdmi.h +10 -0
index 927ad64..a065194 100644
@@ -152,6 +152,16 @@ enum hdmi_content_type {
 	HDMI_CONTENT_TYPE_GAME,
 };
 
+enum hdmi_metadata_type {
+	HDMI_STATIC_METADATA_TYPE1 = 1,
+};
+
+enum hdmi_eotf {
+	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
+	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
+	HDMI_EOTF_SMPTE_ST2084,
+};
+
 struct hdmi_avi_infoframe {
 	enum hdmi_infoframe_type type;
 	unsigned char version;
include/uapi/drm/drm_mode.h +4 -0
index 09d7296..9d6bdf5 100644
@@ -629,6 +629,28 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata as per 861.G spec */
+struct hdr_static_metadata {
+	__u8 eotf;
+	__u8 metadata_type;

include/uapi/drm/drm_mode.h struct drm_color_lut { · line 645

Quoted 10 lines
include/uapi/drm/drm_mode.h +10 -0
+	struct {
+		__u16 x, y;
+		} display_primaries[3];
+	struct {
+		__u16 x, y;
+		} white_point;
+	__u16 max_cll;
+	__u16 max_fall;
+	__u16 min_cll;
+};

Does this struct represent a mix of the HDR Static Metadata Data Block (Table 84) and Static Metadata Descriptor Type 1 (Table 45) in CTA-861-G [1] ?

display_primaries and white_point is only part of the Static Metadata Descriptor and min_cll is only part of the HDR Static Metadata. min_cll should be parsed and set in drm_parse_hdr_metadata_block() in next patch or be removed from the struct.

max_display_mastering_luminance and min_display_mastering_luminance from Static Metadata Descriptor Type 1 is also missing in this struct. Why is max_cll and min_cll used for max_display_mastering_luminance and min_display_mastering_luminance in infoframe?

"frame->length = sizeof(struct hdr_static_metadata);" also needs to be changed in another patch of the patchset. The Static Metadata Descriptor Type 1 is 26 bytes and is set to 24 bytes using sizeof the above struct.

[1] https://standards.cta.tech/kwspub/published_docs/CTA-861-G_FINAL_revised_2017.pdf

Regards,
Jonas

include/uapi/drm/drm_mode.h struct drm_color_lut { · line 656

Quoted 11 lines
include/uapi/drm/drm_mode.h +8 -0
+
+struct hdr_output_metadata {
+	__u32 metadata_type;
+	union {
+		struct hdr_static_metadata hdmi_type1;
+	};
+};
+
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

Re: [v7 1/9] drm: Add HDR source metadata property

Quoted 223 lines

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Jonas Karlman
Sent: Monday, April 8, 2019 3:51 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: [email protected]; [email protected]; [email protected]; Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>
Subject: Re: [v7 1/9] drm: Add HDR source metadata property

Quoted 54 lines · Uma Shankar

This patch adds a blob property to get HDR metadata information from userspace. This will be send as part of AVI Infoframe to panel.

It also implements get() and set() functions for HDR output metadata property.The blob data is received from userspace and saved in connector state, the same is returned as blob in get property call to userspace.

v2: Rebase and modified the metadata structure elements as per Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

v6: Addressed Brian Starkey's review comments, defined new structure with header for dynamic metadata scalability.
Merge get/set property functions for metadata in this patch.

---
 drivers/gpu/drm/drm_atomic.c      |  2 ++
 drivers/gpu/drm/drm_atomic_uapi.c | 13 +++++++++++++
 drivers/gpu/drm/drm_connector.c   |  6 ++++++
 include/drm/drm_connector.h       | 10 ++++++++++
 include/drm/drm_mode_config.h     |  6 ++++++
 include/linux/hdmi.h              | 10 ++++++++++
 include/uapi/drm/drm_mode.h       | 22 ++++++++++++++++++++++
 7 files changed, 69 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/drm_atomic.c index 5eb4013..8b9c126 100644

drivers/gpu/drm/drm_atomic.c +2 -0
@@ -881,6 +881,8 @@ static void
 drm_atomic_connector_print_state(struct drm_printer *p,
 
 	drm_printf(p, "connector[%u]: %s\n", connector->base.id, connector-
 name);
 	drm_printf(p, "\tcrtc=%s\n", state->crtc ? state->crtc->name :
 "(null)");
+	drm_printf(p, "\thdr_metadata_changed=%d\n",
+		   state->hdr_metadata_changed);
drivers/gpu/drm/drm_atomic.c +0 -0
 	if (connector->connector_type == DRM_MODE_CONNECTOR_WRITEBACK)
 		if (state->writeback_job && state->writeback_job->fb) diff --git

a/drivers/gpu/drm/drm_atomic_uapi.c
b/drivers/gpu/drm/drm_atomic_uapi.c
index ea797d4..6d0d161 100644

drivers/gpu/drm/drm_atomic_uapi.c static int

Quoted 9 lines
drivers/gpu/drm/drm_atomic_uapi.c +3 -0
@@ -673,6 +673,8 @@ static int
 drm_atomic_connector_set_property(struct drm_connector *connector,  {
 	struct drm_device *dev = connector->dev;
 	struct drm_mode_config *config = &dev->mode_config;
+	bool replaced = false;
+	int ret;
 
 	if (property == config->prop_crtc_id) {
 		struct drm_crtc *crtc = drm_crtc_find(dev, NULL, val); @@ -721,6
+723,14 @@ static int drm_atomic_connector_set_property(struct drm_connector

*connector,

Quoted 5 lines
drivers/gpu/drm/drm_atomic_uapi.c +2 -0
 		 */
 		if (state->link_status != DRM_LINK_STATUS_GOOD)
 			state->link_status = val;
+	} else if (property == config->hdr_output_metadata_property) {
+		ret = drm_atomic_replace_property_blob_from_id(dev,

drivers/gpu/drm/drm_atomic_uapi.c static int drm_atomic_connector_set_property(struct drm_connector *connector,

Quoted 10 lines
drivers/gpu/drm/drm_atomic_uapi.c +7 -0
+				&state->hdr_output_metadata_blob_ptr,
+				val,
+				-1, sizeof(struct hdr_output_metadata),
+				&replaced);
+		state->hdr_metadata_changed |= replaced;
+		return ret;
 	} else if (property == config->aspect_ratio_property) {
 		state->picture_aspect_ratio = val;
 	} else if (property == config->content_type_property) { @@ -807,6
+817,9 @@ static int drm_atomic_connector_set_property(struct drm_connector

*connector,

drivers/gpu/drm/drm_connector.c int drm_connector_create_standard_properties(struct

Quoted 14 lines
drivers/gpu/drm/drm_atomic_uapi.c +3 -1
 		*val = state->colorspace;
 	} else if (property == connector->scaling_mode_property) {
 		*val = state->scaling_mode;
+	} else if (property == config->hdr_output_metadata_property) {
+		*val = (state->hdr_output_metadata_blob_ptr) ?
+			state->hdr_output_metadata_blob_ptr->base.id : 0;
 	} else if (property == connector->content_protection_property) {
 		*val = state->content_protection;
 	} else if (property == config->writeback_fb_id_property) { diff
--git a/drivers/gpu/drm/drm_connector.c

b/drivers/gpu/drm/drm_connector.c index 2355124..0bdae90 100644

drivers/gpu/drm/drm_connector.c +0 -0
@@ -1058,6 +1058,12 @@ int drm_connector_create_standard_properties(struct

drm_device *dev)

Quoted 90 lines
drivers/gpu/drm/drm_connector.c +6 -0
 		return -ENOMEM;
 	dev->mode_config.non_desktop_property = prop;
 
+	prop = drm_property_create(dev, DRM_MODE_PROP_BLOB,
+				   "HDR_OUTPUT_METADATA", 0);
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.hdr_output_metadata_property = prop;
+
 	return 0;
 }
 
include/drm/drm_connector.h +10 -0
index 02a1312..9e3a39c 100644
@@ -599,6 +599,13 @@ struct drm_connector_state {
 	 * and the connector bpc limitations obtained from edid.
 	 */
 	u8 max_bpc;
+
+	/**
+	 * @metadata_blob_ptr:
+	 * DRM blob property for HDR output metadata
+	 */
+	struct drm_property_blob *hdr_output_metadata_blob_ptr;
+	u8 hdr_metadata_changed : 1;
 };
 
 /**
@@ -1239,6 +1246,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_output_metadata hdr_metadata;
 };
 
 #define obj_to_connector(x) container_of(x, struct drm_connector,

base) diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h index 7f60e8e..ef2656b 100644

include/drm/drm_mode_config.h +6 -0
@@ -836,6 +836,12 @@ struct drm_mode_config {
 	 */
 	struct drm_property *writeback_out_fence_ptr_property;
 
+	/*
+	 * hdr_metadata_property: Connector property containing hdr metatda
+	 * This will be provided by userspace compositors based on HDR content
+	 */
+	struct drm_property *hdr_output_metadata_property;
+
 	/* dumb ioctl parameters */
 	uint32_t preferred_depth, prefer_shadow;
 
include/linux/hdmi.h index renamed from include/linux/hdmi.h +0 -0

927ad64..a065194 100644

include/linux/hdmi.h +10 -0
@@ -152,6 +152,16 @@ enum hdmi_content_type {
 	HDMI_CONTENT_TYPE_GAME,
 };
 
+enum hdmi_metadata_type {
+	HDMI_STATIC_METADATA_TYPE1 = 1,
+};
+
+enum hdmi_eotf {
+	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
+	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
+	HDMI_EOTF_SMPTE_ST2084,
+};
+
 struct hdmi_avi_infoframe {
 	enum hdmi_infoframe_type type;
 	unsigned char version;
include/uapi/drm/drm_mode.h +4 -0
index 09d7296..9d6bdf5 100644
@@ -629,6 +629,28 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata as per 861.G spec */
+struct hdr_static_metadata {
+	__u8 eotf;
+	__u8 metadata_type;

include/uapi/drm/drm_mode.h struct drm_color_lut { · line 645

Quoted 10 lines
include/uapi/drm/drm_mode.h +10 -0
+	struct {
+		__u16 x, y;
+		} display_primaries[3];
+	struct {
+		__u16 x, y;
+		} white_point;
+	__u16 max_cll;
+	__u16 max_fall;
+	__u16 min_cll;
+};

Does this struct represent a mix of the HDR Static Metadata Data Block (Table 84) and Static Metadata Descriptor Type 1 (Table 45) in CTA-861-G [1] ?

display_primaries and white_point is only part of the Static Metadata Descriptor and min_cll is only part of the HDR Static Metadata.
min_cll should be parsed and set in drm_parse_hdr_metadata_block() in next patch or be removed from the struct.

max_display_mastering_luminance and min_display_mastering_luminance from Static Metadata Descriptor Type 1 is also missing in this struct. Why is max_cll and min_cll used for max_display_mastering_luminance and min_display_mastering_luminance in infoframe?

Quoted 8 lines

"frame->length = sizeof(struct hdr_static_metadata);" also needs to be changed in another patch of the patchset.
The Static Metadata Descriptor Type 1 is 26 bytes and is set to 24 bytes using sizeof the above struct.

[1] https://standards.cta.tech/kwspub/published_docs/CTA-861-
G_FINAL_revised_2017.pdf

Thanks Jonas for your feedback. I have created a separate structure for Sink metadata to avoid these issues and fixed all the inputs you have given. Please review the v8.

Regards,
Uma Shankar

Quoted 19 lines

Regards,
Jonas

Quoted 11 lines
include/uapi/drm/drm_mode.h +8 -0
+
+struct hdr_output_metadata {
+	__u32 metadata_type;
+	union {
+		struct hdr_static_metadata hdmi_type1;
+	};
+};
+
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01  #define

DRM_MODE_PAGE_FLIP_ASYNC 0x02 #define
DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

PATCH v7 2/9 drm: Parse HDR metadata info from EDID

In reply to Uma Shankar

HDR metadata block is introduced in CEA-861.3 spec. Parsing the same to get the panel's HDR metadata.

v2: Rebase and added Ville's POC changes to the patch.

v3: No Change

v4: Addressed Shashank's review comments

v5: Addressed Shashank's comment and added his RB.

---
 drivers/gpu/drm/drm_edid.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
drivers/gpu/drm/drm_edid.c +50 -0
index 2c22ea4..ffcca81 100644
@@ -2830,6 +2830,7 @@ static int drm_cvt_modes(struct drm_connector *connector,
 #define VIDEO_BLOCK     0x02
 #define VENDOR_BLOCK    0x03
 #define SPEAKER_BLOCK	0x04
+#define HDR_STATIC_METADATA_BLOCK	0x6
 #define USE_EXTENDED_TAG 0x07
 #define EXT_VIDEO_CAPABILITY_BLOCK 0x00
 #define EXT_VIDEO_DATA_BLOCK_420	0x0E
@@ -3577,6 +3578,12 @@ static int add_3d_struct_modes(struct drm_connector *connector, u16 structure,
 }
 
 static int
+cea_db_payload_len_ext(const u8 *db)
+{
+	return (db[0] & 0x1f) - 1;
+}
+
+static int
 cea_db_extended_tag(const u8 *db)
 {
 	return db[1];
@@ -3812,6 +3819,47 @@ static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
 	mode->clock = clock;
 }
 
+static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)
+{
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != HDR_STATIC_METADATA_BLOCK)
+		return false;
+
+	return true;
+}
+
+static uint8_t eotf_supported(const u8 *edid_ext)
+{
+	return edid_ext[2] &
+		(BIT(HDMI_EOTF_TRADITIONAL_GAMMA_SDR) |
+		 BIT(HDMI_EOTF_TRADITIONAL_GAMMA_HDR) |
+		 BIT(HDMI_EOTF_SMPTE_ST2084));
+}
+
+static uint8_t hdr_metadata_type(const u8 *edid_ext)
+{
+	return edid_ext[3] &
+		BIT(HDMI_STATIC_METADATA_TYPE1);
+}
+
+static void
+drm_parse_hdr_metadata_block(struct drm_connector *connector, const u8 *db)
+{
+	u16 len;
+
+	len = cea_db_payload_len_ext(db);
+	connector->hdr_metadata.hdmi_type1.eotf = eotf_supported(db);
+	connector->hdr_metadata.hdmi_type1.metadata_type =
+					hdr_metadata_type(db);
+
+	if (len >= 4)
+		connector->hdr_metadata.hdmi_type1.max_cll = db[4];
+	if (len >= 5)
+		connector->hdr_metadata.hdmi_type1.max_fall = db[5];
+}
+
 static void
 drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)
 {
@@ -4439,6 +4487,8 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 			drm_parse_y420cmdb_bitmap(connector, db);
 		if (cea_db_is_vcdb(db))
 			drm_parse_vcdb(connector, db);
+		if (cea_db_is_hdmi_hdr_metadata_block(db))
+			drm_parse_hdr_metadata_block(connector, db);
 	}
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

PATCH v7 3/9 drm: Enable HDR infoframe support

In reply to Uma Shankar

Enable Dynamic Range and Mastering Infoframe for HDR content, which is defined in CEA 861.3 spec.

The metadata will be computed based on blending policy in userspace compositors and passed as a connector property blob to driver. The same will be sent as infoframe to panel which support HDR.

Added the const version of infoframe for DRM metadata for HDR.

v2: Rebase and added Ville's POC changes.

v3: No Change

v4: Addressed Shashank's review comments and merged the patch making drm infoframe function arguments as constant.

v5: Rebase

v6: Fixed checkpatch warnings with --strict option. Addressed Shashank's review comments and added his RB.

v7: Addressed Brian Starkey's review comments. Merged 2 patches into one.

---
 drivers/gpu/drm/drm_edid.c |  51 +++++++++++++
 drivers/video/hdmi.c       | 186 +++++++++++++++++++++++++++++++++++++++++++++
 include/drm/drm_edid.h     |   5 ++
 include/linux/hdmi.h       |  27 +++++++
 4 files changed, 269 insertions(+)
drivers/gpu/drm/drm_edid.c +51 -0
index ffcca81..51945f6 100644
@@ -4882,6 +4882,57 @@ static bool is_hdmi2_sink(struct drm_connector *connector)
 }
 
 /**
+ * drm_hdmi_infoframe_set_hdr_metadata() - fill an HDMI AVI infoframe with
+ *                                         HDR metadata from userspace
+ * @frame: HDMI AVI infoframe
+ * @hdr_source_metadata: hdr_source_metadata info from userspace
+ *
+ * Return: 0 on success or a negative error code on failure.
+ */
+int
+drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
+				    struct hdr_output_metadata *hdr_metadata)
+{
+	struct hdr_output_metadata *hdr_output_metadata;
+	int err;
+
+	if (!frame || !hdr_metadata)
+		return true;
+
+	err = hdmi_drm_infoframe_init(frame);
+	if (err < 0)
+		return err;
+
+	DRM_DEBUG_KMS("type = %x\n", frame->type);
+
+	hdr_output_metadata = (struct hdr_output_metadata *)hdr_metadata;
+
+	frame->length = sizeof(struct hdr_static_metadata);
+
+	frame->eotf = hdr_output_metadata->hdmi_type1.eotf;
+	frame->metadata_type = hdr_output_metadata->hdmi_type1.metadata_type;
+
+	memcpy(&frame->display_primaries,
+	       &hdr_output_metadata->hdmi_type1.display_primaries, 12);
+
+	memcpy(&frame->white_point,
+	       &hdr_output_metadata->hdmi_type1.white_point, 4);
+
+	frame->max_mastering_display_luminance =
+		hdr_output_metadata->hdmi_type1.max_cll;
+	frame->min_mastering_display_luminance =
+		hdr_output_metadata->hdmi_type1.min_cll;
+	frame->max_fall = hdr_output_metadata->hdmi_type1.max_fall;
+	frame->max_cll = hdr_output_metadata->hdmi_type1.max_cll;
+
+	hdmi_infoframe_log(KERN_CRIT, NULL,
+			   (union hdmi_infoframe *)frame);
+
+	return 0;
+}
+EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
+
+/**
  * drm_hdmi_avi_infoframe_from_display_mode() - fill an HDMI AVI infoframe with
  *                                              data from a DRM display mode
  * @frame: HDMI AVI infoframe
drivers/video/hdmi.c +186 -0

222 lines not on this page · raw message

include/drm/drm_edid.h +5 -0
index 9d3b5b9..d81c5c2 100644
@@ -25,6 +25,7 @@
 
 #include <linux/types.h>
 #include <linux/hdmi.h>
+#include <drm/drm_mode.h>
 
 struct drm_device;
 struct i2c_adapter;
@@ -370,6 +371,10 @@ int drm_av_sync_delay(struct drm_connector *connector,
 				   const struct drm_display_mode *mode,
 				   enum hdmi_quantization_range rgb_quant_range);
 
+int
+drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
+				    struct hdr_output_metadata *hdr_metadata);
+
 /**
  * drm_eld_mnl - Get ELD monitor name length in bytes.
  * @eld: pointer to an eld memory structure with mnl set
include/linux/hdmi.h +27 -0
index a065194..a23c5e7 100644
@@ -47,6 +47,7 @@ enum hdmi_infoframe_type {
 	HDMI_INFOFRAME_TYPE_AVI = 0x82,
 	HDMI_INFOFRAME_TYPE_SPD = 0x83,
 	HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
+	HDMI_INFOFRAME_TYPE_DRM = 0x87,
 };
 
 #define HDMI_IEEE_OUI 0x000c03
@@ -185,12 +186,37 @@ struct hdmi_avi_infoframe {
 	unsigned short right_bar;
 };
 
+/* DRM Infoframe as per CTA 861.G spec */
+struct hdmi_drm_infoframe {
+	enum hdmi_infoframe_type type;
+	unsigned char version;
+	unsigned char length;
+	enum hdmi_eotf eotf;
+	enum hdmi_metadata_type metadata_type;
+	struct {
+		u16 x, y;
+	} display_primaries[3];
+	struct {
+		u16 x, y;
+	} white_point;
+	u16 max_mastering_display_luminance;
+	u16 min_mastering_display_luminance;
+	u16 max_cll;
+	u16 max_fall;
+};
+
 int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
 ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
 				size_t size);
 ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
 				     void *buffer, size_t size);
 int hdmi_avi_infoframe_check(struct hdmi_avi_infoframe *frame);
+int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame);
+ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
+				size_t size);
+ssize_t hdmi_drm_infoframe_pack_only(const struct hdmi_drm_infoframe *frame,
+				     void *buffer, size_t size);
+int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame);
 
 enum hdmi_spd_sdi {
 	HDMI_SPD_SDI_UNKNOWN,
@@ -365,6 +391,7 @@ ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *fram
 	struct hdmi_spd_infoframe spd;
 	union hdmi_vendor_any_infoframe vendor;
 	struct hdmi_audio_infoframe audio;
+	struct hdmi_drm_infoframe drm;
 };
 
 ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

Re: [v7 3/9] drm: Enable HDR infoframe support

Hi Uma.

Noticed a kerneldoc nit while browsign the code. Maybe try to let kernel doc tell you if there are more.

Sam

Quoted 6 lines

/**
+ * drm_hdmi_infoframe_set_hdr_metadata() - fill an HDMI AVI infoframe with
+ * HDR metadata from userspace
+ * @frame: HDMI AVI infoframe
+ * @hdr_source_metadata: hdr_source_metadata info from userspace

Parameter is named hdr_metadata

Quoted 6 lines

+ *
+ * Return: 0 on success or a negative error code on failure.
+ */

drivers/video/hdmi.c +3 -0
+int
+drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
+				    struct hdr_output_metadata *hdr_metadata)

drivers/video/hdmi.c ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame, · line 686

Quoted 10 lines
drivers/video/hdmi.c +9 -0
+{
 
+
+/**
+ * hdmi_drm_infoframe_check() - check a HDMI DRM infoframe
+ * @frame: HDMI DRM infoframe
+ *
+ * Validates that the infoframe is consistent.
+ * Returns 0 on success or a negative error code on failure.
+ */

Add empty line before "Returns ...", like in other places.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

PATCH v7 4/9 drm/i915: Attach HDR metadata property to connector

In reply to Uma Shankar

Attach HDR metadata property to connector object.

v2: Rebase

v3: Updated the property name as per updated name
while creating hdr metadata property

---
 drivers/gpu/drm/i915/intel_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
index 2676778..88fd952 100644
@@ -2719,6 +2719,8 @@ static void intel_hdmi_destroy(struct drm_connector *connector)
 
 	drm_connector_attach_content_type_property(connector);
 	connector->state->picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE;
+	drm_object_attach_property(&connector->base,
+				   connector->dev->mode_config.hdr_output_metadata_property, 0);
 
 	if (!HAS_GMCH(dev_priv))
 		drm_connector_attach_max_bpc_property(connector, 8, 12);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

PATCH v7 5/9 drm/i915: Write HDR infoframe and send to panel

In reply to Uma Shankar

Enable writing of HDR metadata infoframe to panel. The data will be provid by usersapace compositors, based on blending policies and passsed to driver through a blob property.

v2: Rebase

v3: Fixed a warning message

v4: Addressed Shashank's review comments

v5: Rebase. Added infoframe calculation in compute config.

v6: Addressed Shashank's review comment. Added HDR metadata support from GEN10 onwards as per Shashank's recommendation.

v7: Addressed Shashank's review comments

---
 drivers/gpu/drm/i915/intel_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_hdmi.c | 48 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)
drivers/gpu/drm/i915/intel_drv.h +1 -0
index f8c7b29..53fc608 100644
@@ -1043,6 +1043,7 @@ struct intel_crtc_state {
 		union hdmi_infoframe avi;
 		union hdmi_infoframe spd;
 		union hdmi_infoframe hdmi;
+		union hdmi_infoframe drm;
 	} infoframes;
 
 	/* HDMI scrambling status */
drivers/gpu/drm/i915/intel_hdmi.c +48 -0

72 lines not on this page · raw message

Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#12 lore raw

PATCH v7 6/9 drm/i915: Add HLG EOTF

In reply to Uma Shankar

From: Ville Syrjälä <[email protected]>

ADD HLG EOTF to the list of EOTF transfer functions supported. Hybrid Log-Gamma (HLG) is a high dynamic range (HDR) standard. HLG defines a nonlinear transfer function in which the lower half of the signal values use a gamma curve and the upper half of the signal values use a logarithmic curve.

v2: Rebase

v3: Fixed a warning message

v4: Addressed Shashank's review comments

---
 drivers/gpu/drm/drm_edid.c | 3 ++-
 include/linux/hdmi.h       | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_edid.c +2 -1
index 51945f6..5e393fd 100644
@@ -3835,7 +3835,8 @@ static uint8_t eotf_supported(const u8 *edid_ext)
 	return edid_ext[2] &
 		(BIT(HDMI_EOTF_TRADITIONAL_GAMMA_SDR) |
 		 BIT(HDMI_EOTF_TRADITIONAL_GAMMA_HDR) |
-		 BIT(HDMI_EOTF_SMPTE_ST2084));
+		 BIT(HDMI_EOTF_SMPTE_ST2084) |
+		 BIT(HDMI_EOTF_BT_2100_HLG));
 }
 
 static uint8_t hdr_metadata_type(const u8 *edid_ext)
include/linux/hdmi.h +1 -0
index a23c5e7..bbf14b9 100644
@@ -161,6 +161,7 @@ enum hdmi_eotf {
 	HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
 	HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
 	HDMI_EOTF_SMPTE_ST2084,
+	HDMI_EOTF_BT_2100_HLG,
 };
 
 struct hdmi_avi_infoframe {
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw

PATCH v7 7/9 drm/i915: Enable infoframes on GLK+ for HDR

In reply to Uma Shankar

From: Ville Syrjälä <[email protected]>

This patch enables infoframes on GLK+ to be
used to send HDR metadata to HDMI sink.

v2: Addressed Shashank's review comment.

v3: Addressed Shashank's review comment.

---
 drivers/gpu/drm/i915/i915_reg.h   |  4 ++++
 drivers/gpu/drm/i915/intel_hdmi.c | 22 +++++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 341f03e..820720d 100644
@@ -4728,6 +4728,7 @@ enum {
 #define   VIDEO_DIP_FREQ_MASK		(3 << 16)
 /* HSW and later: */
 #define   DRM_DIP_ENABLE		(1 << 28)
+#define   VIDEO_DIP_ENABLE_DRM_GLK	(1 << 28)
 #define   PSR_VSC_BIT_7_SET		(1 << 27)
 #define   VSC_SELECT_MASK		(0x3 << 25)
 #define   VSC_SELECT_SHIFT		25
@@ -8165,6 +8166,7 @@ enum {
 #define _HSW_VIDEO_DIP_SPD_DATA_A	0x602A0
 #define _HSW_VIDEO_DIP_GMP_DATA_A	0x602E0
 #define _HSW_VIDEO_DIP_VSC_DATA_A	0x60320
+#define _GLK_VIDEO_DIP_DRM_DATA_A	0x60440
 #define _HSW_VIDEO_DIP_AVI_ECC_A	0x60240
 #define _HSW_VIDEO_DIP_VS_ECC_A		0x60280
 #define _HSW_VIDEO_DIP_SPD_ECC_A	0x602C0
@@ -8178,6 +8180,7 @@ enum {
 #define _HSW_VIDEO_DIP_SPD_DATA_B	0x612A0
 #define _HSW_VIDEO_DIP_GMP_DATA_B	0x612E0
 #define _HSW_VIDEO_DIP_VSC_DATA_B	0x61320
+#define _GLK_VIDEO_DIP_DRM_DATA_B	0x61440
 #define _HSW_VIDEO_DIP_BVI_ECC_B	0x61240
 #define _HSW_VIDEO_DIP_VS_ECC_B		0x61280
 #define _HSW_VIDEO_DIP_SPD_ECC_B	0x612C0
@@ -8203,6 +8206,7 @@ enum {
 #define HSW_TVIDEO_DIP_SPD_DATA(trans, i)	_MMIO_TRANS2(trans, _HSW_VIDEO_DIP_SPD_DATA_A + (i) * 4)
 #define HSW_TVIDEO_DIP_GMP_DATA(trans, i)	_MMIO_TRANS2(trans, _HSW_VIDEO_DIP_GMP_DATA_A + (i) * 4)
 #define HSW_TVIDEO_DIP_VSC_DATA(trans, i)	_MMIO_TRANS2(trans, _HSW_VIDEO_DIP_VSC_DATA_A + (i) * 4)
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i)	_MMIO_TRANS2(trans, _GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)
 #define ICL_VIDEO_DIP_PPS_DATA(trans, i)	_MMIO_TRANS2(trans, _ICL_VIDEO_DIP_PPS_DATA_A + (i) * 4)
 #define ICL_VIDEO_DIP_PPS_ECC(trans, i)		_MMIO_TRANS2(trans, _ICL_VIDEO_DIP_PPS_ECC_A + (i) * 4)
 
drivers/gpu/drm/i915/intel_hdmi.c +17 -5
index 8c0698a..9848e68 100644
@@ -134,6 +134,8 @@ static u32 hsw_infoframe_enable(unsigned int type)
 		return VIDEO_DIP_ENABLE_SPD_HSW;
 	case HDMI_INFOFRAME_TYPE_VENDOR:
 		return VIDEO_DIP_ENABLE_VS_HSW;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		return VIDEO_DIP_ENABLE_DRM_GLK;
 	default:
 		MISSING_CASE(type);
 		return 0;
@@ -159,6 +161,8 @@ static u32 hsw_infoframe_enable(unsigned int type)
 		return HSW_TVIDEO_DIP_SPD_DATA(cpu_transcoder, i);
 	case HDMI_INFOFRAME_TYPE_VENDOR:
 		return HSW_TVIDEO_DIP_VS_DATA(cpu_transcoder, i);
+	case HDMI_INFOFRAME_TYPE_DRM:
+		return GLK_TVIDEO_DIP_DRM_DATA(cpu_transcoder, i);
 	default:
 		MISSING_CASE(type);
 		return INVALID_MMIO_REG;
@@ -542,10 +546,16 @@ static u32 hsw_infoframes_enabled(struct intel_encoder *encoder,
 {
 	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
 	u32 val = I915_READ(HSW_TVIDEO_DIP_CTL(pipe_config->cpu_transcoder));
+	u32 mask;
 
-	return val & (VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
-		      VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
-		      VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW);
+	mask = (VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
+		VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
+		VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW);
+
+	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
+		mask |= VIDEO_DIP_ENABLE_DRM_GLK;
+
+	return val & mask;
 }
 
 static const u8 infoframe_type_to_idx[] = {
@@ -1177,7 +1187,8 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
 
 	val &= ~(VIDEO_DIP_ENABLE_VSC_HSW | VIDEO_DIP_ENABLE_AVI_HSW |
 		 VIDEO_DIP_ENABLE_GCP_HSW | VIDEO_DIP_ENABLE_VS_HSW |
-		 VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW);
+		 VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW |
+		 VIDEO_DIP_ENABLE_DRM_GLK);
 
 	if (!enable) {
 		I915_WRITE(reg, val);
@@ -1206,7 +1217,8 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
 	 * ToDo: Gen9 also can support HDR with LSPCON.
 	 * Support for the same to be enabled later.
 	 */
-	if (INTEL_GEN(dev_priv) >= 10) {
+	if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+	    conn_state->hdr_metadata_changed)
 		intel_write_infoframe(encoder, crtc_state,
 				      HDMI_INFOFRAME_TYPE_DRM,
 				      &crtc_state->infoframes.drm);
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#14 lore raw

PATCH v7 8/9 drm/i915:Enabled Modeset when HDR Infoframe changes

In reply to Uma Shankar

This patch enables modeset whenever HDR metadata
needs to be updated to sink.

v2: Addressed Shashank's review comments.

---
 drivers/gpu/drm/i915/intel_atomic.c | 14 +++++++++++++-
 drivers/gpu/drm/i915/intel_hdmi.c   |  9 +++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_atomic.c +13 -1
index b844e88..f2dcc59 100644
@@ -102,6 +102,16 @@ int intel_digital_connector_atomic_set_property(struct drm_connector *connector,
 	return -EINVAL;
 }
 
+static bool blob_equal(const struct drm_property_blob *a,
+		       const struct drm_property_blob *b)
+{
+	if (a && b)
+		return a->length == b->length &&
+			!memcmp(a->data, b->data, a->length);
+
+	return !a == !b;
+}
+
 int intel_digital_connector_atomic_check(struct drm_connector *conn,
 					 struct drm_connector_state *new_state)
 {
@@ -129,7 +139,9 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn,
 	    new_conn_state->base.colorspace != old_conn_state->base.colorspace ||
 	    new_conn_state->base.picture_aspect_ratio != old_conn_state->base.picture_aspect_ratio ||
 	    new_conn_state->base.content_type != old_conn_state->base.content_type ||
-	    new_conn_state->base.scaling_mode != old_conn_state->base.scaling_mode)
+	    new_conn_state->base.scaling_mode != old_conn_state->base.scaling_mode ||
+	    !blob_equal(new_conn_state->base.hdr_output_metadata_blob_ptr,
+			old_conn_state->base.hdr_output_metadata_blob_ptr))
 		crtc_state->mode_changed = true;
 
 	return 0;
drivers/gpu/drm/i915/intel_hdmi.c +9 -0
index 9848e68..64c5b59 100644
@@ -795,11 +795,20 @@ void intel_read_infoframe(struct intel_encoder *encoder,
 {
 	struct hdmi_drm_infoframe *frame = &crtc_state->infoframes.drm.drm;
 	struct hdr_output_metadata *hdr_metadata;
+	struct drm_connector *connector = conn_state->connector;
 	int ret;
 
+	if (!conn_state->hdr_output_metadata_blob_ptr ||
+	    conn_state->hdr_output_metadata_blob_ptr->length == 0)
+		return true;
+
 	hdr_metadata = (struct hdr_output_metadata *)
 			conn_state->hdr_output_metadata_blob_ptr->data;
 
+	if (!(connector->hdr_metadata.hdmi_type1.eotf &
+	    hdr_metadata->hdmi_type1.eotf))
+		return true;
+
 	ret = drm_hdmi_infoframe_set_hdr_metadata(frame, hdr_metadata);
 	if (ret < 0) {
 		DRM_ERROR("couldn't set HDR metadata in infoframe\n");
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#15 lore raw

PATCH v7 9/9 drm/i915: Set Infoframe for non modeset case for HDR

In reply to Uma Shankar

HDR metadata requires a infoframe to be set. Due to fastset, full modeset is not performed hence adding it to update_pipe to handle that.

---
 drivers/gpu/drm/i915/intel_ddi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/i915/intel_ddi.c +13 -0
index 3f1e491..69ddc81 100644
@@ -3536,6 +3536,10 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder,
 				  const struct intel_crtc_state *crtc_state,
 				  const struct drm_connector_state *conn_state)
 {
+	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
+	struct intel_digital_port *intel_dig_port =
+			enc_to_dig_port(&encoder->base);
+
 	if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
 		intel_ddi_update_pipe_dp(encoder, crtc_state, conn_state);
 
@@ -3545,6 +3549,15 @@ static void intel_ddi_update_pipe(struct intel_encoder *encoder,
 	else if (conn_state->content_protection ==
 		 DRM_MODE_CONTENT_PROTECTION_UNDESIRED)
 		intel_hdcp_disable(to_intel_connector(conn_state->connector));
+
+	/* Set the infoframe for NON modeset cases as well */
+	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
+		if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+		    conn_state->hdr_metadata_changed)
+			intel_dig_port->set_infoframes(encoder,
+						       crtc_state->has_infoframe,
+						       crtc_state, conn_state);
+	}
 }
 
 static void intel_ddi_set_fia_lane_count(struct intel_encoder *encoder,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw

✗ Fi.CI.BAT: failure for Add HDR Metadata Parsing and handling in DRM layer (rev7)

In reply to Uma Shankar
== Series Details ==

== Series Details ==

Series: Add HDR Metadata Parsing and handling in DRM layer (rev7)
URL : https://patchwork.freedesktop.org/series/25091/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_5856 -> Patchwork_12659
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_12659 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12659, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

External URL: https://patchwork.freedesktop.org/api/1.0/series/25091/revisions/7/mbox/

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in Patchwork_12659:

### IGT changes ###

#### Possible regressions ####

* igt@runner@aborted:

    - fi-byt-j1900:       NOTRUN -> FAIL
    - fi-bsw-n3050:       NOTRUN -> FAIL
    - fi-byt-n2820:       NOTRUN -> FAIL
    - fi-elk-e7500:       NOTRUN -> FAIL

Known issues
------------

Here are the changes found in Patchwork_12659 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@amdgpu/amd_cs_nop@fork-compute0:
- fi-icl-y: NOTRUN -> SKIP [fdo#109315] +17

* igt@amdgpu/amd_cs_nop@fork-gfx0:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109315] +17

* igt@gem_exec_basic@basic-bsd2:
- fi-kbl-7500u: NOTRUN -> SKIP [fdo#109271] +9
- fi-icl-y: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_basic@readonly-bsd1:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109276] +7

* igt@gem_exec_parse@basic-allowed:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109289] +1

* igt@gem_exec_parse@basic-rejected:
- fi-icl-y: NOTRUN -> SKIP [fdo#109289] +1

* igt@i915_module_load@reload:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]

* igt@i915_selftest@live_contexts:
- fi-icl-u2: NOTRUN -> DMESG-FAIL [fdo#108569]
- fi-icl-y: NOTRUN -> DMESG-FAIL [fdo#108569]

* igt@i915_selftest@live_execlists:
- fi-apl-guc: NOTRUN -> INCOMPLETE [fdo#103927] / [fdo#109720]

* igt@i915_selftest@live_uncore:
- fi-ivb-3770: PASS -> DMESG-FAIL [fdo#110210]

* igt@kms_chamelium@dp-crc-fast:
- fi-kbl-7500u: NOTRUN -> DMESG-WARN [fdo#103841]
- fi-icl-y: NOTRUN -> SKIP [fdo#109284] +8

* igt@kms_chamelium@dp-edid-read:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109316] +2

* igt@kms_chamelium@vga-hpd-fast:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109309] +1

* igt@kms_force_connector_basic@force-load-detect:
- fi-icl-y: NOTRUN -> SKIP [fdo#109285] +3

* igt@kms_force_connector_basic@prune-stale-modes:
- fi-icl-u2: NOTRUN -> SKIP [fdo#109285] +3

* igt@kms_frontbuffer_tracking@basic:
- fi-icl-u2: NOTRUN -> FAIL [fdo#103167]

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#107362]

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +2

* igt@kms_psr@primary_mmap_gtt:
- fi-icl-y: NOTRUN -> SKIP [fdo#110189] +3

* igt@kms_psr@primary_page_flip:
- fi-apl-guc: NOTRUN -> SKIP [fdo#109271] +50

* igt@prime_vgem@basic-fence-flip:
- fi-icl-y: NOTRUN -> SKIP [fdo#109294]

* igt@runner@aborted:
- fi-kbl-7500u: NOTRUN -> FAIL [fdo#103841]
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]

#### Possible fixes ####

* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: DMESG-FAIL [fdo#110235 ] -> PASS
- fi-skl-gvtdvm: DMESG-FAIL [fdo#110235 ] -> PASS

* igt@i915_selftest@live_uncore:
- fi-skl-gvtdvm: DMESG-FAIL [fdo#110210] -> PASS

* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b:
- fi-byt-clapper: FAIL [fdo#107362] -> PASS

* igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS

#### Warnings ####

* igt@i915_selftest@live_contexts:
- fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569]

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103841]: https://bugs.freedesktop.org/show_bug.cgi?id=103841
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
[fdo#109294]: https://bugs.freedesktop.org/show_bug.cgi?id=109294
[fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#109316]: https://bugs.freedesktop.org/show_bug.cgi?id=109316
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
[fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
[fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210
[fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235

Participating hosts (43 -> 41)
------------------------------

Additional (4): fi-icl-y fi-icl-u2 fi-apl-guc fi-kbl-7500u
Missing (6): fi-hsw-4770r fi-ilk-m540 fi-byt-squawks fi-skl-6260u fi-bdw-samus fi-snb-2600

Build changes
-------------

* Linux: CI_DRM_5856 -> Patchwork_12659

CI_DRM_5856: 55074bd825098a71779cf65a69786547f0eccbe9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4922: e941e4a29438c7130554492e4daf52afbc99ffdf @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12659: 5e363bfa6d9c9f159e83491d5e7a2d42af36ab50 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

5e363bfa6d9c drm/i915: Set Infoframe for non modeset case for HDR 53f4085ffd6d drm/i915:Enabled Modeset when HDR Infoframe changes 5fb019cb6417 drm/i915: Enable infoframes on GLK+ for HDR 481385d9fb84 drm/i915: Add HLG EOTF
cccc437647c3 drm/i915: Write HDR infoframe and send to panel be02643ba319 drm/i915: Attach HDR metadata property to connector 5613a94ff569 drm: Enable HDR infoframe support a74478938abf drm: Parse HDR metadata info from EDID 2d47c2744ec3 drm: Add HDR source metadata property

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12659/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on the v7 series
#17 lore raw
In reply to Uma Shankar

Hello Uma,

V7 looks good to me, please feel free to use for the whole series:

Regards

Shashank

Quoted 57 lines · Uma Shankar

This patch series enables HDR support in drm. It basically defines HDR metadata structures, property to pass content (after blending) metadata from user space compositors to driver.

Dynamic Range and Mastering infoframe creation and sending.

ToDo:
1. We need to get the color framework in place for all planes which support HDR content in hardware. This is already in progres and patches are out for review in mailing list.
2. UserSpace/Compositors: Blending policies and metadata blob creation and passing to driver. Work is already in progress by Intel's middleware teams on wayland and the patches for the same are in review.

Please review and share your feedbacks/suggestions.

Note: The intention for these patches is to get a design feedback on the uapi changes, generic property design and infoframe handling. This cannot get merged as of now without the userspace support in place.

A POC has already been developed by Ville based on wayland. Please refer below link to see the component interactions and usage:
https://lists.freedesktop.org/archives/wayland-devel/2017-December/036403.html

v2: Updated Ville's POC changes to the patch series.Incorporated cleanups and fixes from Ville. Rebase on latest drm-tip.

v3: Fixed a warning causing builds to break on CI. No major change.

v4: Addressed Shashank's review comments.

v5: Rebase on top of Ville's infoframe refactoring changes. Fixed non modeset case for HDR metadata update. Dropped a redundant patch.

v6: Addressed Shashank's review comments and added RB's received.

v7: Squashed 2 patches, dropped 1 change and addressed Brian Starkey's and Shashank's review comments.

Note: Media driver and VAAPI changes for HDR are already out, with compositors changes also expected to land soon. Weston changes already floated and reviews started in community and is in active development along with GL efforts.

Uma Shankar (7):
drm: Add HDR source metadata property
drm: Parse HDR metadata info from EDID
drm: Enable HDR infoframe support
drm/i915: Attach HDR metadata property to connector drm/i915: Write HDR infoframe and send to panel drm/i915:Enabled Modeset when HDR Infoframe changes drm/i915: Set Infoframe for non modeset case for HDR

Ville Syrjälä (2):
drm/i915: Add HLG EOTF
drm/i915: Enable infoframes on GLK+ for HDR

Quoted 17 lines
  drivers/gpu/drm/drm_atomic.c        |   2 +
  drivers/gpu/drm/drm_atomic_uapi.c   |  13 +++
  drivers/gpu/drm/drm_connector.c     |   6 ++
  drivers/gpu/drm/drm_edid.c          | 102 ++++++++++++++++++++
  drivers/gpu/drm/i915/i915_reg.h     |   4 +
  drivers/gpu/drm/i915/intel_atomic.c |  14 ++-
  drivers/gpu/drm/i915/intel_ddi.c    |  13 +++
  drivers/gpu/drm/i915/intel_drv.h    |   1 +
  drivers/gpu/drm/i915/intel_hdmi.c   |  79 ++++++++++++++-
  drivers/video/hdmi.c                | 186 ++++++++++++++++++++++++++++++++++++
  include/drm/drm_connector.h         |  10 ++
  include/drm/drm_edid.h              |   5 +
  include/drm/drm_mode_config.h       |   6 ++
  include/linux/hdmi.h                |  38 ++++++++
  include/uapi/drm/drm_mode.h         |  22 +++++
  15 files changed, 496 insertions(+), 5 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel