Skip to contentSkip to conversation

Add HDR Metadata Parsing and handling in DRM layer

PATCH Superseded Uma Shankar 4 participants 35 messages Mar 11, 2019 – Mar 20, 2019

Subsystems (4)

v5 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v5 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 we should be getting the initial version pretty soon for 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.

Note: Media driver and VAAPI changes for HDR are already out, with compositors changes also expected to land soon. Some discussions have already started with initial design on weston in community and is in active development along with GL efforts.

Uma Shankar (10):
drm: Add HDR source metadata property
drm: Parse HDR metadata info from EDID
drm: Parse Colorimetry data block from EDID
drm/i915: Attach HDR metadata property to connector
drm: Implement HDR output metadata set and get property handling
drm: Enable HDR infoframe support
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 video/hdmi: Add const variants for drm infoframe

Ville Syrjälä (3):
drm/i915: [DO NOT MERGE] hack for glk board outputs 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          | 136 ++++++++++++++++++++++++++
 drivers/gpu/drm/i915/i915_reg.h     |   4 +
 drivers/gpu/drm/i915/intel_atomic.c |  15 ++-
 drivers/gpu/drm/i915/intel_bios.c   |   7 ++
 drivers/gpu/drm/i915/intel_ddi.c    |   9 ++
 drivers/gpu/drm/i915/intel_drv.h    |   1 +
 drivers/gpu/drm/i915/intel_hdmi.c   |  51 +++++++++-
 drivers/video/hdmi.c                | 188 ++++++++++++++++++++++++++++++++++++
 include/drm/drm_connector.h         |  13 +++
 include/drm/drm_edid.h              |   4 +
 include/drm/drm_mode_config.h       |   6 ++
 include/linux/hdmi.h                |  38 ++++++++
 include/uapi/drm/drm_mode.h         |  16 +++
 16 files changed, 506 insertions(+), 3 deletions(-)
Signature · 6 lines
1.9.1

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

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

== Series Details ==

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
b2d03105049d drm: Add HDR source metadata property
fe440823e535 drm: Parse HDR metadata info from EDID
-:59: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#59: FILE: drivers/gpu/drm/drm_edid.c:3839:
+{
+

-:65: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #65: FILE: drivers/gpu/drm/drm_edid.c:3845:
+
+}

-:69: CHECK:BRACES: Blank lines aren't necessary after an open brace '{' #69: FILE: drivers/gpu/drm/drm_edid.c:3849:
+{
+

-:77: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #77: FILE: drivers/gpu/drm/drm_edid.c:3857:
+ uint16_t len;

total: 0 errors, 0 warnings, 4 checks, 76 lines checked 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID -:51: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #51: FILE: drivers/gpu/drm/drm_edid.c:3842:
+ uint16_t len;

-:58: CHECK:LINE_SPACING: Please don't use multiple blank lines #58: FILE: drivers/gpu/drm/drm_edid.c:3849:
+
+

total: 0 errors, 0 warnings, 2 checks, 53 lines checked aa78bb330fcc drm/i915: Attach HDR metadata property to connector -:24: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #24: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2723:
+ drm_object_attach_property(&connector->base,
+ connector->dev->mode_config.hdr_output_metadata_property, 0);

total: 0 errors, 0 warnings, 1 checks, 8 lines checked 98de918105db drm: Implement HDR output metadata set and get property handling -:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #52: FILE: drivers/gpu/drm/drm_atomic_uapi.c:741:
+ ret = drm_atomic_replace_property_blob_from_id(dev,
+ &state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 39 lines checked 149de61e2c39 drm: Enable HDR infoframe support
-:65: CHECK:LINE_SPACING: Please don't use multiple blank lines #65: FILE: drivers/gpu/drm/drm_edid.c:4944:
+
+

-:94: CHECK:LINE_SPACING: Please don't use multiple blank lines #94: FILE: drivers/gpu/drm/drm_edid.c:4973:
+
+

-:232: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #232: FILE: drivers/video/hdmi.c:1392:
+ hdmi_infoframe_log_header(level, dev,
+ (struct hdmi_any_infoframe *)frame);

-:245: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #245: FILE: drivers/video/hdmi.c:1405:
+ hdmi_log("max_mastering_display_luminance: %d\n",
+ frame->max_mastering_display_luminance);

-:247: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #247: FILE: drivers/video/hdmi.c:1407:
+ hdmi_log("min_mastering_display_luminance: %d\n",
+ frame->min_mastering_display_luminance);

-:304: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #304: FILE: include/linux/hdmi.h:196:
+ uint16_t x, y;

-:307: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #307: FILE: include/linux/hdmi.h:199:
+ uint16_t x, y;

-:309: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #309: FILE: include/linux/hdmi.h:201:
+ uint16_t max_mastering_display_luminance;

-:310: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #310: FILE: include/linux/hdmi.h:202:
+ uint16_t min_mastering_display_luminance;

-:311: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #311: FILE: include/linux/hdmi.h:203:
+ uint16_t max_fall;

-:312: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #312: FILE: include/linux/hdmi.h:204:
+ uint16_t max_cll;

-:313: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #313: FILE: include/linux/hdmi.h:205:
+ uint16_t min_cll;

total: 0 errors, 0 warnings, 12 checks, 279 lines checked c65e9f436e86 drm/i915: Write HDR infoframe and send to panel -:51: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #51: FILE: drivers/gpu/drm/i915/intel_hdmi.c:783:
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+ struct intel_crtc_state *crtc_state,

total: 0 errors, 0 warnings, 1 checks, 64 lines checked dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs 96858c0b173a drm/i915: Add HLG EOTF
2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR -:49: WARNING:LONG_LINE: line over 100 characters
#49: FILE: drivers/gpu/drm/i915/i915_reg.h:8155:
+#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, 76 lines checked b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes -:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #57: FILE: drivers/gpu/drm/i915/intel_hdmi.c:796:
+ if (!conn_state->hdr_output_metadata_blob_ptr ||
+ conn_state->hdr_output_metadata_blob_ptr->length == 0)

total: 0 errors, 0 warnings, 1 checks, 37 lines checked 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR -:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #35: FILE: drivers/gpu/drm/i915/intel_ddi.c:3586:
+ if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+ conn_state->hdr_metadata_changed)

total: 0 errors, 0 warnings, 1 checks, 25 lines checked 2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe

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

maintainer
#2 lore raw

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

Quoted 117 lines · Patchwork

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
b2d03105049d drm: Add HDR source metadata property
fe440823e535 drm: Parse HDR metadata info from EDID
-:59: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#59: FILE: drivers/gpu/drm/drm_edid.c:3839:
(quoted diff) +2 -1
+{
+
 
-:65: CHECK:BRACES: Blank lines aren't necessary before a close brace '}'

#65: FILE: drivers/gpu/drm/drm_edid.c:3845:

(quoted diff) +2 -1
+
+}
 
-:69: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

#69: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -1
+{
+
 
-:77: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#77: FILE: drivers/gpu/drm/drm_edid.c:3857:

(quoted diff) +1 -0
+	uint16_t len;

total: 0 errors, 0 warnings, 4 checks, 76 lines checked 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID -:51: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #51: FILE: drivers/gpu/drm/drm_edid.c:3842:

(quoted diff) +1 -1
+	uint16_t len;
 
-:58: CHECK:LINE_SPACING: Please don't use multiple blank lines

#58: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -0
+
+

total: 0 errors, 0 warnings, 2 checks, 53 lines checked aa78bb330fcc drm/i915: Attach HDR metadata property to connector -:24: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #24: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2723:

(quoted diff) +2 -0
+	drm_object_attach_property(&connector->base,
+		connector->dev->mode_config.hdr_output_metadata_property, 0);

total: 0 errors, 0 warnings, 1 checks, 8 lines checked 98de918105db drm: Implement HDR output metadata set and get property handling -:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #52: FILE: drivers/gpu/drm/drm_atomic_uapi.c:741:

(quoted diff) +2 -0
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 39 lines checked 149de61e2c39 drm: Enable HDR infoframe support
-:65: CHECK:LINE_SPACING: Please don't use multiple blank lines #65: FILE: drivers/gpu/drm/drm_edid.c:4944:

(quoted diff) +2 -1
+
+
 
-:94: CHECK:LINE_SPACING: Please don't use multiple blank lines

#94: FILE: drivers/gpu/drm/drm_edid.c:4973:

(quoted diff) +2 -1
+
+
 
-:232: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

#232: FILE: drivers/video/hdmi.c:1392:

(quoted diff) +2 -1
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);
 
-:245: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

#245: FILE: drivers/video/hdmi.c:1405:

(quoted diff) +2 -1
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
 
-:247: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis

#247: FILE: drivers/video/hdmi.c:1407:

(quoted diff) +2 -1
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);
 
-:304: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#304: FILE: include/linux/hdmi.h:196:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:307: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#307: FILE: include/linux/hdmi.h:199:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:309: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#309: FILE: include/linux/hdmi.h:201:

(quoted diff) +1 -1
+	uint16_t max_mastering_display_luminance;
 
-:310: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#310: FILE: include/linux/hdmi.h:202:

(quoted diff) +1 -1
+	uint16_t min_mastering_display_luminance;
 
-:311: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#311: FILE: include/linux/hdmi.h:203:

(quoted diff) +1 -1
+	uint16_t max_fall;
 
-:312: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#312: FILE: include/linux/hdmi.h:204:

(quoted diff) +1 -1
+	uint16_t max_cll;
 
-:313: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#313: FILE: include/linux/hdmi.h:205:

(quoted diff) +1 -0
+	uint16_t min_cll;

total: 0 errors, 0 warnings, 12 checks, 279 lines checked c65e9f436e86 drm/i915: Write HDR infoframe and send to panel -:51: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #51: FILE: drivers/gpu/drm/i915/intel_hdmi.c:783:

(quoted diff) +2 -0
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 64 lines checked dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs 96858c0b173a drm/i915: Add HLG EOTF
2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR -:49: WARNING:LONG_LINE: line over 100 characters
#49: FILE: drivers/gpu/drm/i915/i915_reg.h:8155:
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i) _MMIO_TRANS2(trans, _GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)

I think all of the warnings except this one are valid.

BR,
Jani.

Quoted 22 lines

total: 0 errors, 1 warnings, 0 checks, 76 lines checked b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes -:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #57: FILE: drivers/gpu/drm/i915/intel_hdmi.c:796:

(quoted diff) +2 -0
+	if (!conn_state->hdr_output_metadata_blob_ptr ||
+		conn_state->hdr_output_metadata_blob_ptr->length == 0)

total: 0 errors, 0 warnings, 1 checks, 37 lines checked 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR -:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #35: FILE: drivers/gpu/drm/i915/intel_ddi.c:3586:

(quoted diff) +2 -0
+		if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+			conn_state->hdr_metadata_changed)

total: 0 errors, 0 warnings, 1 checks, 25 lines checked 2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe

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

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

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

Quoted 144 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, March 11, 2019 7:25 PM
To: Patchwork <[email protected]>; Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add HDR Metadata Parsing and handling in DRM layer (rev5)

Quoted 123 lines · Patchwork

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
b2d03105049d drm: Add HDR source metadata property
fe440823e535 drm: Parse HDR metadata info from EDID
-:59: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#59: FILE: drivers/gpu/drm/drm_edid.c:3839:
(quoted diff) +2 -1
+{
+
 
-:65: CHECK:BRACES: Blank lines aren't necessary before a close brace '}'

#65: FILE: drivers/gpu/drm/drm_edid.c:3845:

(quoted diff) +2 -1
+
+}
 
-:69: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

#69: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -1
+{
+
 
-:77: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#77: FILE: drivers/gpu/drm/drm_edid.c:3857:

(quoted diff) +1 -0
+	uint16_t len;

total: 0 errors, 0 warnings, 4 checks, 76 lines checked 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID -:51: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #51: FILE: drivers/gpu/drm/drm_edid.c:3842:

(quoted diff) +1 -1
+	uint16_t len;
 
-:58: CHECK:LINE_SPACING: Please don't use multiple blank lines

#58: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -0
+
+

total: 0 errors, 0 warnings, 2 checks, 53 lines checked aa78bb330fcc drm/i915: Attach HDR metadata property to connector
-:24: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#24: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2723:

(quoted diff) +2 -0
+	drm_object_attach_property(&connector->base,
+		connector->dev->mode_config.hdr_output_metadata_property, 0);

total: 0 errors, 0 warnings, 1 checks, 8 lines checked 98de918105db
drm: Implement HDR output metadata set and get property handling -:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#52: FILE: drivers/gpu/drm/drm_atomic_uapi.c:741:

(quoted diff) +2 -0
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 39 lines checked 149de61e2c39 drm: Enable HDR infoframe support
-:65: CHECK:LINE_SPACING: Please don't use multiple blank lines #65: FILE: drivers/gpu/drm/drm_edid.c:4944:

(quoted diff) +2 -1
+
+
 
-:94: CHECK:LINE_SPACING: Please don't use multiple blank lines

#94: FILE: drivers/gpu/drm/drm_edid.c:4973:

(quoted diff) +2 -1
+
+
 
-:232: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#232: FILE: drivers/video/hdmi.c:1392:

(quoted diff) +2 -1
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);
 
-:245: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#245: FILE: drivers/video/hdmi.c:1405:

(quoted diff) +2 -1
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
 
-:247: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#247: FILE: drivers/video/hdmi.c:1407:

(quoted diff) +2 -1
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);
 
-:304: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#304: FILE: include/linux/hdmi.h:196:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:307: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#307: FILE: include/linux/hdmi.h:199:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:309: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#309: FILE: include/linux/hdmi.h:201:

(quoted diff) +1 -1
+	uint16_t max_mastering_display_luminance;
 
-:310: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#310: FILE: include/linux/hdmi.h:202:

(quoted diff) +1 -1
+	uint16_t min_mastering_display_luminance;
 
-:311: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#311: FILE: include/linux/hdmi.h:203:

(quoted diff) +1 -1
+	uint16_t max_fall;
 
-:312: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#312: FILE: include/linux/hdmi.h:204:

(quoted diff) +1 -1
+	uint16_t max_cll;
 
-:313: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#313: FILE: include/linux/hdmi.h:205:

(quoted diff) +1 -0
+	uint16_t min_cll;

total: 0 errors, 0 warnings, 12 checks, 279 lines checked c65e9f436e86 drm/i915: Write HDR infoframe and send to panel -:51: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#51: FILE: drivers/gpu/drm/i915/intel_hdmi.c:783:

(quoted diff) +2 -0
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 64 lines checked dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs 96858c0b173a drm/i915: Add HLG EOTF
2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR -:49: WARNING:LONG_LINE: line over 100 characters
#49: FILE: drivers/gpu/drm/i915/i915_reg.h:8155:
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i) _MMIO_TRANS2(trans,

_GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)

Quoted 1 line

I think all of the warnings except this one are valid.

Yes Jani, The local patchwork (which comes default with scripts in kernel) didn't had the issues. So local checkpatch scan looked clean.

Will fix these in next version.

Thanks & Regards,
Uma Shankar

Quoted 23 lines

BR,
Jani.

Quoted 20 lines

total: 0 errors, 1 warnings, 0 checks, 76 lines checked b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes
-:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#57: FILE: drivers/gpu/drm/i915/intel_hdmi.c:796:

(quoted diff) +2 -0
+	if (!conn_state->hdr_output_metadata_blob_ptr ||
+		conn_state->hdr_output_metadata_blob_ptr->length == 0)

total: 0 errors, 0 warnings, 1 checks, 37 lines checked 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR -:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#35: FILE: drivers/gpu/drm/i915/intel_ddi.c:3586:

(quoted diff) +2 -0
+		if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+			conn_state->hdr_metadata_changed)

total: 0 errors, 0 warnings, 1 checks, 25 lines checked 2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe

Quoted 7 lines
Quoted 4 lines

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

--
Jani Nikula, Intel Open Source Graphics Center

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

maintainer
#4 lore raw

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

Quoted 142 lines · Uma
Quoted 142 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, March 11, 2019 7:25 PM
To: Patchwork <[email protected]>; Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add HDR Metadata Parsing and handling in DRM layer (rev5)

Quoted 123 lines · Patchwork

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
b2d03105049d drm: Add HDR source metadata property
fe440823e535 drm: Parse HDR metadata info from EDID
-:59: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#59: FILE: drivers/gpu/drm/drm_edid.c:3839:
(quoted diff) +2 -1
+{
+
 
-:65: CHECK:BRACES: Blank lines aren't necessary before a close brace '}'

#65: FILE: drivers/gpu/drm/drm_edid.c:3845:

(quoted diff) +2 -1
+
+}
 
-:69: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

#69: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -1
+{
+
 
-:77: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#77: FILE: drivers/gpu/drm/drm_edid.c:3857:

(quoted diff) +1 -0
+	uint16_t len;

total: 0 errors, 0 warnings, 4 checks, 76 lines checked 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID -:51: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #51: FILE: drivers/gpu/drm/drm_edid.c:3842:

(quoted diff) +1 -1
+	uint16_t len;
 
-:58: CHECK:LINE_SPACING: Please don't use multiple blank lines

#58: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -0
+
+

total: 0 errors, 0 warnings, 2 checks, 53 lines checked aa78bb330fcc drm/i915: Attach HDR metadata property to connector
-:24: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#24: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2723:

(quoted diff) +2 -0
+	drm_object_attach_property(&connector->base,
+		connector->dev->mode_config.hdr_output_metadata_property, 0);

total: 0 errors, 0 warnings, 1 checks, 8 lines checked 98de918105db
drm: Implement HDR output metadata set and get property handling -:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#52: FILE: drivers/gpu/drm/drm_atomic_uapi.c:741:

(quoted diff) +2 -0
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 39 lines checked 149de61e2c39 drm: Enable HDR infoframe support
-:65: CHECK:LINE_SPACING: Please don't use multiple blank lines #65: FILE: drivers/gpu/drm/drm_edid.c:4944:

(quoted diff) +2 -1
+
+
 
-:94: CHECK:LINE_SPACING: Please don't use multiple blank lines

#94: FILE: drivers/gpu/drm/drm_edid.c:4973:

(quoted diff) +2 -1
+
+
 
-:232: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#232: FILE: drivers/video/hdmi.c:1392:

(quoted diff) +2 -1
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);
 
-:245: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#245: FILE: drivers/video/hdmi.c:1405:

(quoted diff) +2 -1
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
 
-:247: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#247: FILE: drivers/video/hdmi.c:1407:

(quoted diff) +2 -1
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);
 
-:304: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#304: FILE: include/linux/hdmi.h:196:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:307: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#307: FILE: include/linux/hdmi.h:199:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:309: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#309: FILE: include/linux/hdmi.h:201:

(quoted diff) +1 -1
+	uint16_t max_mastering_display_luminance;
 
-:310: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#310: FILE: include/linux/hdmi.h:202:

(quoted diff) +1 -1
+	uint16_t min_mastering_display_luminance;
 
-:311: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#311: FILE: include/linux/hdmi.h:203:

(quoted diff) +1 -1
+	uint16_t max_fall;
 
-:312: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#312: FILE: include/linux/hdmi.h:204:

(quoted diff) +1 -1
+	uint16_t max_cll;
 
-:313: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#313: FILE: include/linux/hdmi.h:205:

(quoted diff) +1 -0
+	uint16_t min_cll;

total: 0 errors, 0 warnings, 12 checks, 279 lines checked c65e9f436e86 drm/i915: Write HDR infoframe and send to panel -:51: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#51: FILE: drivers/gpu/drm/i915/intel_hdmi.c:783:

(quoted diff) +2 -0
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 64 lines checked dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs 96858c0b173a drm/i915: Add HLG EOTF
2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR -:49: WARNING:LONG_LINE: line over 100 characters
#49: FILE: drivers/gpu/drm/i915/i915_reg.h:8155:
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i) _MMIO_TRANS2(trans,

_GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)

Quoted 4 lines
Quoted 1 line

I think all of the warnings except this one are valid.

Yes Jani, The local patchwork (which comes default with scripts in kernel) didn't had the issues. So local checkpatch scan looked clean.

You'll need to pass in the --strict option to checkpatch.pl for some of the checks.

BR,
Jani.

Quoted 36 lines

Will fix these in next version.

Thanks & Regards,
Uma Shankar

Quoted 30 lines

BR,
Jani.

Quoted 17 lines

total: 0 errors, 1 warnings, 0 checks, 76 lines checked b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes
-:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#57: FILE: drivers/gpu/drm/i915/intel_hdmi.c:796:

(quoted diff) +2 -0
+	if (!conn_state->hdr_output_metadata_blob_ptr ||
+		conn_state->hdr_output_metadata_blob_ptr->length == 0)

total: 0 errors, 0 warnings, 1 checks, 37 lines checked 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR -:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#35: FILE: drivers/gpu/drm/i915/intel_ddi.c:3586:

(quoted diff) +2 -0
+		if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+			conn_state->hdr_metadata_changed)
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 25 lines checked 2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe

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

--
Jani Nikula, Intel Open Source Graphics Center

Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

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

Quoted 154 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, March 11, 2019 7:42 PM
To: Shankar, Uma <[email protected]>; Patchwork <[email protected]>
Cc: [email protected]
Subject: RE: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add HDR Metadata Parsing and handling in DRM layer (rev5)

Quoted 142 lines · Uma
Quoted 142 lines

-----Original Message-----
From: Jani Nikula [mailto:[email protected]]
Sent: Monday, March 11, 2019 7:25 PM
To: Patchwork <[email protected]>; Shankar, Uma <[email protected]>
Cc: [email protected]
Subject: Re: [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add HDR Metadata Parsing and handling in DRM layer (rev5)

Quoted 123 lines · Patchwork

== Series Details ==

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

== Summary ==

$ dim checkpatch origin/drm-tip
b2d03105049d drm: Add HDR source metadata property
fe440823e535 drm: Parse HDR metadata info from EDID
-:59: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'
#59: FILE: drivers/gpu/drm/drm_edid.c:3839:
(quoted diff) +2 -1
+{
+
 
-:65: CHECK:BRACES: Blank lines aren't necessary before a close brace '}'

#65: FILE: drivers/gpu/drm/drm_edid.c:3845:

(quoted diff) +2 -1
+
+}
 
-:69: CHECK:BRACES: Blank lines aren't necessary after an open brace '{'

#69: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -1
+{
+
 
-:77: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#77: FILE: drivers/gpu/drm/drm_edid.c:3857:

(quoted diff) +1 -0
+	uint16_t len;

total: 0 errors, 0 warnings, 4 checks, 76 lines checked 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID -:51: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t' #51: FILE: drivers/gpu/drm/drm_edid.c:3842:

(quoted diff) +1 -1
+	uint16_t len;
 
-:58: CHECK:LINE_SPACING: Please don't use multiple blank lines

#58: FILE: drivers/gpu/drm/drm_edid.c:3849:

(quoted diff) +2 -0
+
+

total: 0 errors, 0 warnings, 2 checks, 53 lines checked aa78bb330fcc drm/i915: Attach HDR metadata property to connector
-:24: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#24: FILE: drivers/gpu/drm/i915/intel_hdmi.c:2723:

(quoted diff) +2 -0
+	drm_object_attach_property(&connector->base,
+		connector->dev->mode_config.hdr_output_metadata_property, 0);

total: 0 errors, 0 warnings, 1 checks, 8 lines checked 98de918105db
drm: Implement HDR output metadata set and get property handling -:52: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#52: FILE: drivers/gpu/drm/drm_atomic_uapi.c:741:

(quoted diff) +2 -0
+		ret = drm_atomic_replace_property_blob_from_id(dev,
+				&state->hdr_output_metadata_blob_ptr,

total: 0 errors, 0 warnings, 1 checks, 39 lines checked 149de61e2c39 drm: Enable HDR infoframe support
-:65: CHECK:LINE_SPACING: Please don't use multiple blank lines #65: FILE: drivers/gpu/drm/drm_edid.c:4944:

(quoted diff) +2 -1
+
+
 
-:94: CHECK:LINE_SPACING: Please don't use multiple blank lines

#94: FILE: drivers/gpu/drm/drm_edid.c:4973:

(quoted diff) +2 -1
+
+
 
-:232: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#232: FILE: drivers/video/hdmi.c:1392:

(quoted diff) +2 -1
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);
 
-:245: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#245: FILE: drivers/video/hdmi.c:1405:

(quoted diff) +2 -1
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
 
-:247: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open

parenthesis
#247: FILE: drivers/video/hdmi.c:1407:

(quoted diff) +2 -1
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);
 
-:304: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#304: FILE: include/linux/hdmi.h:196:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:307: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#307: FILE: include/linux/hdmi.h:199:

(quoted diff) +1 -1
+		uint16_t x, y;
 
-:309: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#309: FILE: include/linux/hdmi.h:201:

(quoted diff) +1 -1
+	uint16_t max_mastering_display_luminance;
 
-:310: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#310: FILE: include/linux/hdmi.h:202:

(quoted diff) +1 -1
+	uint16_t min_mastering_display_luminance;
 
-:311: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#311: FILE: include/linux/hdmi.h:203:

(quoted diff) +1 -1
+	uint16_t max_fall;
 
-:312: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#312: FILE: include/linux/hdmi.h:204:

(quoted diff) +1 -1
+	uint16_t max_cll;
 
-:313: CHECK:PREFER_KERNEL_TYPES: Prefer kernel type 'u16' over 'uint16_t'

#313: FILE: include/linux/hdmi.h:205:

(quoted diff) +1 -0
+	uint16_t min_cll;

total: 0 errors, 0 warnings, 12 checks, 279 lines checked c65e9f436e86 drm/i915: Write HDR infoframe and send to panel -:51: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#51: FILE: drivers/gpu/drm/i915/intel_hdmi.c:783:

(quoted diff) +2 -0
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 64 lines checked dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs 96858c0b173a drm/i915: Add HLG EOTF
2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR -:49: WARNING:LONG_LINE: line over 100 characters
#49: FILE: drivers/gpu/drm/i915/i915_reg.h:8155:
+#define GLK_TVIDEO_DIP_DRM_DATA(trans, i) _MMIO_TRANS2(trans,

_GLK_VIDEO_DIP_DRM_DATA_A + (i) * 4)

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

I think all of the warnings except this one are valid.

Yes Jani, The local patchwork (which comes default with scripts in kernel) didn't had the issues. So local checkpatch scan looked clean.

You'll need to pass in the --strict option to checkpatch.pl for some of the checks.

Sure, this indeed is highlighting the errors. Thanks Jani, will always check with --strict in future.

Regards,
Uma Shankar

Quoted 41 lines

BR,
Jani.

Quoted 36 lines

Will fix these in next version.

Thanks & Regards,
Uma Shankar

Quoted 30 lines

BR,
Jani.

Quoted 17 lines

total: 0 errors, 1 warnings, 0 checks, 76 lines checked b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes
-:57: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#57: FILE: drivers/gpu/drm/i915/intel_hdmi.c:796:

(quoted diff) +2 -0
+	if (!conn_state->hdr_output_metadata_blob_ptr ||
+		conn_state->hdr_output_metadata_blob_ptr->length == 0)

total: 0 errors, 0 warnings, 1 checks, 37 lines checked 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR -:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#35: FILE: drivers/gpu/drm/i915/intel_ddi.c:3586:

(quoted diff) +2 -0
+		if ((INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) &&
+			conn_state->hdr_metadata_changed)
Quoted 7 lines

total: 0 errors, 0 warnings, 1 checks, 25 lines checked 2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe

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

--
Jani Nikula, Intel Open Source Graphics Center

Quoted 2 lines

--
Jani Nikula, Intel Open Source Graphics Center

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

#6 lore raw

PATCH v5 1/13 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.

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.

---
 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     | 16 ++++++++++++++++
 5 files changed, 48 insertions(+)
drivers/gpu/drm/drm_connector.c +6 -0
index 07d65a1..b031079 100644
@@ -1054,6 +1054,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 c806199..29388bd 100644
@@ -561,6 +561,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;
 };
 
 /**
@@ -1201,6 +1208,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_static_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 +16 -0
index a439c2e..5012af2 100644
@@ -630,6 +630,22 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata */
+struct hdr_static_metadata {
+	uint8_t eotf;
+	uint8_t metadata_type;
+	struct {
+		uint16_t x, y;
+		} display_primaries[3];
+	struct {
+		uint16_t x, y;
+		} white_point;
+	uint16_t max_mastering_display_luminance;
+	uint16_t min_mastering_display_luminance;
+	uint16_t max_fall;
+	uint16_t max_cll;
+};
+
 #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
#7 lore raw

Re: [v5 01/13] drm: Add HDR source metadata property

Hello Uma,

Quoted 35 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 01/13] drm: Add HDR source metadata property

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

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.

---
 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     | 16 ++++++++++++++++
 5 files changed, 48 insertions(+)
drivers/gpu/drm/drm_connector.c +0 -0
index 07d65a1..b031079 100644

drivers/gpu/drm/drm_connector.c int drm_connector_create_standard_properties(struct · line 1059

Quoted 6 lines
drivers/gpu/drm/drm_connector.c +2 -0
@@ -1054,6 +1054,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);

Needs alignment with the line above.

Quoted 26 lines
drivers/gpu/drm/drm_connector.c +4 -0
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.hdr_output_metadata_property = prop;
+
 	return 0;
 }
include/drm/drm_connector.h index renamed from include/drm/drm_connector.h +0 -0

c806199..29388bd 100644

include/drm/drm_connector.h +7 -0
@@ -561,6 +561,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;
 };
 
 /**

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

Quoted 6 lines
include/drm/drm_connector.h +3 -0
@@ -1201,6 +1208,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_static_metadata hdr_metadata;

I was under the assumption that we are not parsing the hdr_metadata from the EDID, and the userspace needs to parse it from the EDID. If that's the case, we might not even need this pointer. Are we even using this or am I missing something here ?

Quoted 55 lines
include/drm/drm_connector.h +0 -0
 };
 
 #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 927ad64..a065194 renamed from include/linux/hdmi.h +0 -0

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 index renamed from include/uapi/drm/drm_mode.h +0 -0

a439c2e..5012af2 100644

include/uapi/drm/drm_mode.h +6 -0
@@ -630,6 +630,22 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata */
+struct hdr_static_metadata {
+	uint8_t eotf;
+	uint8_t metadata_type;
+	struct {
+		uint16_t x, y;

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

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

- Shashank

Quoted 5 lines
include/uapi/drm/drm_mode.h +0 -1
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01
 #define DRM_MODE_PAGE_FLIP_ASYNC 0x02
 #define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
--

1.9.1

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

#8 lore raw

RE: [v5 01/13] drm: Add HDR source metadata property

Quoted 56 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 12:39 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 01/13] drm: Add HDR source metadata property

Hello Uma,

Quoted 11 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 01/13] drm: Add HDR source metadata property

Quoted 4 lines

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

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

changes.

Quoted 26 lines

v3: No Change

v4: Addressed Shashank's review comments

v5: Rebase.

---
 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     | 16 ++++++++++++++++
 5 files changed, 48 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/drm_connector.c index 07d65a1..b031079 100644

drivers/gpu/drm/drm_connector.c +0 -0
@@ -1054,6 +1054,12 @@ int

drm_connector_create_standard_properties(struct
drm_device *dev)

drivers/gpu/drm/drm_connector.c +0 -0
 		return -ENOMEM;
 	dev->mode_config.non_desktop_property = prop;
Quoted 3 lines

drivers/gpu/drm/drm_connector.c int drm_connector_create_standard_properties(struct drm_device *dev) · line 1058

Quoted 2 lines
drivers/gpu/drm/drm_connector.c +2 -0
+	prop = drm_property_create(dev, DRM_MODE_PROP_BLOB,
+				   "HDR_OUTPUT_METADATA", 0);

Needs alignment with the line above.

Look like this is an issue with outlook. The changes are aligned actually.

Quoted 24 lines
Quoted 24 lines
drivers/gpu/drm/drm_connector.c +4 -0
+	if (!prop)
+		return -ENOMEM;
+	dev->mode_config.hdr_output_metadata_property = prop;
+
 	return 0;
 }
include/drm/drm_connector.h +7 -0
index c806199..29388bd 100644
@@ -561,6 +561,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;
 };
 
Quoted 11 lines

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

Quoted 8 lines
include/drm/drm_connector.h +3 -0
 /**
@@ -1201,6 +1208,9 @@ struct drm_connector {
 	 * &drm_mode_config.connector_free_work.
 	 */
 	struct llist_node free_node;
+
+	/* HDR metdata */
+	struct hdr_static_metadata hdr_metadata;

I was under the assumption that we are not parsing the hdr_metadata from the EDID, and the userspace needs to parse it from the EDID. If that's the case, we might not even need this pointer. Are we even using this or am I missing something here ?

We are parsing the metadata and keeping the sink capability in driver as well. This can help in some state checks and any default programming in case we need to do that.

Quoted 60 lines
Quoted 60 lines
include/drm/drm_connector.h +0 -0
 };
 
 #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 +0 -0

index
a439c2e..5012af2 100644

include/uapi/drm/drm_mode.h +9 -0
@@ -630,6 +630,22 @@ struct drm_color_lut {
 	__u16 reserved;
 };
 
+/* HDR Metadata */
+struct hdr_static_metadata {
+	uint8_t eotf;
+	uint8_t metadata_type;
+	struct {
+		uint16_t x, y;
+		} display_primaries[3];
+	struct {
+		uint16_t x, y;
Quoted 13 lines

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

Quoted 7 lines
include/uapi/drm/drm_mode.h +7 -0
+		} white_point;
+	uint16_t max_mastering_display_luminance;
+	uint16_t min_mastering_display_luminance;
+	uint16_t max_fall;
+	uint16_t max_cll;
+};
+

- Shashank

Quoted 5 lines
include/uapi/drm/drm_mode.h +0 -0
 #define DRM_MODE_PAGE_FLIP_EVENT 0x01  #define

DRM_MODE_PAGE_FLIP_ASYNC 0x02 #define
DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4
--
1.9.1

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

#9 lore raw

PATCH v5 2/13 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

---
 drivers/gpu/drm/drm_edid.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
drivers/gpu/drm/drm_edid.c +52 -0
index 5f14253..c5a81b8 100644
@@ -2834,6 +2834,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
@@ -3581,6 +3582,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];
@@ -3816,6 +3823,49 @@ 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)
+{
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	connector->hdr_metadata.eotf = eotf_supported(db);
+	connector->hdr_metadata.metadata_type = hdr_metadata_type(db);
+
+	if (len >= 5)
+		connector->hdr_metadata.max_fall = db[5];
+	if (len >= 4)
+		connector->hdr_metadata.max_cll = db[4];
+}
+
 static void
 drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)
 {
@@ -4443,6 +4493,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
#10 lore raw

RE: [v5 02/13] drm: Parse HDR metadata info from EDID

Quoted 41 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 02/13] drm: Parse HDR metadata info from EDID

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

---
 drivers/gpu/drm/drm_edid.c | 52
++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
drivers/gpu/drm/drm_edid.c index renamed from drivers/gpu/drm/drm_edid.c +0 -0

5f14253..c5a81b8 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,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

drivers/gpu/drm/drm_edid.c static int add_3d_struct_modes(struct drm_connector · line 3587

Quoted 6 lines
drivers/gpu/drm/drm_edid.c +3 -0
@@ -3581,6 +3582,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;

You might have already checked with checkpatch, but can we cross check the space before '-' ?

Quoted 7 lines
drivers/gpu/drm/drm_edid.c +3 -0
+}
+
+static int
 cea_db_extended_tag(const u8 *db)
 {
 	return db[1];

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct · line 3831

Quoted 9 lines
drivers/gpu/drm/drm_edid.c +5 -0
@@ -3816,6 +3823,49 @@ 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)

same here, looks like we need spaces around !=, or may be this is due to my mail client ?

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3842

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+		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) |

Again, space before the '|' sign, please excuse me if this is false alarm ...

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 13 lines
drivers/gpu/drm/drm_edid.c +13 -0
+		 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) {

Shouldn't this variable go to line above ?

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	connector->hdr_metadata.eotf = eotf_supported(db);
+	connector->hdr_metadata.metadata_type = hdr_metadata_type(db);
+
+	if (len >= 5)
+		connector->hdr_metadata.max_fall = db[5];
+	if (len >= 4)
+		connector->hdr_metadata.max_cll = db[4]; }

This '}' certainly should not be here.

drivers/gpu/drm/drm_edid.c static void drm_parse_cea_ext(struct drm_connector *connector, · line 4497

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +1 -1
+
 static void
 drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8 *db)  { @@
-4443,6 +4493,8 @@ static void drm_parse_cea_ext(struct drm_connector

*connector,

drivers/gpu/drm/drm_edid.c +2 -0
 			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);

- Shashank

Quoted 5 lines

}
}

--
1.9.1

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

#11 lore raw

Re: [v5 02/13] drm: Parse HDR metadata info from EDID

Quoted 57 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 12:56 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 02/13] drm: Parse HDR metadata info from EDID

Quoted 43 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 02/13] drm: Parse HDR metadata info from EDID

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

---
 drivers/gpu/drm/drm_edid.c | 52
++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0

index
5f14253..c5a81b8 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,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

drivers/gpu/drm/drm_edid.c +0 -0
@@ -3581,6 +3582,12 @@ static int add_3d_struct_modes(struct
 drm_connector *connector, u16 structure,  }
 
Quoted 6 lines

drivers/gpu/drm/drm_edid.c static int add_3d_struct_modes(struct drm_connector *connector, u16 structure, · line 3587

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +3 -0
 static int
+cea_db_payload_len_ext(const u8 *db)
+{
+	return (db[0] & 0x1f) - 1;

You might have already checked with checkpatch, but can we cross check the space before '-' ?

Yes, this seems ok. Space is there before operator.

Quoted 12 lines
Quoted 12 lines
drivers/gpu/drm/drm_edid.c +3 -0
+}
+
+static int
 cea_db_extended_tag(const u8 *db)
 {
 	return db[1];
@@ -3816,6 +3823,49 @@ static void

fixup_detailed_cea_mode_clock(struct
drm_display_mode *mode)
mode->clock = clock;
}

Quoted 7 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3831

Quoted 5 lines
drivers/gpu/drm/drm_edid.c +5 -0
+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)

same here, looks like we need spaces around !=, or may be this is due to my mail client ?

This seems to be issue with mail client. Looks like it's changing alignment on outlook. The changes are ok and spaces are there before operators.

Executed and checked with checkpatch as well. There are some other issues flagged with --strict option, will be fixing those as part of v6.

Regards,
Uma Shankar

Quoted 11 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3842

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+		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) |

Again, space before the '|' sign, please excuse me if this is false alarm ...

Same here.

Quoted 15 lines
Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+		 BIT(HDMI_EOTF_SMPTE_ST2084));
+
+}
+

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+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) {

Shouldn't this variable go to line above ?

Quoted 11 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	connector->hdr_metadata.eotf = eotf_supported(db);
+	connector->hdr_metadata.metadata_type = hdr_metadata_type(db);
+
+	if (len >= 5)
+		connector->hdr_metadata.max_fall = db[5];
+	if (len >= 4)
+		connector->hdr_metadata.max_cll = db[4]; }

This '}' certainly should not be here.

Same here as well.

Quoted 4 lines
Quoted 4 lines

+
static void
drm_parse_hdmi_vsdb_audio(struct drm_connector *connector, const u8
*db) { @@

Quoted 13 lines

drivers/gpu/drm/drm_edid.c static void drm_parse_cea_ext(struct drm_connector *connector, · line 4497

Quoted 7 lines

-4443,6 +4493,8 @@ static void drm_parse_cea_ext(struct drm_connector *connector,

drivers/gpu/drm/drm_edid.c +2 -0
 			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);

- Shashank

Quoted 5 lines

}
}

--
1.9.1

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

#12 lore raw

PATCH v5 3/13 drm: Parse Colorimetry data block from EDID

In reply to Uma Shankar

CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the colorimetry data from panel.

v2: Rebase

v3: No Change

v4: Addressed Shashank's review comments. Updated colorimetry field to 16 bit as DCI-P3 got added in CEA 861-G spec, as pointed out by Shashank.

---
 drivers/gpu/drm/drm_edid.c  | 26 ++++++++++++++++++++++++++
 include/drm/drm_connector.h |  3 +++
 2 files changed, 29 insertions(+)
drivers/gpu/drm/drm_edid.c +26 -0
index c5a81b8..0470845 100644
@@ -2834,6 +2834,7 @@ static int drm_cvt_modes(struct drm_connector *connector,
 #define VIDEO_BLOCK     0x02
 #define VENDOR_BLOCK    0x03
 #define SPEAKER_BLOCK	0x04
+#define COLORIMETRY_DATA_BLOCK		0x5
 #define HDR_STATIC_METADATA_BLOCK	0x6
 #define USE_EXTENDED_TAG 0x07
 #define EXT_VIDEO_CAPABILITY_BLOCK 0x00
@@ -3823,6 +3824,29 @@ static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
 	mode->clock = clock;
 }
 
+static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db)
+{
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != COLORIMETRY_DATA_BLOCK)
+		return false;
+
+	return true;
+}
+
+static void
+drm_parse_colorimetry_data_block(struct drm_connector *connector, const u8 *db)
+{
+	struct drm_hdmi_info *info = &connector->display_info.hdmi;
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	/* As per CEA 861-G spec */
+	info->colorimetry = ((db[3] & (0x1 << 7)) << 1) | db[2];
+}
+
+
 static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)
 {
 	if (cea_db_tag(db) != USE_EXTENDED_TAG)
@@ -4495,6 +4519,8 @@ static void drm_parse_cea_ext(struct drm_connector *connector,
 			drm_parse_vcdb(connector, db);
 		if (cea_db_is_hdmi_hdr_metadata_block(db))
 			drm_parse_hdr_metadata_block(connector, db);
+		if (cea_db_is_hdmi_colorimetry_data_block(db))
+			drm_parse_colorimetry_data_block(connector, db);
 	}
 }
 
include/drm/drm_connector.h +3 -0
index 29388bd..94f926e 100644
@@ -206,6 +206,9 @@ struct drm_hdmi_info {
 
 	/** @y420_dc_modes: bitmap of deep color support index */
 	u8 y420_dc_modes;
+
+	/* @colorimetry: bitmap of supported colorimetry modes */
+	u16 colorimetry;
 };
 
 /**
Signature · 6 lines
1.9.1

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

Re: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 42 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 03/13] drm: Parse Colorimetry data block from EDID

CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the colorimetry data from panel.

v2: Rebase

v3: No Change

v4: Addressed Shashank's review comments. Updated colorimetry field to 16 bit as DCI-P3 got added in CEA 861-G spec, as pointed out by Shashank.

---
 drivers/gpu/drm/drm_edid.c  | 26 ++++++++++++++++++++++++++
include/drm/drm_connector.h |  3 +++
 2 files changed, 29 insertions(+)
drivers/gpu/drm/drm_edid.c index renamed from drivers/gpu/drm/drm_edid.c +0 -0

c5a81b8..0470845 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,7 @@ static int drm_cvt_modes(struct drm_connector
 *connector,
 #define VIDEO_BLOCK     0x02
 #define VENDOR_BLOCK    0x03
 #define SPEAKER_BLOCK	0x04
+#define COLORIMETRY_DATA_BLOCK		0x5
 #define HDR_STATIC_METADATA_BLOCK	0x6
 #define USE_EXTENDED_TAG 0x07

#define EXT_VIDEO_CAPABILITY_BLOCK 0x00 @@ -3823,6 +3824,29 @@ static
void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +1 -0
 	mode->clock = clock;
 }
 
+static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db) {

Same comment for the opening brace above ?

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3832

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != COLORIMETRY_DATA_BLOCK)

Space before '!' ?

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+		return false;
+
+	return true;
+}

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+
+static void
+drm_parse_colorimetry_data_block(struct drm_connector *connector, const
+u8 *db) {
+	struct drm_hdmi_info *info = &connector->display_info.hdmi;
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	/* As per CEA 861-G spec */
+	info->colorimetry = ((db[3] & (0x1 << 7)) << 1) | db[2]; }

This means we are setting the 15th bit for DCI-P3 then there is a gap of 7 bits, and then there are other bits. Do we want to make DCI-P3 as bit 8 ? Anyways this can be differed for a discussion later.

Quoted 18 lines
drivers/gpu/drm/drm_edid.c +2 -0
+
+
 static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)  {
 	if (cea_db_tag(db) != USE_EXTENDED_TAG) @@ -4495,6 +4519,8 @@ static

void drm_parse_cea_ext(struct drm_connector *connector,

drivers/gpu/drm/drm_edid.c +2 -0
 			drm_parse_vcdb(connector, db);
 		if (cea_db_is_hdmi_hdr_metadata_block(db))
 			drm_parse_hdr_metadata_block(connector, db);
+		if (cea_db_is_hdmi_colorimetry_data_block(db))
+			drm_parse_colorimetry_data_block(connector, db);
 	}
 }
include/drm/drm_connector.h index renamed from include/drm/drm_connector.h +0 -0

29388bd..94f926e 100644

include/drm/drm_connector.h struct drm_hdmi_info { · line 211

Quoted 6 lines
include/drm/drm_connector.h +3 -0
@@ -206,6 +206,9 @@ struct drm_hdmi_info {
 
 	/** @y420_dc_modes: bitmap of deep color support index */
 	u8 y420_dc_modes;
+
+	/* @colorimetry: bitmap of supported colorimetry modes */
+	u16 colorimetry;

- Shashank

Quoted 5 lines
include/drm/drm_connector.h +0 -1
 };
 
 /**
--

1.9.1

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

#14 lore raw

RE: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 60 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 1:01 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 46 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 03/13] drm: Parse Colorimetry data block from EDID

CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the colorimetry data from panel.

v2: Rebase

v3: No Change

v4: Addressed Shashank's review comments. Updated colorimetry field to 16 bit as
DCI-P3 got added in CEA 861-G spec, as pointed out by Shashank.

---
 drivers/gpu/drm/drm_edid.c  | 26 ++++++++++++++++++++++++++
include/drm/drm_connector.h |  3 +++
 2 files changed, 29 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0

index
c5a81b8..0470845 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,7 @@ static int drm_cvt_modes(struct drm_connector
 *connector,
 #define VIDEO_BLOCK     0x02
 #define VENDOR_BLOCK    0x03
 #define SPEAKER_BLOCK	0x04
+#define COLORIMETRY_DATA_BLOCK		0x5
 #define HDR_STATIC_METADATA_BLOCK	0x6
 #define USE_EXTENDED_TAG 0x07

#define EXT_VIDEO_CAPABILITY_BLOCK 0x00 @@ -3823,6 +3824,29 @@ static
void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
mode->clock = clock;
}

Quoted 2 lines
Quoted 1 line

+static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db) {

Same comment for the opening brace above ?

Again this looks like mail client issue.

Quoted 5 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3832

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != COLORIMETRY_DATA_BLOCK)

Space before '!' ?

Same here.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+		return false;
+
+	return true;
+}
+
+static void
+drm_parse_colorimetry_data_block(struct drm_connector *connector,
+const
+u8 *db) {
+	struct drm_hdmi_info *info = &connector->display_info.hdmi;
Quoted 8 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 5 lines
drivers/gpu/drm/drm_edid.c +5 -0
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	/* As per CEA 861-G spec */
+	info->colorimetry = ((db[3] & (0x1 << 7)) << 1) | db[2]; }

This means we are setting the 15th bit for DCI-P3 then there is a gap of 7 bits, and then there are other bits. Do we want to make DCI-P3 as bit 8 ? Anyways this can be differed for a discussion later.

This is at 8th position only. We are shifting the db[3] which is 8 bit by 1 and keeping the 7th bit (DCI-P3) at the 8th position (if we count from 0).

Regards,
Uma Shankar

Quoted 19 lines
Quoted 19 lines
drivers/gpu/drm/drm_edid.c +2 -0
+
+
 static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)  {
 	if (cea_db_tag(db) != USE_EXTENDED_TAG) @@ -4495,6 +4519,8 @@ static

void drm_parse_cea_ext(struct drm_connector *connector,

drivers/gpu/drm/drm_edid.c +2 -0
 			drm_parse_vcdb(connector, db);
 		if (cea_db_is_hdmi_hdr_metadata_block(db))
 			drm_parse_hdr_metadata_block(connector, db);
+		if (cea_db_is_hdmi_colorimetry_data_block(db))
+			drm_parse_colorimetry_data_block(connector, db);
 	}
 }
include/drm/drm_connector.h +0 -0
index 29388bd..94f926e 100644
@@ -206,6 +206,9 @@ struct drm_hdmi_info {
 
Quoted 11 lines

include/drm/drm_connector.h struct drm_hdmi_info { · line 211

Quoted 5 lines
include/drm/drm_connector.h +3 -0
 	/** @y420_dc_modes: bitmap of deep color support index */
 	u8 y420_dc_modes;
+
+	/* @colorimetry: bitmap of supported colorimetry modes */
+	u16 colorimetry;

- Shashank

Quoted 5 lines
include/drm/drm_connector.h +0 -1
 };
 
 /**
--

1.9.1

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

Reviewed-by
#15 lore raw

Re: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 88 lines · Uma
Quoted 59 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 1:01 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 46 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 03/13] drm: Parse Colorimetry data block from EDID

CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the colorimetry data from panel.

v2: Rebase

v3: No Change

v4: Addressed Shashank's review comments. Updated colorimetry field to 16 bit as
DCI-P3 got added in CEA 861-G spec, as pointed out by Shashank.

---
  drivers/gpu/drm/drm_edid.c  | 26 ++++++++++++++++++++++++++
include/drm/drm_connector.h |  3 +++
  2 files changed, 29 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0

index
c5a81b8..0470845 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,7 @@ static int drm_cvt_modes(struct drm_connector
 *connector,
  #define VIDEO_BLOCK     0x02
  #define VENDOR_BLOCK    0x03
  #define SPEAKER_BLOCK	0x04
+#define COLORIMETRY_DATA_BLOCK		0x5
  #define HDR_STATIC_METADATA_BLOCK	0x6
  #define USE_EXTENDED_TAG 0x07

#define EXT_VIDEO_CAPABILITY_BLOCK 0x00 @@ -3823,6 +3824,29 @@ static
void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
mode->clock = clock;
}

Quoted 2 lines
Quoted 1 line

+static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db) {

Same comment for the opening brace above ?

Again this looks like mail client issue.

Quoted 5 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3832

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != COLORIMETRY_DATA_BLOCK)

Space before '!' ?

Same here.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+		return false;
+
+	return true;
+}
+
+static void
+drm_parse_colorimetry_data_block(struct drm_connector *connector,
+const
+u8 *db) {
+	struct drm_hdmi_info *info = &connector->display_info.hdmi;
Quoted 8 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 5 lines
drivers/gpu/drm/drm_edid.c +5 -0
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	/* As per CEA 861-G spec */
+	info->colorimetry = ((db[3] & (0x1 << 7)) << 1) | db[2]; }

This means we are setting the 15th bit for DCI-P3 then there is a gap of 7 bits, and then there are other bits. Do we want to make DCI-P3 as bit 8 ? Anyways this can be differed for a discussion later.

Quoted 5 lines

This is at 8th position only. We are shifting the db[3] which is 8 bit by 1 and keeping the 7th bit (DCI-P3) at the 8th position (if we count from 0).

Regards,
Uma Shankar

My bad,  its 8th bit only.

If those above alignment problems are checked already, feel free to use

- Shashank

Quoted 25 lines
Quoted 25 lines
Quoted 18 lines
drivers/gpu/drm/drm_edid.c +2 -0
+
+
  static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)  {
  	if (cea_db_tag(db) != USE_EXTENDED_TAG) @@ -4495,6 +4519,8 @@ static

void drm_parse_cea_ext(struct drm_connector *connector,
drm_parse_vcdb(connector, db);
if (cea_db_is_hdmi_hdr_metadata_block(db))
drm_parse_hdr_metadata_block(connector, db);

drivers/gpu/drm/drm_edid.c +2 -0
+		if (cea_db_is_hdmi_colorimetry_data_block(db))
+			drm_parse_colorimetry_data_block(connector, db);
  	}
  }
include/drm/drm_connector.h +0 -0
index 29388bd..94f926e 100644

include/drm/drm_connector.h struct drm_hdmi_info { · line 211

Quoted 6 lines
include/drm/drm_connector.h +3 -0
@@ -206,6 +206,9 @@ struct drm_hdmi_info {
 
  	/** @y420_dc_modes: bitmap of deep color support index */
  	u8 y420_dc_modes;
+
+	/* @colorimetry: bitmap of supported colorimetry modes */
+	u16 colorimetry;

- Shashank

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
include/drm/drm_connector.h +0 -1
  };
 
  /**
--

1.9.1

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

#16 lore raw

Re: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 93 lines · Uma
Quoted 92 lines
Quoted 60 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 1:01 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 03/13] drm: Parse Colorimetry data block from EDID

Quoted 47 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 03/13] drm: Parse Colorimetry data block from EDID

CEA 861.3 spec adds colorimetry data block for HDMI. Parsing the block to get the colorimetry data from panel.

v2: Rebase

v3: No Change

v4: Addressed Shashank's review comments. Updated colorimetry field to
16 bit as
DCI-P3 got added in CEA 861-G spec, as pointed out by Shashank.

---
  drivers/gpu/drm/drm_edid.c  | 26 ++++++++++++++++++++++++++
include/drm/drm_connector.h |  3 +++
  2 files changed, 29 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0

index
c5a81b8..0470845 100644

drivers/gpu/drm/drm_edid.c +1 -0
@@ -2834,6 +2834,7 @@ static int drm_cvt_modes(struct drm_connector
 *connector,
  #define VIDEO_BLOCK     0x02
  #define VENDOR_BLOCK    0x03
  #define SPEAKER_BLOCK	0x04
+#define COLORIMETRY_DATA_BLOCK		0x5
  #define HDR_STATIC_METADATA_BLOCK	0x6
  #define USE_EXTENDED_TAG 0x07

#define EXT_VIDEO_CAPABILITY_BLOCK 0x00 @@ -3823,6 +3824,29 @@
static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)
mode->clock = clock;
}

Quoted 2 lines
Quoted 1 line

+static bool cea_db_is_hdmi_colorimetry_data_block(const u8 *db) {

Same comment for the opening brace above ?

Again this looks like mail client issue.

Quoted 5 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode) · line 3832

Quoted 4 lines
drivers/gpu/drm/drm_edid.c +4 -0
+	if (cea_db_tag(db) != USE_EXTENDED_TAG)
+		return false;
+
+	if (db[1] != COLORIMETRY_DATA_BLOCK)

Space before '!' ?

Same here.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+		return false;
+
+	return true;
+}
+
+static void
+drm_parse_colorimetry_data_block(struct drm_connector *connector,
+const
+u8 *db) {
+	struct drm_hdmi_info *info = &connector->display_info.hdmi;
Quoted 8 lines

drivers/gpu/drm/drm_edid.c static void fixup_detailed_cea_mode_clock(struct drm_display_mode *mode)

Quoted 5 lines
drivers/gpu/drm/drm_edid.c +5 -0
+	uint16_t len;
+
+	len = cea_db_payload_len_ext(db);
+	/* As per CEA 861-G spec */
+	info->colorimetry = ((db[3] & (0x1 << 7)) << 1) | db[2]; }

This means we are setting the 15th bit for DCI-P3 then there is a gap of 7 bits, and then there are other bits. Do we want to make DCI-P3 as bit 8 ? Anyways this can be differed for a discussion later.

This is at 8th position only. We are shifting the db[3] which is 8 bit by 1 and keeping the 7th bit (DCI-P3) at the 8th position (if we count from 0).

Quoted 8 lines
Quoted 2 lines

Regards,
Uma Shankar

My bad,  its 8th bit only.

If those above alignment problems are checked already, feel free to use

No Issues, Thanks Shashank.

Regards,
Uma Shankar

Quoted 32 lines

- Shashank

Quoted 30 lines
Quoted 30 lines
Quoted 18 lines
drivers/gpu/drm/drm_edid.c +2 -0
+
+
  static bool cea_db_is_hdmi_hdr_metadata_block(const u8 *db)  {
  	if (cea_db_tag(db) != USE_EXTENDED_TAG) @@ -4495,6 +4519,8 @@

static void drm_parse_cea_ext(struct drm_connector *connector,
drm_parse_vcdb(connector, db);
if (cea_db_is_hdmi_hdr_metadata_block(db))
drm_parse_hdr_metadata_block(connector, db);

drivers/gpu/drm/drm_edid.c +2 -0
+		if (cea_db_is_hdmi_colorimetry_data_block(db))
+			drm_parse_colorimetry_data_block(connector, db);
  	}
  }
(quoted diff) +0 -0

b/include/drm/drm_connector.h index 29388bd..94f926e 100644

include/drm/drm_connector.h struct drm_hdmi_info { · line 211

Quoted 6 lines
include/drm/drm_connector.h +3 -0
@@ -206,6 +206,9 @@ struct drm_hdmi_info {
 
  	/** @y420_dc_modes: bitmap of deep color support index */
  	u8 y420_dc_modes;
+
+	/* @colorimetry: bitmap of supported colorimetry modes */
+	u16 colorimetry;

- Shashank

Quoted 5 lines
include/drm/drm_connector.h +0 -1
  };
 
  /**
--

1.9.1

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

#17 lore raw

PATCH v5 4/13 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 cd422a7..0952475 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
Reviewed-by on v5 4/13
#18 lore raw

Re: [v5 04/13] drm/i915: Attach HDR metadata property to connector

Quoted 29 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 04/13] drm/i915: Attach HDR metadata property to connector

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 +0 -0
index cd422a7..0952475 100644

drivers/gpu/drm/i915/intel_hdmi.c static void intel_hdmi_destroy(struct drm_connector · line 2724

Quoted 6 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
@@ -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);

'connector->dev' should be aligned to the line above, but seems like you have done this to meet the 80 char limit. May be a local ptr variable will help with 80 char.

Apart from that, looks good to me, and feel free to use:

Quoted 5 lines
drivers/gpu/drm/i915/intel_hdmi.c +0 -1
 	if (!HAS_GMCH(dev_priv))
 		drm_connector_attach_max_bpc_property(connector, 8, 12);
--

1.9.1

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

#19 lore raw

Re: [v5 04/13] drm/i915: Attach HDR metadata property to connector

Quoted 47 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 1:06 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: RE: [v5 04/13] drm/i915: Attach HDR metadata property to connector

Quoted 33 lines

-----Original Message-----
From: Shankar, Uma
Sent: Monday, March 11, 2019 9:28 AM
To: [email protected]; [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]; [email protected]; [email protected]; Shankar, Uma <[email protected]>
Subject: [v5 04/13] drm/i915: Attach HDR metadata property to connector

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 +0 -0
index cd422a7..0952475 100644
@@ -2719,6 +2719,8 @@ static void intel_hdmi_destroy(struct

drm_connector
*connector)

Quoted 7 lines

drivers/gpu/drm/i915/intel_hdmi.c static void intel_hdmi_destroy(struct drm_connector *connector) · line 2723

Quoted 4 lines
drivers/gpu/drm/i915/intel_hdmi.c +2 -0
 	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);

'connector->dev' should be aligned to the line above, but seems like you have done this to meet the 80 char limit.
May be a local ptr variable will help with 80 char.

Thanks Shashank, the name itself is a bit long. I will align it and can see crossing 80 characters for these kind of cases is ok. Being done in driver at several places.

Thanks for the review.

Regards,
Uma Shankar

Quoted 8 lines

Apart from that, looks good to me, and feel free to use:

Quoted 5 lines
drivers/gpu/drm/i915/intel_hdmi.c +0 -1
 	if (!HAS_GMCH(dev_priv))
 		drm_connector_attach_max_bpc_property(connector, 8, 12);
--

1.9.1

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

#20 lore raw

PATCH v5 5/13 drm: Implement HDR output metadata set and get property handling

In reply to Uma Shankar

This patch 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 added Ville's POC changes

v3: No Change

v4: Addressed Shashank's review comments

---
 drivers/gpu/drm/drm_atomic.c      |  2 ++
 drivers/gpu/drm/drm_atomic_uapi.c | 13 +++++++++++++
 2 files changed, 15 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 4eb81f1..18c8b81f 100644
@@ -686,6 +686,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);
@@ -734,6 +736,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_static_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) {
@@ -820,6 +830,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) {
Signature · 6 lines
1.9.1

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

PATCH v5 6/13 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.

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

---
 drivers/gpu/drm/drm_edid.c |  58 ++++++++++++++++++++
 drivers/video/hdmi.c       | 129 +++++++++++++++++++++++++++++++++++++++++++++
 include/drm/drm_edid.h     |   4 ++
 include/linux/hdmi.h       |  22 ++++++++
 4 files changed, 213 insertions(+)
drivers/gpu/drm/drm_edid.c +58 -0
index 0470845..49f8340 100644
@@ -4914,6 +4914,64 @@ 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,
+				    void *hdr_metadata)
+{
+	struct hdr_static_metadata *hdr_source_metadata;
+	int err, i;
+
+	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_source_metadata = (struct hdr_static_metadata *)hdr_metadata;
+
+	frame->length = sizeof(struct hdr_static_metadata);
+
+
+	frame->eotf = hdr_source_metadata->eotf;
+	frame->metadata_type = hdr_source_metadata->metadata_type;
+
+	for (i = 0; i < 3; i++) {
+		frame->display_primaries[i].x =
+			hdr_source_metadata->display_primaries[i].x;
+		frame->display_primaries[i].y =
+			hdr_source_metadata->display_primaries[i].y;
+	}
+
+	frame->white_point.x = hdr_source_metadata->white_point.x;
+	frame->white_point.y = hdr_source_metadata->white_point.y;
+
+	frame->max_mastering_display_luminance =
+		hdr_source_metadata->max_mastering_display_luminance;
+	frame->min_mastering_display_luminance =
+		hdr_source_metadata->min_mastering_display_luminance;
+
+	frame->max_cll = hdr_source_metadata->max_cll;
+	frame->max_fall = hdr_source_metadata->max_fall;
+
+	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 +129 -0

159 lines not on this page · raw message

include/drm/drm_edid.h +4 -0
index 9d3b5b9..973e43e 100644
@@ -370,6 +370,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,
+				    void *hdr_source_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 +22 -0
index a065194..33243b2 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,32 @@ struct hdmi_avi_infoframe {
 	unsigned short right_bar;
 };
 
+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 {
+		uint16_t x, y;
+	} display_primaries[3];
+	struct {
+		uint16_t x, y;
+	} white_point;
+	uint16_t max_mastering_display_luminance;
+	uint16_t min_mastering_display_luminance;
+	uint16_t max_fall;
+	uint16_t max_cll;
+	uint16_t min_cll;
+};
+
 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);
 
 enum hdmi_spd_sdi {
 	HDMI_SPD_SDI_UNKNOWN,
@@ -365,6 +386,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

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v5 6/13
#22 lore raw

Re: [v5 06/13] drm: Enable HDR infoframe support

Quoted 34 lines · 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.

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

---
  drivers/gpu/drm/drm_edid.c |  58 ++++++++++++++++++++
  drivers/video/hdmi.c       | 129 +++++++++++++++++++++++++++++++++++++++++++++
  include/drm/drm_edid.h     |   4 ++
  include/linux/hdmi.h       |  22 ++++++++
  4 files changed, 213 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0
index 0470845..49f8340 100644
@@ -4914,6 +4914,64 @@ static bool is_hdmi2_sink(struct drm_connector *connector)
  }
 
  /**

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4926

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+ * 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,
+				    void *hdr_metadata)

Alignment with bracket above

Quoted 7 lines
drivers/gpu/drm/drm_edid.c +7 -0
+{
+	struct hdr_static_metadata *hdr_source_metadata;
+	int err, i;
+
+	if (!frame || !hdr_metadata)
+		return true;
+

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4943

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+	err = hdmi_drm_infoframe_init(frame);
+	if (err < 0)
+		return err;
+
+	DRM_DEBUG_KMS("type = %x\n", frame->type);
+
+	hdr_source_metadata = (struct hdr_static_metadata *)hdr_metadata;
+
+	frame->length = sizeof(struct hdr_static_metadata);
+

extra blank line

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4953

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+
+	frame->eotf = hdr_source_metadata->eotf;
+	frame->metadata_type = hdr_source_metadata->metadata_type;
+
+	for (i = 0; i < 3; i++) {
+		frame->display_primaries[i].x =
+			hdr_source_metadata->display_primaries[i].x;
+		frame->display_primaries[i].y =
+			hdr_source_metadata->display_primaries[i].y;
+	}

memcpy here to avoid loop ?

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4965

Quoted 12 lines
drivers/gpu/drm/drm_edid.c +12 -0
+
+	frame->white_point.x = hdr_source_metadata->white_point.x;
+	frame->white_point.y = hdr_source_metadata->white_point.y;
+
+	frame->max_mastering_display_luminance =
+		hdr_source_metadata->max_mastering_display_luminance;
+	frame->min_mastering_display_luminance =
+		hdr_source_metadata->min_mastering_display_luminance;
+
+	frame->max_cll = hdr_source_metadata->max_cll;
+	frame->max_fall = hdr_source_metadata->max_fall;
+

In fact the structures look so analogues, can we do a complete memcpy of one structure to other ? or the sequence of the elements is different ?

Quoted 69 lines
drivers/gpu/drm/drm_edid.c +9 -0
+	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 +49 -0
index 799ae49..7ab8086 100644
@@ -650,6 +650,93 @@ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
  	return 0;
  }
 
+/**
+ * hdmi_drm_infoframe_init() - initialize an HDMI Dynaminc Range and
+ * mastering infoframe
+ * @frame: HDMI DRM infoframe
+ *
+ * Returns 0 on success or a negative error code on failure.
+ */
+int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame)
+{
+	memset(frame, 0, sizeof(*frame));
+
+	frame->type = HDMI_INFOFRAME_TYPE_DRM;
+	frame->version = 1;
+
+	return 0;
+}
+EXPORT_SYMBOL(hdmi_drm_infoframe_init);
+
+/**
+ * hdmi_drm_infoframe_pack() - write HDMI DRM infoframe to binary buffer
+ * @frame: HDMI DRM infoframe
+ * @buffer: destination buffer
+ * @size: size of buffer
+ *
+ * Packs the information contained in the @frame structure into a binary
+ * representation that can be written into the corresponding controller
+ * registers. Also computes the checksum as required by section 5.3.5 of
+ * the HDMI 1.4 specification.
+ *
+ * Returns the number of bytes packed into the binary buffer or a negative
+ * error code on failure.
+ */
+ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
+				size_t size)
+{
+	u8 *ptr = buffer;
+	size_t length;
+	int i;
+
+	length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
+
+	if (size < length)
+		return -ENOSPC;
+
+	memset(buffer, 0, size);
+
+	ptr[0] = frame->type;
+	ptr[1] = frame->version;
+	ptr[2] = frame->length;

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

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+	ptr[3] = 0; /* checksum */
+
+	/* start infoframe payload */
+	ptr += HDMI_INFOFRAME_HEADER_SIZE;
+
+	*ptr++ = frame->eotf;
+	*ptr++ = frame->metadata_type;
+
+	for (i = 0; i < 3; i++) {
+		*ptr++ = frame->display_primaries[i].x & 0xff;

&0xff is not required

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

Quoted 2 lines
drivers/video/hdmi.c +2 -0
+		*ptr++ = frame->display_primaries[i].x >> 8;
+		*ptr++ = frame->display_primaries[i].y & 0xff;

&0xff is not required, applicable for all below

Quoted 56 lines
drivers/video/hdmi.c +35 -0
+		*ptr++ = frame->display_primaries[i].y >> 8;
+	}
+
+	*ptr++ = frame->white_point.x & 0xff;
+	*ptr++ = frame->white_point.x >> 8;
+
+	*ptr++ = frame->white_point.y & 0xff;
+	*ptr++ = frame->white_point.y >> 8;
+
+	*ptr++ = frame->max_mastering_display_luminance & 0xff;
+	*ptr++ = frame->max_mastering_display_luminance >> 8;
+
+	*ptr++ = frame->min_mastering_display_luminance & 0xff;
+	*ptr++ = frame->min_mastering_display_luminance >> 8;
+
+	*ptr++ = frame->max_cll & 0xff;
+	*ptr++ = frame->max_cll >> 8;
+
+	*ptr++ = frame->max_fall & 0xff;
+	*ptr++ = frame->max_fall >> 8;
+
+	hdmi_infoframe_set_checksum(buffer, length);
+
+	return length;
+}
+
  /*
   * hdmi_vendor_any_infoframe_check() - check a vendor infoframe
   */
@@ -806,6 +893,9 @@ ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
  	case HDMI_INFOFRAME_TYPE_AVI:
  		length = hdmi_avi_infoframe_pack(&frame->avi, buffer, size);
  		break;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		length = hdmi_drm_infoframe_pack(&frame->drm, buffer, size);
+		break;
  	case HDMI_INFOFRAME_TYPE_SPD:
  		length = hdmi_spd_infoframe_pack(&frame->spd, buffer, size);
  		break;
@@ -838,6 +928,8 @@ static const char *hdmi_infoframe_type_get_name(enum hdmi_infoframe_type type)
  		return "Source Product Description (SPD)";
  	case HDMI_INFOFRAME_TYPE_AUDIO:
  		return "Audio";
+	case HDMI_INFOFRAME_TYPE_DRM:
+		return "Dynamic Range and Mastering";
  	}
  	return "Reserved";
  }
@@ -1284,6 +1376,40 @@ static void hdmi_audio_infoframe_log(const char *level,
  			frame->downmix_inhibit ? "Yes" : "No");
  }
 
+/**
+ * hdmi_drm_infoframe_log() - log info of HDMI DRM infoframe
+ * @level: logging level
+ * @dev: device

drivers/video/hdmi.c static void hdmi_audio_infoframe_log(const char *level, · line 1392

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+ * @frame: HDMI DRM infoframe
+ */
+static void hdmi_drm_infoframe_log(const char *level,
+				   struct device *dev,
+				   const struct hdmi_drm_infoframe *frame)
+{
+	int i;
+
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);

Alignment with above '('

Quoted 5 lines
drivers/video/hdmi.c +5 -0
+	hdmi_log("length: %d\n", frame->length);
+	hdmi_log("metadata type: %d\n", frame->metadata_type);
+	hdmi_log("eotf: %d\n", frame->eotf);
+	for (i = 0; i < 3; i++) {
+		hdmi_log("x[%d]: %d\n", i, frame->display_primaries[i].x);

drivers/video/hdmi.c static void hdmi_audio_infoframe_log(const char *level, · line 1407

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+		hdmi_log("y[%d]: %d\n", i, frame->display_primaries[i].y);
+	}
+
+	hdmi_log("white point x: %d\n", frame->white_point.x);
+	hdmi_log("white point y: %d\n", frame->white_point.y);
+
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);

Alignment for these 2 lines above

Quoted 79 lines
drivers/video/hdmi.c +8 -0
+
+	hdmi_log("max_cll: %d\n", frame->max_cll);
+	hdmi_log("max_fall: %d\n", frame->max_fall);
+}
+
  static const char *
  hdmi_3d_structure_get_name(enum hdmi_3d_structure s3d_struct)
  {
@@ -1372,6 +1498,9 @@ void hdmi_infoframe_log(const char *level,
  	case HDMI_INFOFRAME_TYPE_VENDOR:
  		hdmi_vendor_any_infoframe_log(level, dev, &frame->vendor);
  		break;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		hdmi_drm_infoframe_log(level, dev, &frame->drm);
+		break;
  	}
  }
  EXPORT_SYMBOL(hdmi_infoframe_log);
include/drm/drm_edid.h +4 -0
index 9d3b5b9..973e43e 100644
@@ -370,6 +370,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,
+				    void *hdr_source_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 +21 -0
index a065194..33243b2 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,32 @@ struct hdmi_avi_infoframe {
  	unsigned short right_bar;
  };
 
+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 {
+		uint16_t x, y;
+	} display_primaries[3];
+	struct {
+		uint16_t x, y;
+	} white_point;
+	uint16_t max_mastering_display_luminance;
+	uint16_t min_mastering_display_luminance;
+	uint16_t max_fall;
+	uint16_t max_cll;
+	uint16_t min_cll;
+};
+
  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);
 
  enum hdmi_spd_sdi {
  	HDMI_SPD_SDI_UNKNOWN,

include/linux/hdmi.h ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *fram · line 390

Quoted 5 lines
include/linux/hdmi.h +1 -0
@@ -365,6 +386,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;
  };

With the minor issues pointed above fixed, feel free to use:

- Shashank

include/linux/hdmi.h ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *fram · line 392

Quoted 2 lines
include/linux/hdmi.h +0 -0
  ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void *buffer,

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

#23 lore raw

RE: [v5 06/13] drm: Enable HDR infoframe support

Quoted 48 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 1:54 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]; Ville Syrjälä <[email protected]>
Subject: Re: [v5 06/13] drm: Enable HDR infoframe support

Quoted 14 lines · 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.

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.

Quoted 7 lines

v5: Rebase

---
  drivers/gpu/drm/drm_edid.c |  58 ++++++++++++++++++++
  drivers/video/hdmi.c       | 129

+++++++++++++++++++++++++++++++++++++++++++++

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector

Quoted 9 lines
  include/drm/drm_edid.h     |   4 ++
  include/linux/hdmi.h       |  22 ++++++++
  4 files changed, 213 insertions(+)
drivers/gpu/drm/drm_edid.c +0 -0
index 0470845..49f8340 100644
@@ -4914,6 +4914,64 @@ static bool is_hdmi2_sink(struct drm_connector

*connector)

Quoted 2 lines
drivers/gpu/drm/drm_edid.c +0 -0
  }
 
Quoted 12 lines

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4926

Quoted 11 lines
drivers/gpu/drm/drm_edid.c +10 -0
  /**
+ * 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,
+				    void *hdr_metadata)

Alignment with bracket above

This is email client issue.

Quoted 10 lines
Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+{
+	struct hdr_static_metadata *hdr_source_metadata;
+	int err, i;
+
+	if (!frame || !hdr_metadata)
+		return true;
+
+	err = hdmi_drm_infoframe_init(frame);
+	if (err < 0)
+		return err;
Quoted 8 lines

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4943

Quoted 7 lines
drivers/gpu/drm/drm_edid.c +7 -0
+
+	DRM_DEBUG_KMS("type = %x\n", frame->type);
+
+	hdr_source_metadata = (struct hdr_static_metadata *)hdr_metadata;
+
+	frame->length = sizeof(struct hdr_static_metadata);
+

extra blank line

Sure, will fix this.

Quoted 11 lines

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4953

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +10 -0
+
+	frame->eotf = hdr_source_metadata->eotf;
+	frame->metadata_type = hdr_source_metadata->metadata_type;
+
+	for (i = 0; i < 3; i++) {
+		frame->display_primaries[i].x =
+			hdr_source_metadata->display_primaries[i].x;
+		frame->display_primaries[i].y =
+			hdr_source_metadata->display_primaries[i].y;
+	}

memcpy here to avoid loop ?

I feel it makes it more clear as what data is getting copied. If no hard objection, let's keep it this way.

Quoted 6 lines
Quoted 6 lines
drivers/gpu/drm/drm_edid.c +6 -0
+
+	frame->white_point.x = hdr_source_metadata->white_point.x;
+	frame->white_point.y = hdr_source_metadata->white_point.y;
+
+	frame->max_mastering_display_luminance =
+		hdr_source_metadata->max_mastering_display_luminance;
Quoted 8 lines

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector) · line 4965

Quoted 6 lines
drivers/gpu/drm/drm_edid.c +6 -0
+	frame->min_mastering_display_luminance =
+		hdr_source_metadata->min_mastering_display_luminance;
+
+	frame->max_cll = hdr_source_metadata->max_cll;
+	frame->max_fall = hdr_source_metadata->max_fall;
+

In fact the structures look so analogues, can we do a complete memcpy of one structure to other ? or the sequence of the elements is different ?

There are slightly different elements as well so it would be good to have member by member copy. This will also help check in case any issues with metadata input.

Quoted 79 lines

drivers/gpu/drm/drm_edid.c static bool is_hdmi2_sink(struct drm_connector *connector)

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +9 -0
+	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

drivers/video/hdmi.c ssize_t hdmi_vendor_infoframe_pack(struct

Quoted 7 lines
drivers/gpu/drm/drm_edid.c +0 -0
   *                                              data from a DRM display mode
   * @frame: HDMI AVI infoframe
drivers/video/hdmi.c index renamed from drivers/video/hdmi.c +0 -0

799ae49..7ab8086 100644

drivers/video/hdmi.c +0 -0
@@ -650,6 +650,93 @@ ssize_t hdmi_vendor_infoframe_pack(struct

hdmi_vendor_infoframe *frame,

Quoted 30 lines
drivers/video/hdmi.c +27 -0
  	return 0;
  }
 
+/**
+ * hdmi_drm_infoframe_init() - initialize an HDMI Dynaminc Range and
+ * mastering infoframe
+ * @frame: HDMI DRM infoframe
+ *
+ * Returns 0 on success or a negative error code on failure.
+ */
+int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame) {
+	memset(frame, 0, sizeof(*frame));
+
+	frame->type = HDMI_INFOFRAME_TYPE_DRM;
+	frame->version = 1;
+
+	return 0;
+}
+EXPORT_SYMBOL(hdmi_drm_infoframe_init);
+
+/**
+ * hdmi_drm_infoframe_pack() - write HDMI DRM infoframe to binary
+buffer
+ * @frame: HDMI DRM infoframe
+ * @buffer: destination buffer
+ * @size: size of buffer
+ *
+ * Packs the information contained in the @frame structure into a
+binary
+ * representation that can be written into the corresponding

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

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+controller
+ * registers. Also computes the checksum as required by section 5.3.5
+of
+ * the HDMI 1.4 specification.
+ *
+ * Returns the number of bytes packed into the binary buffer or a
+negative
+ * error code on failure.
+ */
+ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void

*buffer,

Quoted 19 lines
drivers/video/hdmi.c +19 -0
+				size_t size)
+{
+	u8 *ptr = buffer;
+	size_t length;
+	int i;
+
+	length = HDMI_INFOFRAME_HEADER_SIZE + frame->length;
+
+	if (size < length)
+		return -ENOSPC;
+
+	memset(buffer, 0, size);
+
+	ptr[0] = frame->type;
+	ptr[1] = frame->version;
+	ptr[2] = frame->length;
+	ptr[3] = 0; /* checksum */
+
+	/* start infoframe payload */
Quoted 8 lines

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

Quoted 7 lines
drivers/video/hdmi.c +7 -0
+	ptr += HDMI_INFOFRAME_HEADER_SIZE;
+
+	*ptr++ = frame->eotf;
+	*ptr++ = frame->metadata_type;
+
+	for (i = 0; i < 3; i++) {
+		*ptr++ = frame->display_primaries[i].x & 0xff;

&0xff is not required

Sure, will drop those.

Quoted 3 lines

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

Quoted 2 lines
drivers/video/hdmi.c +2 -0
+		*ptr++ = frame->display_primaries[i].x >> 8;
+		*ptr++ = frame->display_primaries[i].y & 0xff;

&0xff is not required, applicable for all below

Sure. Will modify this.

Quoted 69 lines

drivers/video/hdmi.c ssize_t hdmi_vendor_infoframe_pack(struct

Quoted 30 lines
drivers/video/hdmi.c +26 -0
+		*ptr++ = frame->display_primaries[i].y >> 8;
+	}
+
+	*ptr++ = frame->white_point.x & 0xff;
+	*ptr++ = frame->white_point.x >> 8;
+
+	*ptr++ = frame->white_point.y & 0xff;
+	*ptr++ = frame->white_point.y >> 8;
+
+	*ptr++ = frame->max_mastering_display_luminance & 0xff;
+	*ptr++ = frame->max_mastering_display_luminance >> 8;
+
+	*ptr++ = frame->min_mastering_display_luminance & 0xff;
+	*ptr++ = frame->min_mastering_display_luminance >> 8;
+
+	*ptr++ = frame->max_cll & 0xff;
+	*ptr++ = frame->max_cll >> 8;
+
+	*ptr++ = frame->max_fall & 0xff;
+	*ptr++ = frame->max_fall >> 8;
+
+	hdmi_infoframe_set_checksum(buffer, length);
+
+	return length;
+}
+
  /*
   * hdmi_vendor_any_infoframe_check() - check a vendor infoframe
   */
@@ -806,6 +893,9 @@ ssize_t hdmi_vendor_infoframe_pack(struct

hdmi_vendor_infoframe *frame,

drivers/video/hdmi.c static const char *hdmi_infoframe_type_get_name(enum

Quoted 10 lines
drivers/video/hdmi.c +3 -0
  	case HDMI_INFOFRAME_TYPE_AVI:
  		length = hdmi_avi_infoframe_pack(&frame->avi, buffer, size);
  		break;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		length = hdmi_drm_infoframe_pack(&frame->drm, buffer, size);
+		break;
  	case HDMI_INFOFRAME_TYPE_SPD:
  		length = hdmi_spd_infoframe_pack(&frame->spd, buffer, size);
  		break;
@@ -838,6 +928,8 @@ static const char *hdmi_infoframe_type_get_name(enum

hdmi_infoframe_type type)

drivers/video/hdmi.c static void hdmi_audio_infoframe_log(const char

Quoted 9 lines
drivers/video/hdmi.c +2 -0
  		return "Source Product Description (SPD)";
  	case HDMI_INFOFRAME_TYPE_AUDIO:
  		return "Audio";
+	case HDMI_INFOFRAME_TYPE_DRM:
+		return "Dynamic Range and Mastering";
  	}
  	return "Reserved";
  }
@@ -1284,6 +1376,40 @@ static void hdmi_audio_infoframe_log(const char

*level,

Quoted 6 lines
drivers/video/hdmi.c +3 -0
  			frame->downmix_inhibit ? "Yes" : "No");
  }
 
+/**
+ * hdmi_drm_infoframe_log() - log info of HDMI DRM infoframe
+ * @level: logging level

drivers/video/hdmi.c static void hdmi_audio_infoframe_log(const char *level, · line 1392

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+ * @dev: device
+ * @frame: HDMI DRM infoframe
+ */
+static void hdmi_drm_infoframe_log(const char *level,
+				   struct device *dev,
+				   const struct hdmi_drm_infoframe *frame) {
+	int i;
+
+	hdmi_infoframe_log_header(level, dev,
+			(struct hdmi_any_infoframe *)frame);

Alignment with above '('

Quoted 16 lines
Quoted 5 lines
drivers/video/hdmi.c +5 -0
+	hdmi_log("length: %d\n", frame->length);
+	hdmi_log("metadata type: %d\n", frame->metadata_type);
+	hdmi_log("eotf: %d\n", frame->eotf);
+	for (i = 0; i < 3; i++) {
+		hdmi_log("x[%d]: %d\n", i, frame->display_primaries[i].x);

drivers/video/hdmi.c static void hdmi_audio_infoframe_log(const char *level, · line 1407

Quoted 10 lines
drivers/video/hdmi.c +10 -0
+		hdmi_log("y[%d]: %d\n", i, frame->display_primaries[i].y);
+	}
+
+	hdmi_log("white point x: %d\n", frame->white_point.x);
+	hdmi_log("white point y: %d\n", frame->white_point.y);
+
+	hdmi_log("max_mastering_display_luminance: %d\n",
+			frame->max_mastering_display_luminance);
+	hdmi_log("min_mastering_display_luminance: %d\n",
+			frame->min_mastering_display_luminance);

Alignment for these 2 lines above

Will fix this.

Quoted 87 lines

include/linux/hdmi.h ssize_t hdmi_vendor_infoframe_pack_only(const struct

Quoted 78 lines
drivers/video/hdmi.c +7 -0
+
+	hdmi_log("max_cll: %d\n", frame->max_cll);
+	hdmi_log("max_fall: %d\n", frame->max_fall); }
+
  static const char *
  hdmi_3d_structure_get_name(enum hdmi_3d_structure s3d_struct)
  {
@@ -1372,6 +1498,9 @@ void hdmi_infoframe_log(const char *level,
  	case HDMI_INFOFRAME_TYPE_VENDOR:
  		hdmi_vendor_any_infoframe_log(level, dev, &frame->vendor);
  		break;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		hdmi_drm_infoframe_log(level, dev, &frame->drm);
+		break;
  	}
  }
  EXPORT_SYMBOL(hdmi_infoframe_log);
include/drm/drm_edid.h index renamed from include/drm/drm_edid.h +0 -0

9d3b5b9..973e43e 100644

include/drm/drm_edid.h +4 -0
@@ -370,6 +370,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,
+				    void *hdr_source_metadata);
+
  /**
   * drm_eld_mnl - Get ELD monitor name length in bytes.
   * @eld: pointer to an eld memory structure with mnl set diff --git

a/include/linux/hdmi.h b/include/linux/hdmi.h index a065194..33243b2 100644

include/linux/hdmi.h +21 -0
@@ -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,32 @@ struct hdmi_avi_infoframe {
  	unsigned short right_bar;
  };
 
+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 {
+		uint16_t x, y;
+	} display_primaries[3];
+	struct {
+		uint16_t x, y;
+	} white_point;
+	uint16_t max_mastering_display_luminance;
+	uint16_t min_mastering_display_luminance;
+	uint16_t max_fall;
+	uint16_t max_cll;
+	uint16_t min_cll;
+};
+
  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);
 
  enum hdmi_spd_sdi {
  	HDMI_SPD_SDI_UNKNOWN,
@@ -365,6 +386,7 @@ ssize_t hdmi_vendor_infoframe_pack_only(const struct

hdmi_vendor_infoframe *fram

include/linux/hdmi.h ssize_t hdmi_vendor_infoframe_pack_only(const struct hdmi_vendor_infoframe *fram · line 390

Quoted 5 lines
include/linux/hdmi.h +1 -0
  	struct hdmi_spd_infoframe spd;
  	union hdmi_vendor_any_infoframe vendor;
  	struct hdmi_audio_infoframe audio;
+	struct hdmi_drm_infoframe drm;
  };

With the minor issues pointed above fixed, feel free to use:

Quoted 1 line

Thanks Shashank for the review.

Regards,
Uma Shankar

Quoted 5 lines

- Shashank

Quoted 3 lines
include/linux/hdmi.h +0 -0
  ssize_t hdmi_infoframe_pack(union hdmi_infoframe *frame, void
 *buffer,

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

#24 lore raw

PATCH v5 7/13 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.

---
 drivers/gpu/drm/i915/intel_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_hdmi.c | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 58483f8..a5ee124 100644
@@ -1037,6 +1037,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 +33 -0
index 0952475..ea7afa0 100644
@@ -555,6 +555,7 @@ static u32 hsw_infoframes_enabled(struct intel_encoder *encoder,
 	HDMI_INFOFRAME_TYPE_AVI,
 	HDMI_INFOFRAME_TYPE_SPD,
 	HDMI_INFOFRAME_TYPE_VENDOR,
+	HDMI_INFOFRAME_TYPE_DRM,
 };
 
 u32 intel_hdmi_infoframe_enable(unsigned int type)
@@ -777,6 +778,30 @@ void intel_read_infoframe(struct intel_encoder *encoder,
 	return true;
 }
 
+static bool
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
+				  struct drm_connector_state *conn_state)
+{
+	struct hdmi_drm_infoframe *frame = &crtc_state->infoframes.drm.drm;
+	struct hdr_static_metadata *hdr_metadata;
+	int ret;
+
+	hdr_metadata = (struct hdr_static_metadata *)
+			conn_state->hdr_output_metadata_blob_ptr->data;
+
+	ret = drm_hdmi_infoframe_set_hdr_metadata(frame, hdr_metadata);
+	if (ret < 0) {
+		DRM_ERROR("couldn't set HDR metadata in infoframe\n");
+		return false;
+	}
+
+	crtc_state->infoframes.enable |=
+		intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_DRM);
+
+	return true;
+}
+
 static void g4x_set_infoframes(struct intel_encoder *encoder,
 			       bool enable,
 			       const struct intel_crtc_state *crtc_state,
@@ -1175,6 +1200,9 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
 	intel_write_infoframe(encoder, crtc_state,
 			      HDMI_INFOFRAME_TYPE_VENDOR,
 			      &crtc_state->infoframes.hdmi);
+	intel_write_infoframe(encoder, crtc_state,
+			      HDMI_INFOFRAME_TYPE_DRM,
+			      &crtc_state->infoframes.drm);
 }
 
 void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
@@ -2381,6 +2409,11 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
 		return -EINVAL;
 	}
 
+	if (!intel_hdmi_compute_drm_infoframe(encoder, pipe_config, conn_state)) {
+		DRM_DEBUG_KMS("bad DRM infoframe\n");
+		return -EINVAL;
+	}
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

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

Re: [v5 07/13] drm/i915: Write HDR infoframe and send to panel

Quoted 46 lines · 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.

---
  drivers/gpu/drm/i915/intel_drv.h  |  1 +
  drivers/gpu/drm/i915/intel_hdmi.c | 33 +++++++++++++++++++++++++++++++++
  2 files changed, 34 insertions(+)
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 58483f8..a5ee124 100644
@@ -1037,6 +1037,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 +1 -0
index 0952475..ea7afa0 100644
@@ -555,6 +555,7 @@ static u32 hsw_infoframes_enabled(struct intel_encoder *encoder,
  	HDMI_INFOFRAME_TYPE_AVI,
  	HDMI_INFOFRAME_TYPE_SPD,
  	HDMI_INFOFRAME_TYPE_VENDOR,
+	HDMI_INFOFRAME_TYPE_DRM,
  };
 
  u32 intel_hdmi_infoframe_enable(unsigned int type)
@@ -777,6 +778,30 @@ void intel_read_infoframe(struct intel_encoder *encoder,
  	return true;
  }

drivers/gpu/drm/i915/intel_hdmi.c void intel_read_infoframe(struct intel_encoder *encoder, · line 789

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +9 -0
 
+static bool
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
+				  struct drm_connector_state *conn_state)
+{
+	struct hdmi_drm_infoframe *frame = &crtc_state->infoframes.drm.drm;
+	struct hdr_static_metadata *hdr_metadata;
+	int ret;
+

Don't we need a GEN/monitor check before going ahead with HDR metadata ?

- Shashank

Quoted 30 lines
drivers/gpu/drm/i915/intel_hdmi.c +18 -0
+	hdr_metadata = (struct hdr_static_metadata *)
+			conn_state->hdr_output_metadata_blob_ptr->data;
+
+	ret = drm_hdmi_infoframe_set_hdr_metadata(frame, hdr_metadata);
+	if (ret < 0) {
+		DRM_ERROR("couldn't set HDR metadata in infoframe\n");
+		return false;
+	}
+
+	crtc_state->infoframes.enable |=
+		intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_DRM);
+
+	return true;
+}
+
  static void g4x_set_infoframes(struct intel_encoder *encoder,
  			       bool enable,
  			       const struct intel_crtc_state *crtc_state,
@@ -1175,6 +1200,9 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
  	intel_write_infoframe(encoder, crtc_state,
  			      HDMI_INFOFRAME_TYPE_VENDOR,
  			      &crtc_state->infoframes.hdmi);
+	intel_write_infoframe(encoder, crtc_state,
+			      HDMI_INFOFRAME_TYPE_DRM,
+			      &crtc_state->infoframes.drm);
  }
 
  void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
@@ -2381,6 +2409,11 @@ int intel_hdmi_compute_config(struct intel_encoder *encoder,
  		return -EINVAL;

drivers/gpu/drm/i915/intel_hdmi.c int intel_hdmi_compute_config(struct intel_encoder *encoder, · line 2419

Quoted 10 lines
drivers/gpu/drm/i915/intel_hdmi.c +5 -0
  	}
 
+	if (!intel_hdmi_compute_drm_infoframe(encoder, pipe_config, conn_state)) {
+		DRM_DEBUG_KMS("bad DRM infoframe\n");
+		return -EINVAL;
+	}
+
  	return 0;
  }
 

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

#26 lore raw

RE: [v5 07/13] drm/i915: Write HDR infoframe and send to panel

Quoted 63 lines

-----Original Message-----
From: Sharma, Shashank
Sent: Friday, March 15, 2019 4:38 PM
To: Shankar, Uma <[email protected]>; [email protected]; dri- [email protected]
Cc: Lankhorst, Maarten <[email protected]>; Syrjala, Ville <[email protected]>; [email protected]; [email protected]; [email protected]
Subject: Re: [v5 07/13] drm/i915: Write HDR infoframe and send to panel

drivers/gpu/drm/i915/intel_hdmi.c static u32 hsw_infoframes_enabled(struct intel_encoder

Quoted 37 lines · 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.

---
  drivers/gpu/drm/i915/intel_drv.h  |  1 +
  drivers/gpu/drm/i915/intel_hdmi.c | 33 +++++++++++++++++++++++++++++++++
  2 files changed, 34 insertions(+)
drivers/gpu/drm/i915/intel_drv.h +1 -0
index 58483f8..a5ee124 100644
@@ -1037,6 +1037,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 +0 -0
index 0952475..ea7afa0 100644
@@ -555,6 +555,7 @@ static u32 hsw_infoframes_enabled(struct intel_encoder

*encoder,

Quoted 11 lines
drivers/gpu/drm/i915/intel_hdmi.c +1 -0
  	HDMI_INFOFRAME_TYPE_AVI,
  	HDMI_INFOFRAME_TYPE_SPD,
  	HDMI_INFOFRAME_TYPE_VENDOR,
+	HDMI_INFOFRAME_TYPE_DRM,
  };
 
  u32 intel_hdmi_infoframe_enable(unsigned int type) @@ -777,6 +778,30

@@ void intel_read_infoframe(struct intel_encoder *encoder,
return true;
}

Quoted 10 lines

drivers/gpu/drm/i915/intel_hdmi.c void intel_read_infoframe(struct intel_encoder *encoder, · line 789

Quoted 8 lines
drivers/gpu/drm/i915/intel_hdmi.c +8 -0
+static bool
+intel_hdmi_compute_drm_infoframe(struct intel_encoder *encoder,
+				  struct intel_crtc_state *crtc_state,
+				  struct drm_connector_state *conn_state) {
+	struct hdmi_drm_infoframe *frame = &crtc_state->infoframes.drm.drm;
+	struct hdr_static_metadata *hdr_metadata;
+	int ret;
+

Don't we need a GEN/monitor check before going ahead with HDR metadata ?

Sure, will add that check.

Regards,
Uma Shankar

Quoted 35 lines

- Shashank

Quoted 28 lines
drivers/gpu/drm/i915/intel_hdmi.c +19 -0
+	hdr_metadata = (struct hdr_static_metadata *)
+			conn_state->hdr_output_metadata_blob_ptr->data;
+
+	ret = drm_hdmi_infoframe_set_hdr_metadata(frame, hdr_metadata);
+	if (ret < 0) {
+		DRM_ERROR("couldn't set HDR metadata in infoframe\n");
+		return false;
+	}
+
+	crtc_state->infoframes.enable |=
+		intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_DRM);
+
+	return true;
+}
+
  static void g4x_set_infoframes(struct intel_encoder *encoder,
  			       bool enable,
  			       const struct intel_crtc_state *crtc_state, @@ -1175,6
+1200,9 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
  	intel_write_infoframe(encoder, crtc_state,
  			      HDMI_INFOFRAME_TYPE_VENDOR,
  			      &crtc_state->infoframes.hdmi);
+	intel_write_infoframe(encoder, crtc_state,
+			      HDMI_INFOFRAME_TYPE_DRM,
+			      &crtc_state->infoframes.drm);
  }
 
  void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi,
Quoted 1 line

bool enable) @@ -2381,6 +2409,11 @@ int intel_hdmi_compute_config(struct

intel_encoder *encoder,

Quoted 3 lines
  		return -EINVAL;
  	}
Quoted 8 lines

drivers/gpu/drm/i915/intel_hdmi.c int intel_hdmi_compute_config(struct intel_encoder *encoder, · line 2418

Quoted 8 lines
drivers/gpu/drm/i915/intel_hdmi.c +5 -0
+	if (!intel_hdmi_compute_drm_infoframe(encoder, pipe_config, conn_state)) {
+		DRM_DEBUG_KMS("bad DRM infoframe\n");
+		return -EINVAL;
+	}
+
  	return 0;
  }

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

#27 lore raw

PATCH v5 8/13 drm/i915: [DO NOT MERGE] hack for glk board outputs

In reply to Uma Shankar

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

This is to limit PORT C on GLK to drive only
HDMI. Not sure if this is mandatory, this is just to test HDR on GLK HDMI.

---
 drivers/gpu/drm/i915/intel_bios.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/i915/intel_bios.c +7 -0
index b508d8a..a2fd93ab 100644
@@ -1380,6 +1380,13 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
 		is_hdmi = false;
 	}
 
+	if (IS_GEMINILAKE(dev_priv) && port == PORT_C) {
+		is_hdmi = true;
+		is_dvi = true;
+		is_dp = false;
+		is_edp = false;
+	}
+
 	info->supports_dvi = is_dvi;
 	info->supports_hdmi = is_hdmi;
 	info->supports_dp = is_dp;
Signature · 6 lines
1.9.1

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

PATCH v5 9/13 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 | 4 ++--
 include/linux/hdmi.h       | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -2
index 49f8340..4cd22e8 100644
@@ -3864,8 +3864,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 33243b2..ad652e6 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

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

Re: [v5 09/13] drm/i915: Add HLG EOTF

Quoted 41 lines · 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 | 4 ++--
  include/linux/hdmi.h       | 1 +
  2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -2
index 49f8340..4cd22e8 100644
@@ -3864,8 +3864,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 +0 -0
index 33243b2..ad652e6 100644

include/linux/hdmi.h enum hdmi_eotf { · line 166

Quoted 6 lines
include/linux/hdmi.h +1 -0
@@ -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,
  };
 

Looks good to me,

Feel free to use: Reviewed-by: Shashank Sharma <[email protected]>

include/linux/hdmi.h enum hdmi_eotf { · line 167

Quoted 1 line
include/linux/hdmi.h +0 -0
  struct hdmi_avi_infoframe {

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

#30 lore raw

PATCH v5 10/13 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.

---
 drivers/gpu/drm/i915/i915_reg.h   |  4 ++++
 drivers/gpu/drm/i915/intel_hdmi.c | 18 +++++++++++++-----
 2 files changed, 17 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 6943e08..cb3cdd5 100644
@@ -4665,6 +4665,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
@@ -8111,6 +8112,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
@@ -8124,6 +8126,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
@@ -8149,6 +8152,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 +13 -5
index ea7afa0..0a6d4b7 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;
@@ -545,7 +549,8 @@ static u32 hsw_infoframes_enabled(struct intel_encoder *encoder,
 
 	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);
+		      VIDEO_DIP_ENABLE_GMP_HSW | VIDEO_DIP_ENABLE_SPD_HSW |
+		      VIDEO_DIP_ENABLE_DRM_GLK);
 }
 
 static const u8 infoframe_type_to_idx[] = {
@@ -1177,7 +1182,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);
@@ -1200,9 +1206,11 @@ static void hsw_set_infoframes(struct intel_encoder *encoder,
 	intel_write_infoframe(encoder, crtc_state,
 			      HDMI_INFOFRAME_TYPE_VENDOR,
 			      &crtc_state->infoframes.hdmi);
-	intel_write_infoframe(encoder, crtc_state,
-			      HDMI_INFOFRAME_TYPE_DRM,
-			      &crtc_state->infoframes.drm);
+	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);
 }
 
 void intel_dp_dual_mode_set_tmds_output(struct intel_hdmi *hdmi, bool enable)
Signature · 6 lines
1.9.1

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

PATCH v5 11/13 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.

---
 drivers/gpu/drm/i915/intel_atomic.c | 15 ++++++++++++++-
 drivers/gpu/drm/i915/intel_hdmi.c   |  4 ++++
 2 files changed, 18 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_atomic.c +14 -1
index da419e1..8d5dd41 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,10 @@ 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 +4 -0
index 0a6d4b7..03a7761 100644
@@ -792,6 +792,10 @@ void intel_read_infoframe(struct intel_encoder *encoder,
 	struct hdr_static_metadata *hdr_metadata;
 	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_static_metadata *)
 			conn_state->hdr_output_metadata_blob_ptr->data;
 
Signature · 6 lines
1.9.1

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

PATCH v5 12/13 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 7e3b4e8..2f2d9ae 100644
@@ -3566,6 +3566,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);
 
@@ -3575,6 +3579,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
#33 lore raw

PATCH v5 13/13 video/hdmi: Add const variants for drm infoframe

In reply to Uma Shankar

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

---
 drivers/video/hdmi.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++--
 include/linux/hdmi.h |  5 +++++
 2 files changed, 66 insertions(+), 2 deletions(-)
drivers/video/hdmi.c +61 -2
index 7ab8086..b1b21ae 100644
@@ -668,6 +668,30 @@ int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame)
 }
 EXPORT_SYMBOL(hdmi_drm_infoframe_init);
 
+static int hdmi_drm_infoframe_check_only(const struct hdmi_drm_infoframe *frame)
+{
+	if (frame->type != HDMI_INFOFRAME_TYPE_DRM ||
+	    frame->version != 1)
+		return -EINVAL;
+
+	return 0;
+}
+
+/**
+ * hdmi_drm_infoframe_check() - check a HDMI DRM infoframe
+ * @frame: HDMI DRM infoframe
+ *
+ * Validates that the infoframe is consistent and updates derived fields
+ * (eg. length) based on other fields.
+ *
+ * Returns 0 on success or a negative error code on failure.
+ */
+int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame)
+{
+	return hdmi_drm_infoframe_check_only(frame);
+}
+EXPORT_SYMBOL(hdmi_drm_infoframe_check);
+
 /**
  * hdmi_drm_infoframe_pack() - write HDMI DRM infoframe to binary buffer
  * @frame: HDMI DRM infoframe
@@ -682,8 +706,8 @@ int hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame)
  * Returns the number of bytes packed into the binary buffer or a negative
  * error code on failure.
  */
-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)
 {
 	u8 *ptr = buffer;
 	size_t length;
@@ -736,6 +760,37 @@ ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
 
 	return length;
 }
+EXPORT_SYMBOL(hdmi_drm_infoframe_pack_only);
+
+/**
+ * hdmi_drm_infoframe_pack() - check a HDMI DRM infoframe,
+ *                             and write it to binary buffer
+ * @frame: HDMI DRM infoframe
+ * @buffer: destination buffer
+ * @size: size of buffer
+ *
+ * Validates that the infoframe is consistent and updates derived fields
+ * (eg. length) based on other fields, after which it packs the information
+ * contained in the @frame structure into a binary representation that
+ * can be written into the corresponding controller registers. This function
+ * also computes the checksum as required by section 5.3.5 of the HDMI 1.4
+ * specification.
+ *
+ * Returns the number of bytes packed into the binary buffer or a negative
+ * error code on failure.
+ */
+ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame,
+				void *buffer, size_t size)
+{
+	int ret;
+
+	ret = hdmi_drm_infoframe_check(frame);
+	if (ret)
+		return ret;
+
+	return hdmi_drm_infoframe_pack_only(frame, buffer, size);
+}
+EXPORT_SYMBOL(hdmi_drm_infoframe_pack);
 
 /*
  * hdmi_vendor_any_infoframe_check() - check a vendor infoframe
@@ -845,6 +900,10 @@ ssize_t hdmi_drm_infoframe_pack(struct hdmi_drm_infoframe *frame, void *buffer,
 		length = hdmi_avi_infoframe_pack_only(&frame->avi,
 						      buffer, size);
 		break;
+	case HDMI_INFOFRAME_TYPE_DRM:
+		length = hdmi_drm_infoframe_pack_only(&frame->drm,
+						      buffer, size);
+		break;
 	case HDMI_INFOFRAME_TYPE_SPD:
 		length = hdmi_spd_infoframe_pack_only(&frame->spd,
 						      buffer, size);
include/linux/hdmi.h +5 -0
index ad652e6..fbeb06e3 100644
@@ -213,6 +213,11 @@ 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,
Signature · 6 lines
1.9.1

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

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

In reply to Uma Shankar
== Series Details ==

== Series Details ==

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

== Summary ==

CI Bug Log - changes from CI_DRM_5730 -> Patchwork_12435
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes introduced in Patchwork_12435, 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/5/mbox/

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

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

### 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_12435 that come from known issues:

### IGT changes ###

#### Issues hit ####

* igt@gem_ctx_create@basic-files:
- fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106

* igt@gem_exec_basic@gtt-bsd2:
- fi-byt-clapper: NOTRUN -> SKIP [fdo#109271] +57

* igt@gem_exec_basic@readonly-bsd1:
- fi-snb-2520m: NOTRUN -> SKIP [fdo#109271] +57

* igt@kms_busy@basic-flip-b:
- fi-gdg-551: NOTRUN -> FAIL [fdo#103182]

* igt@kms_busy@basic-flip-c:

    - fi-byt-clapper:     NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-gdg-551:         NOTRUN -> SKIP [fdo#109271] / [fdo#109278]
    - fi-snb-2520m:       NOTRUN -> SKIP [fdo#109271] / [fdo#109278]

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

* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
- fi-byt-clapper: NOTRUN -> FAIL [fdo#103191] / [fdo#107362] +1

* igt@runner@aborted:
- fi-snb-2600: NOTRUN -> FAIL [fdo#108929]

#### Possible fixes ####

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

[fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
[fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#108929]: https://bugs.freedesktop.org/show_bug.cgi?id=108929
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720

Participating hosts (41 -> 39)
------------------------------

Additional (4): fi-byt-clapper fi-gdg-551 fi-snb-2520m fi-bsw-n3050
Missing (6): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-bsw-cyan fi-pnv-d510 fi-bdw-samus

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

* Linux: CI_DRM_5730 -> Patchwork_12435

CI_DRM_5730: 24962f1aef49db97e09c7942157a2dbc973b546b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4878: 478615b1edba88559386ba80ccbf0f035f3360a9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12435: 2c84b2fe5c713e241cb579ae04e834c163571dbb @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

2c84b2fe5c71 video/hdmi: Add const variants for drm infoframe 3d5cb1bb27ca drm/i915: Set Infoframe for non modeset case for HDR b8f04b68ec8f drm/i915:Enabled Modeset when HDR Infoframe changes 2d2578db31c3 drm/i915: Enable infoframes on GLK+ for HDR 96858c0b173a drm/i915: Add HLG EOTF
dd6bc359799a drm/i915: [DO NOT MERGE] hack for glk board outputs c65e9f436e86 drm/i915: Write HDR infoframe and send to panel 149de61e2c39 drm: Enable HDR infoframe support
98de918105db drm: Implement HDR output metadata set and get property handling aa78bb330fcc drm/i915: Attach HDR metadata property to connector 5ef8cb0e93e9 drm: Parse Colorimetry data block from EDID fe440823e535 drm: Parse HDR metadata info from EDID
b2d03105049d drm: Add HDR source metadata property

== Logs ==

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