All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
@ 2019-10-04 14:19 Ville Syrjala
  2019-10-04 14:19 ` [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic() Ville Syrjala
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Ville Syrjala @ 2019-10-04 14:19 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Wayne Lin

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

drm_get_cea_aspect_ratio() is not used outside drm_edid.c.
Make it static.

Cc: Wayne Lin <waynelin@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 10 +---------
 include/drm/drm_edid.h     |  1 -
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 0552175313cb..3df8267adab9 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3205,18 +3205,10 @@ static bool drm_valid_cea_vic(u8 vic)
 	return vic > 0 && vic < ARRAY_SIZE(edid_cea_modes);
 }
 
-/**
- * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
- * the input VIC from the CEA mode list
- * @video_code: ID given to each of the CEA modes
- *
- * Returns picture aspect ratio
- */
-enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
+static enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
 {
 	return edid_cea_modes[video_code].picture_aspect_ratio;
 }
-EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
 
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index b9719418c3d2..efce675abf07 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -481,7 +481,6 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
 int drm_add_override_edid_modes(struct drm_connector *connector);
 
 u8 drm_match_cea_mode(const struct drm_display_mode *to_match);
-enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);
 bool drm_detect_hdmi_monitor(struct edid *edid);
 bool drm_detect_monitor_audio(struct edid *edid);
 enum hdmi_quantization_range
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic()
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
@ 2019-10-04 14:19 ` Ville Syrjala
  2019-10-18 12:51   ` Shankar, Uma
  2019-10-04 14:19 ` [PATCH 3/4] drm/edid: Fix HDMI VIC handling Ville Syrjala
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjala @ 2019-10-04 14:19 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Wayne Lin

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Extract the logic to compute the final CEA VIC to a small helper.
We'll reorder it a bit to make future modifications more
straightforward. No function changes.

Cc: Wayne Lin <waynelin@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 53 +++++++++++++++++++++-----------------
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 3df8267adab9..495b7fb4d9ef 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5160,6 +5160,35 @@ drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
 }
 EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
 
+static u8 drm_mode_cea_vic(struct drm_connector *connector,
+			   const struct drm_display_mode *mode)
+{
+	u8 vendor_if_vic = drm_match_hdmi_mode(mode);
+	bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
+	u8 vic;
+
+	/*
+	 * HDMI spec says if a mode is found in HDMI 1.4b 4K modes
+	 * we should send its VIC in vendor infoframes, else send the
+	 * VIC in AVI infoframes. Lets check if this mode is present in
+	 * HDMI 1.4b 4K modes
+	 */
+	if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
+		return 0;
+
+	vic = drm_match_cea_mode(mode);
+
+	/*
+	 * HDMI 1.4 VIC range: 1 <= VIC <= 64 (CEA-861-D) but
+	 * HDMI 2.0 VIC range: 1 <= VIC <= 107 (CEA-861-F). So we
+	 * have to make sure we dont break HDMI 1.4 sinks.
+	 */
+	if (!is_hdmi2_sink(connector) && vic > 64)
+		return 0;
+
+	return vic;
+}
+
 /**
  * drm_hdmi_avi_infoframe_from_display_mode() - fill an HDMI AVI infoframe with
  *                                              data from a DRM display mode
@@ -5187,29 +5216,7 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
 		frame->pixel_repeat = 1;
 
-	frame->video_code = drm_match_cea_mode(mode);
-
-	/*
-	 * HDMI 1.4 VIC range: 1 <= VIC <= 64 (CEA-861-D) but
-	 * HDMI 2.0 VIC range: 1 <= VIC <= 107 (CEA-861-F). So we
-	 * have to make sure we dont break HDMI 1.4 sinks.
-	 */
-	if (!is_hdmi2_sink(connector) && frame->video_code > 64)
-		frame->video_code = 0;
-
-	/*
-	 * HDMI spec says if a mode is found in HDMI 1.4b 4K modes
-	 * we should send its VIC in vendor infoframes, else send the
-	 * VIC in AVI infoframes. Lets check if this mode is present in
-	 * HDMI 1.4b 4K modes
-	 */
-	if (frame->video_code) {
-		u8 vendor_if_vic = drm_match_hdmi_mode(mode);
-		bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
-
-		if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
-			frame->video_code = 0;
-	}
+	frame->video_code = drm_mode_cea_vic(connector, mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
 
-- 
2.21.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 3/4] drm/edid: Fix HDMI VIC handling
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
  2019-10-04 14:19 ` [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic() Ville Syrjala
@ 2019-10-04 14:19 ` Ville Syrjala
  2019-10-18 16:02   ` [Intel-gfx] " Shankar, Uma
  2019-10-04 14:19 ` [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP) Ville Syrjala
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjala @ 2019-10-04 14:19 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Wayne Lin

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Extract drm_mode_hdmi_vic() to correctly calculate the final HDMI
VIC for us. Currently this is being done a bit differently between
the AVI and HDMI infoframes. Let's get both to agree on this.

We need to allow the case where a mode is both 3D and has a HDMI
VIC. Currently we'll just refuse to generate the HDMI infoframe when
we really should be setting HDMI VIC to 0 and instead enabling 3D
stereo signalling.

If the sink doesn't even support the HDMI infoframe we should
not be picking the HDMI VIC in favor of the CEA VIC, because then
we'll end up not sending either VIC in the end.

Cc: Wayne Lin <waynelin@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 495b7fb4d9ef..c7f9f7ca75a2 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5160,11 +5160,25 @@ drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
 }
 EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
 
+static u8 drm_mode_hdmi_vic(struct drm_connector *connector,
+			    const struct drm_display_mode *mode)
+{
+	bool has_hdmi_infoframe = connector ?
+		connector->display_info.has_hdmi_infoframe : false;
+
+	if (!has_hdmi_infoframe)
+		return 0;
+
+	/* No HDMI VIC when signalling 3D video format */
+	if (mode->flags & DRM_MODE_FLAG_3D_MASK)
+		return 0;
+
+	return drm_match_hdmi_mode(mode);
+}
+
 static u8 drm_mode_cea_vic(struct drm_connector *connector,
 			   const struct drm_display_mode *mode)
 {
-	u8 vendor_if_vic = drm_match_hdmi_mode(mode);
-	bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
 	u8 vic;
 
 	/*
@@ -5173,7 +5187,7 @@ static u8 drm_mode_cea_vic(struct drm_connector *connector,
 	 * VIC in AVI infoframes. Lets check if this mode is present in
 	 * HDMI 1.4b 4K modes
 	 */
-	if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
+	if (drm_mode_hdmi_vic(connector, mode))
 		return 0;
 
 	vic = drm_match_cea_mode(mode);
@@ -5433,8 +5447,6 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
 	bool has_hdmi_infoframe = connector ?
 		connector->display_info.has_hdmi_infoframe : false;
 	int err;
-	u32 s3d_flags;
-	u8 vic;
 
 	if (!frame || !mode)
 		return -EINVAL;
@@ -5442,8 +5454,9 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
 	if (!has_hdmi_infoframe)
 		return -EINVAL;
 
-	vic = drm_match_hdmi_mode(mode);
-	s3d_flags = mode->flags & DRM_MODE_FLAG_3D_MASK;
+	err = hdmi_vendor_infoframe_init(frame);
+	if (err < 0)
+		return err;
 
 	/*
 	 * Even if it's not absolutely necessary to send the infoframe
@@ -5454,15 +5467,7 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
 	 * mode if the source simply stops sending the infoframe when
 	 * it wants to switch from 3D to 2D.
 	 */
-
-	if (vic && s3d_flags)
-		return -EINVAL;
-
-	err = hdmi_vendor_infoframe_init(frame);
-	if (err < 0)
-		return err;
-
-	frame->vic = vic;
+	frame->vic = drm_mode_hdmi_vic(connector, mode);
 	frame->s3d_struct = s3d_structure_from_display_mode(mode);
 
 	return 0;
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
  2019-10-04 14:19 ` [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic() Ville Syrjala
  2019-10-04 14:19 ` [PATCH 3/4] drm/edid: Fix HDMI VIC handling Ville Syrjala
@ 2019-10-04 14:19 ` Ville Syrjala
  2019-10-14  9:27   ` Lin, Wayne
  2019-10-04 18:15 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Patchwork
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjala @ 2019-10-04 14:19 UTC (permalink / raw)
  To: dri-devel; +Cc: intel-gfx, Wayne Lin

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

I think this should provide most of necessary logic for
adding aspecr ratios to the HDMI 4k modes.

Cc: Wayne Lin <waynelin@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++++++++++++------
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index c7f9f7ca75a2..c76814edc784 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
 	return edid_cea_modes[video_code].picture_aspect_ratio;
 }
 
+static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8 video_code)
+{
+	return edid_4k_modes[video_code].picture_aspect_ratio;
+}
+
 /*
  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor
  * specific block).
@@ -3236,6 +3241,9 @@ static u8 drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode *to_
 	if (!to_match->clock)
 		return 0;
 
+	if (to_match->picture_aspect_ratio)
+		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
+
 	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
 		const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic];
 		unsigned int clock1, clock2;
@@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct drm_display_mode *to_match)
 	if (!to_match->clock)
 		return 0;
 
+	if (to_match->picture_aspect_ratio)
+		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
+
 	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
 		const struct drm_display_mode *hdmi_mode = &edid_4k_modes[vic];
 		unsigned int clock1, clock2;
@@ -5218,6 +5229,7 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 					 const struct drm_display_mode *mode)
 {
 	enum hdmi_picture_aspect picture_aspect;
+	u8 vic, hdmi_vic;
 	int err;
 
 	if (!frame || !mode)
@@ -5230,7 +5242,8 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
 		frame->pixel_repeat = 1;
 
-	frame->video_code = drm_mode_cea_vic(connector, mode);
+	vic = drm_mode_cea_vic(connector, mode);
+	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
 
 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
 
@@ -5244,11 +5257,15 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 
 	/*
 	 * Populate picture aspect ratio from either
-	 * user input (if specified) or from the CEA mode list.
+	 * user input (if specified) or from the CEA/HDMI mode lists.
 	 */
 	picture_aspect = mode->picture_aspect_ratio;
-	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
-		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
+	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
+		if (vic)
+			picture_aspect = drm_get_cea_aspect_ratio(vic);
+		else if (hdmi_vic)
+			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
+	}
 
 	/*
 	 * The infoframe can't convey anything but none, 4:3
@@ -5256,12 +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
 	 * we can only satisfy it by specifying the right VIC.
 	 */
 	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
-		if (picture_aspect !=
-		    drm_get_cea_aspect_ratio(frame->video_code))
+		if (vic) {
+			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
+				return -EINVAL;
+		} else if (hdmi_vic) {
+			if (picture_aspect != drm_get_hdmi_aspect_ratio(hdmi_vic))
+				return -EINVAL;
+		} else {
 			return -EINVAL;
+		}
+
 		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
 	}
 
+	frame->video_code = vic;
 	frame->picture_aspect = picture_aspect;
 	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
 	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* ✓ Fi.CI.BAT: success for series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
                   ` (2 preceding siblings ...)
  2019-10-04 14:19 ` [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP) Ville Syrjala
@ 2019-10-04 18:15 ` Patchwork
  2019-10-05  4:58 ` ✗ Fi.CI.IGT: failure " Patchwork
  2019-10-18 12:37 ` [PATCH 1/4] " Shankar, Uma
  5 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-10-04 18:15 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
URL   : https://patchwork.freedesktop.org/series/67600/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_7011 -> Patchwork_14671
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/index.html

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

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

### IGT changes ###

#### Possible fixes ####

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [DMESG-WARN][1] ([fdo#102614]) -> [PASS][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#109644]: https://bugs.freedesktop.org/show_bug.cgi?id=109644
  [fdo#110464]: https://bugs.freedesktop.org/show_bug.cgi?id=110464
  [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850


Participating hosts (52 -> 43)
------------------------------

  Missing    (9): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-byt-clapper fi-icl-u3 fi-icl-y fi-icl-dsi fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7011 -> Patchwork_14671

  CI-20190529: 20190529
  CI_DRM_7011: 7d13733c2a87909eef8bc945ecbf4d47e0b67133 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5212: d17a484b3c22706b2b004ef1577f367d79235e43 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14671: 8fd224dba45f7a3dd151c161891edddd9c24c922 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

8fd224dba45f drm/edid: Prep for HDMI VIC aspect ratio (WIP)
7e309f526aeb drm/edid: Fix HDMI VIC handling
efc34735a84d drm/edid: Extract drm_mode_cea_vic()
e1654b257fee drm/edid: Make drm_get_cea_aspect_ratio() static

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* ✗ Fi.CI.IGT: failure for series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
                   ` (3 preceding siblings ...)
  2019-10-04 18:15 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Patchwork
@ 2019-10-05  4:58 ` Patchwork
  2019-10-18 12:37 ` [PATCH 1/4] " Shankar, Uma
  5 siblings, 0 replies; 17+ messages in thread
From: Patchwork @ 2019-10-05  4:58 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
URL   : https://patchwork.freedesktop.org/series/67600/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7011_full -> Patchwork_14671_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_14671_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_14671_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@gem_ctx_isolation@vcs0-dirty-switch:
    - shard-apl:          [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl2/igt@gem_ctx_isolation@vcs0-dirty-switch.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl1/igt@gem_ctx_isolation@vcs0-dirty-switch.html

  * igt@gem_ctx_isolation@vcs0-s3:
    - shard-kbl:          [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-kbl1/igt@gem_ctx_isolation@vcs0-s3.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-kbl4/igt@gem_ctx_isolation@vcs0-s3.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge:
    - {shard-tglb}:       [PASS][5] -> [INCOMPLETE][6] +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-tglb3/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-tglb5/igt@kms_cursor_edge_walk@pipe-c-128x128-left-edge.html

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render:
    - {shard-tglb}:       NOTRUN -> [INCOMPLETE][7] +1 similar issue
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-tglb5/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-render.html

  
New tests
---------

  New tests have been introduced between CI_DRM_7011_full and Patchwork_14671_full:

### New Piglit tests (1) ###

  * spec@glsl-1.20@execution@tex-miplevel-selection gl2:texture(bias) 3d:
    - Statuses : 1 fail(s)
    - Exec time: [8.64] s

  

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_ctx_isolation@bcs0-s3:
    - shard-apl:          [PASS][8] -> [DMESG-WARN][9] ([fdo#108566]) +3 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl4/igt@gem_ctx_isolation@bcs0-s3.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl6/igt@gem_ctx_isolation@bcs0-s3.html

  * igt@gem_exec_schedule@preempt-contexts-bsd2:
    - shard-iclb:         [PASS][10] -> [SKIP][11] ([fdo#109276]) +12 similar issues
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb2/igt@gem_exec_schedule@preempt-contexts-bsd2.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb3/igt@gem_exec_schedule@preempt-contexts-bsd2.html

  * igt@gem_exec_schedule@reorder-wide-bsd:
    - shard-iclb:         [PASS][12] -> [SKIP][13] ([fdo#111325]) +5 similar issues
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb8/igt@gem_exec_schedule@reorder-wide-bsd.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb2/igt@gem_exec_schedule@reorder-wide-bsd.html

  * igt@gem_userptr_blits@dmabuf-unsync:
    - shard-hsw:          [PASS][14] -> [DMESG-WARN][15] ([fdo#111870])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-hsw1/igt@gem_userptr_blits@dmabuf-unsync.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-hsw6/igt@gem_userptr_blits@dmabuf-unsync.html

  * igt@i915_selftest@live_hangcheck:
    - shard-snb:          [PASS][16] -> [INCOMPLETE][17] ([fdo#105411])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-snb6/igt@i915_selftest@live_hangcheck.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-snb7/igt@i915_selftest@live_hangcheck.html

  * igt@i915_suspend@debugfs-reader:
    - shard-skl:          [PASS][18] -> [INCOMPLETE][19] ([fdo#104108] / [fdo#111867])
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl10/igt@i915_suspend@debugfs-reader.html
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl8/igt@i915_suspend@debugfs-reader.html

  * igt@kms_atomic_transition@plane-all-modeset-transition-fencing:
    - shard-hsw:          [PASS][20] -> [DMESG-WARN][21] ([fdo#102614])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-hsw4/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-hsw5/igt@kms_atomic_transition@plane-all-modeset-transition-fencing.html

  * igt@kms_flip@flip-vs-expired-vblank:
    - shard-skl:          [PASS][22] -> [FAIL][23] ([fdo#105363])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl9/igt@kms_flip@flip-vs-expired-vblank.html
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl7/igt@kms_flip@flip-vs-expired-vblank.html

  * igt@kms_flip@flip-vs-suspend-interruptible:
    - shard-skl:          [PASS][24] -> [INCOMPLETE][25] ([fdo#109507])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl8/igt@kms_flip@flip-vs-suspend-interruptible.html
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl3/igt@kms_flip@flip-vs-suspend-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render:
    - shard-iclb:         [PASS][26] -> [FAIL][27] ([fdo#103167]) +5 similar issues
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb4/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb6/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbc-1p-rte:
    - shard-iclb:         [PASS][28] -> [FAIL][29] ([fdo#103167] / [fdo#110378])
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-rte.html
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb5/igt@kms_frontbuffer_tracking@fbc-1p-rte.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-kbl:          [PASS][30] -> [FAIL][31] ([fdo#103375]) +1 similar issue
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-kbl6/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-kbl1/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min:
    - shard-skl:          [PASS][32] -> [FAIL][33] ([fdo#108145])
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl9/igt@kms_plane_alpha_blend@pipe-b-constant-alpha-min.html

  * igt@kms_plane_lowres@pipe-a-tiling-x:
    - shard-iclb:         [PASS][34] -> [FAIL][35] ([fdo#103166])
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb4/igt@kms_plane_lowres@pipe-a-tiling-x.html
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb1/igt@kms_plane_lowres@pipe-a-tiling-x.html

  * igt@kms_psr@psr2_cursor_plane_move:
    - shard-iclb:         [PASS][36] -> [SKIP][37] ([fdo#109441]) +2 similar issues
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb3/igt@kms_psr@psr2_cursor_plane_move.html

  * igt@kms_setmode@basic:
    - shard-apl:          [PASS][38] -> [FAIL][39] ([fdo#99912])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl4/igt@kms_setmode@basic.html
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl7/igt@kms_setmode@basic.html
    - shard-skl:          [PASS][40] -> [FAIL][41] ([fdo#99912])
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl9/igt@kms_setmode@basic.html
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl7/igt@kms_setmode@basic.html

  * igt@perf_pmu@cpu-hotplug:
    - shard-glk:          [PASS][42] -> [DMESG-WARN][43] ([fdo#107732] / [fdo#111800])
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-glk3/igt@perf_pmu@cpu-hotplug.html
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-glk4/igt@perf_pmu@cpu-hotplug.html

  
#### Possible fixes ####

  * igt@gem_ctx_isolation@bcs0-dirty-create:
    - shard-kbl:          [FAIL][44] -> [PASS][45] +2 similar issues
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-kbl7/igt@gem_ctx_isolation@bcs0-dirty-create.html
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-kbl7/igt@gem_ctx_isolation@bcs0-dirty-create.html

  * igt@gem_ctx_isolation@bcs0-none:
    - shard-skl:          [FAIL][46] -> [PASS][47] +2 similar issues
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl8/igt@gem_ctx_isolation@bcs0-none.html
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl3/igt@gem_ctx_isolation@bcs0-none.html
    - shard-glk:          [FAIL][48] -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-glk4/igt@gem_ctx_isolation@bcs0-none.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-glk1/igt@gem_ctx_isolation@bcs0-none.html

  * igt@gem_ctx_isolation@vcs1-dirty-create:
    - shard-iclb:         [SKIP][50] ([fdo#109276]) -> [PASS][51] +14 similar issues
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb5/igt@gem_ctx_isolation@vcs1-dirty-create.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb4/igt@gem_ctx_isolation@vcs1-dirty-create.html

  * igt@gem_ctx_isolation@vecs0-none:
    - shard-apl:          [FAIL][52] -> [PASS][53]
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl4/igt@gem_ctx_isolation@vecs0-none.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl6/igt@gem_ctx_isolation@vecs0-none.html

  * igt@gem_ctx_shared@exec-single-timeline-bsd:
    - shard-iclb:         [SKIP][54] ([fdo#110841]) -> [PASS][55]
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb4/igt@gem_ctx_shared@exec-single-timeline-bsd.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb6/igt@gem_ctx_shared@exec-single-timeline-bsd.html

  * igt@gem_exec_balancer@busy:
    - shard-apl:          [INCOMPLETE][56] ([fdo#103927]) -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl6/igt@gem_exec_balancer@busy.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl8/igt@gem_exec_balancer@busy.html

  * igt@gem_exec_balancer@smoke:
    - shard-iclb:         [SKIP][58] ([fdo#110854]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb3/igt@gem_exec_balancer@smoke.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb2/igt@gem_exec_balancer@smoke.html

  * igt@gem_exec_schedule@preemptive-hang-bsd:
    - shard-iclb:         [SKIP][60] ([fdo#111325]) -> [PASS][61] +4 similar issues
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb4/igt@gem_exec_schedule@preemptive-hang-bsd.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb8/igt@gem_exec_schedule@preemptive-hang-bsd.html

  * igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy:
    - shard-hsw:          [DMESG-WARN][62] ([fdo#111870]) -> [PASS][63]
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-hsw2/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-hsw1/igt@gem_userptr_blits@map-fixed-invalidate-overlap-busy.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          [DMESG-WARN][64] ([fdo#108566]) -> [PASS][65] +1 similar issue
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-apl6/igt@gem_workarounds@suspend-resume-context.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-apl3/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_suspend@sysfs-reader:
    - {shard-tglb}:       [INCOMPLETE][66] ([fdo#111832]) -> [PASS][67] +1 similar issue
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-tglb4/igt@i915_suspend@sysfs-reader.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-tglb3/igt@i915_suspend@sysfs-reader.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-skl:          [FAIL][68] ([fdo#105363]) -> [PASS][69]
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl10/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-mmap-cpu:
    - {shard-tglb}:       [FAIL][70] ([fdo#103167]) -> [PASS][71] +9 similar issues
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-tglb2/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-mmap-cpu.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-tglb3/igt@kms_frontbuffer_tracking@fbc-rgb565-draw-mmap-cpu.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt:
    - shard-iclb:         [FAIL][72] ([fdo#103167]) -> [PASS][73] +6 similar issues
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt.html

  * igt@kms_plane@plane-panning-bottom-right-pipe-b-planes:
    - {shard-tglb}:       [INCOMPLETE][74] -> [PASS][75] +1 similar issue
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-tglb2/igt@kms_plane@plane-panning-bottom-right-pipe-b-planes.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-tglb4/igt@kms_plane@plane-panning-bottom-right-pipe-b-planes.html

  * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc:
    - shard-skl:          [FAIL][76] ([fdo#108145]) -> [PASS][77]
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-skl4/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-skl8/igt@kms_plane_alpha_blend@pipe-a-coverage-7efc.html

  * igt@kms_psr@psr2_primary_blt:
    - shard-iclb:         [SKIP][78] ([fdo#109441]) -> [PASS][79]
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb8/igt@kms_psr@psr2_primary_blt.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb2/igt@kms_psr@psr2_primary_blt.html

  
#### Warnings ####

  * igt@gem_ctx_isolation@vcs1-nonpriv:
    - shard-iclb:         [FAIL][80] ([fdo#111329]) -> [SKIP][81] ([fdo#109276])
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb2/igt@gem_ctx_isolation@vcs1-nonpriv.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb7/igt@gem_ctx_isolation@vcs1-nonpriv.html

  * igt@gem_mocs_settings@mocs-isolation-bsd2:
    - shard-iclb:         [SKIP][82] ([fdo#109276]) -> [FAIL][83] ([fdo#111330])
   [82]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb5/igt@gem_mocs_settings@mocs-isolation-bsd2.html
   [83]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb4/igt@gem_mocs_settings@mocs-isolation-bsd2.html

  * igt@gem_mocs_settings@mocs-reset-bsd2:
    - shard-iclb:         [FAIL][84] ([fdo#111330]) -> [SKIP][85] ([fdo#109276])
   [84]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-iclb2/igt@gem_mocs_settings@mocs-reset-bsd2.html
   [85]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-iclb3/igt@gem_mocs_settings@mocs-reset-bsd2.html

  * igt@kms_cursor_crc@pipe-a-cursor-128x128-random:
    - shard-glk:          [FAIL][86] ([fdo#103232]) -> [INCOMPLETE][87] ([fdo#103359] / [k.org#198133])
   [86]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7011/shard-glk3/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html
   [87]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/shard-glk4/igt@kms_cursor_crc@pipe-a-cursor-128x128-random.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#103166]: https://bugs.freedesktop.org/show_bug.cgi?id=103166
  [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
  [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232
  [fdo#103359]: https://bugs.freedesktop.org/show_bug.cgi?id=103359
  [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375
  [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
  [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108
  [fdo#104782]: https://bugs.freedesktop.org/show_bug.cgi?id=104782
  [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363
  [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411
  [fdo#107732]: https://bugs.freedesktop.org/show_bug.cgi?id=107732
  [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
  [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566
  [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507
  [fdo#110378]: https://bugs.freedesktop.org/show_bug.cgi?id=110378
  [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841
  [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854
  [fdo#111325]: https://bugs.freedesktop.org/show_bug.cgi?id=111325
  [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329
  [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330
  [fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747
  [fdo#111800]: https://bugs.freedesktop.org/show_bug.cgi?id=111800
  [fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832
  [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850
  [fdo#111867]: https://bugs.freedesktop.org/show_bug.cgi?id=111867
  [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870
  [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912
  [k.org#198133]: https://bugzilla.kernel.org/show_bug.cgi?id=198133


Participating hosts (11 -> 12)
------------------------------

  Additional (1): pig-snb-2600 


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

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_7011 -> Patchwork_14671

  CI-20190529: 20190529
  CI_DRM_7011: 7d13733c2a87909eef8bc945ecbf4d47e0b67133 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5212: d17a484b3c22706b2b004ef1577f367d79235e43 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_14671: 8fd224dba45f7a3dd151c161891edddd9c24c922 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_14671/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
  2019-10-04 14:19 ` [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP) Ville Syrjala
@ 2019-10-14  9:27   ` Lin, Wayne
  2019-10-14 14:41     ` Ville Syrjälä
  0 siblings, 1 reply; 17+ messages in thread
From: Lin, Wayne @ 2019-10-14  9:27 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx



> -----Original Message-----
> From: Ville Syrjala <ville.syrjala@linux.intel.com>
> Sent: Friday, October 4, 2019 10:19 PM
> To: dri-devel@lists.freedesktop.org
> Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> 
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> I think this should provide most of necessary logic for adding aspecr ratios to
> the HDMI 4k modes.
> 
> Cc: Wayne Lin <waynelin@amd.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++++++++++++------
>  1 file changed, 31 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index
> c7f9f7ca75a2..c76814edc784 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> drm_get_cea_aspect_ratio(const u8 video_code)
>  	return edid_cea_modes[video_code].picture_aspect_ratio;
>  }
> 
> +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> +video_code) {
> +	return edid_4k_modes[video_code].picture_aspect_ratio;
> +}
> +

There are no picture_aspect_ratio attributes defined for modes in 
edid_4k_modes[] now. Should add on those definitions.

>  /*
>   * Calculate the alternate clock for HDMI modes (those from the HDMI
> vendor
>   * specific block).
> @@ -3236,6 +3241,9 @@ static u8
> drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode *to_
>  	if (!to_match->clock)
>  		return 0;
> 
> +	if (to_match->picture_aspect_ratio)
> +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> +
>  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
>  		const struct drm_display_mode *hdmi_mode =
> &edid_4k_modes[vic];
>  		unsigned int clock1, clock2;
> @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> drm_display_mode *to_match)
>  	if (!to_match->clock)
>  		return 0;
> 
> +	if (to_match->picture_aspect_ratio)
> +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> +
>  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
>  		const struct drm_display_mode *hdmi_mode =
> &edid_4k_modes[vic];
>  		unsigned int clock1, clock2;

Current code in drm_match_hdmi_mdoe() & drm_match_hdmi_mode_clock_tolerance()
use hdmi_mode_alternate_clock() to find alternate clocks.
In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24)
due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds
23.98Hz for that mode. Maybe we should also revise that part.

> @@ -5218,6 +5229,7 @@
> drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> *frame,
>  					 const struct drm_display_mode *mode)  {
>  	enum hdmi_picture_aspect picture_aspect;
> +	u8 vic, hdmi_vic;
>  	int err;
> 
>  	if (!frame || !mode)
> @@ -5230,7 +5242,8 @@
> drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> *frame,
>  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
>  		frame->pixel_repeat = 1;
> 
> -	frame->video_code = drm_mode_cea_vic(connector, mode);
> +	vic = drm_mode_cea_vic(connector, mode);
> +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> 
>  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> 
> @@ -5244,11 +5257,15 @@
> drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> *frame,
> 
>  	/*
>  	 * Populate picture aspect ratio from either
> -	 * user input (if specified) or from the CEA mode list.
> +	 * user input (if specified) or from the CEA/HDMI mode lists.
>  	 */
>  	picture_aspect = mode->picture_aspect_ratio;
> -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> +		if (vic)
> +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> +		else if (hdmi_vic)
> +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> +	}
> 
>  	/*
>  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> hdmi_avi_infoframe *frame,
>  	 * we can only satisfy it by specifying the right VIC.
>  	 */
>  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> -		if (picture_aspect !=
> -		    drm_get_cea_aspect_ratio(frame->video_code))
> +		if (vic) {
> +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> +				return -EINVAL;
> +		} else if (hdmi_vic) {
> +			if (picture_aspect != drm_get_hdmi_aspect_ratio(hdmi_vic))
> +				return -EINVAL;
> +		} else {
>  			return -EINVAL;
> +		}
> +
>  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
>  	}
> 
> +	frame->video_code = vic;
>  	frame->picture_aspect = picture_aspect;
>  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
>  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> --
> 2.21.0

--
Wayne Lin

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
  2019-10-14  9:27   ` Lin, Wayne
@ 2019-10-14 14:41     ` Ville Syrjälä
  2019-10-21  6:28       ` Lin, Wayne
  0 siblings, 1 reply; 17+ messages in thread
From: Ville Syrjälä @ 2019-10-14 14:41 UTC (permalink / raw)
  To: Lin, Wayne; +Cc: intel-gfx, dri-devel

On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> 
> 
> > -----Original Message-----
> > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > Sent: Friday, October 4, 2019 10:19 PM
> > To: dri-devel@lists.freedesktop.org
> > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > 
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > 
> > I think this should provide most of necessary logic for adding aspecr ratios to
> > the HDMI 4k modes.
> > 
> > Cc: Wayne Lin <waynelin@amd.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> >  drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++++++++++++------
> >  1 file changed, 31 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index
> > c7f9f7ca75a2..c76814edc784 100644
> > --- a/drivers/gpu/drm/drm_edid.c
> > +++ b/drivers/gpu/drm/drm_edid.c
> > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > drm_get_cea_aspect_ratio(const u8 video_code)
> >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> >  }
> > 
> > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> > +video_code) {
> > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > +}
> > +
> 
> There are no picture_aspect_ratio attributes defined for modes in 
> edid_4k_modes[] now. Should add on those definitions.
> 
> >  /*
> >   * Calculate the alternate clock for HDMI modes (those from the HDMI
> > vendor
> >   * specific block).
> > @@ -3236,6 +3241,9 @@ static u8
> > drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode *to_
> >  	if (!to_match->clock)
> >  		return 0;
> > 
> > +	if (to_match->picture_aspect_ratio)
> > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > +
> >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> >  		unsigned int clock1, clock2;
> > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> > drm_display_mode *to_match)
> >  	if (!to_match->clock)
> >  		return 0;
> > 
> > +	if (to_match->picture_aspect_ratio)
> > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > +
> >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> >  		unsigned int clock1, clock2;
> 
> Current code in drm_match_hdmi_mdoe() & drm_match_hdmi_mode_clock_tolerance()
> use hdmi_mode_alternate_clock() to find alternate clocks.
> In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode (4096x2160@24)
> due to there is no alternate clock defined for that mode in HDMI1.4b. But HDMI2.0 adds
> 23.98Hz for that mode. Maybe we should also revise that part.

I'm tempted to just remove that exception. I have a hard time imagining
it causing serious problems.

> 
> > @@ -5218,6 +5229,7 @@
> > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > *frame,
> >  					 const struct drm_display_mode *mode)  {
> >  	enum hdmi_picture_aspect picture_aspect;
> > +	u8 vic, hdmi_vic;
> >  	int err;
> > 
> >  	if (!frame || !mode)
> > @@ -5230,7 +5242,8 @@
> > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > *frame,
> >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> >  		frame->pixel_repeat = 1;
> > 
> > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > +	vic = drm_mode_cea_vic(connector, mode);
> > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > 
> >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > 
> > @@ -5244,11 +5257,15 @@
> > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > *frame,
> > 
> >  	/*
> >  	 * Populate picture aspect ratio from either
> > -	 * user input (if specified) or from the CEA mode list.
> > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> >  	 */
> >  	picture_aspect = mode->picture_aspect_ratio;
> > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > +		if (vic)
> > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > +		else if (hdmi_vic)
> > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > +	}
> > 
> >  	/*
> >  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > hdmi_avi_infoframe *frame,
> >  	 * we can only satisfy it by specifying the right VIC.
> >  	 */
> >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > -		if (picture_aspect !=
> > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > +		if (vic) {
> > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > +				return -EINVAL;
> > +		} else if (hdmi_vic) {
> > +			if (picture_aspect != drm_get_hdmi_aspect_ratio(hdmi_vic))
> > +				return -EINVAL;
> > +		} else {
> >  			return -EINVAL;
> > +		}
> > +
> >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> >  	}
> > 
> > +	frame->video_code = vic;
> >  	frame->picture_aspect = picture_aspect;
> >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > --
> > 2.21.0
> 
> --
> Wayne Lin

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
  2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
                   ` (4 preceding siblings ...)
  2019-10-05  4:58 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2019-10-18 12:37 ` Shankar, Uma
  5 siblings, 0 replies; 17+ messages in thread
From: Shankar, Uma @ 2019-10-18 12:37 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, Wayne Lin



>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjala
>Sent: Friday, October 4, 2019 7:49 PM
>To: dri-devel@lists.freedesktop.org
>Cc: intel-gfx@lists.freedesktop.org; Wayne Lin <waynelin@amd.com>
>Subject: [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static
>
>From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>drm_get_cea_aspect_ratio() is not used outside drm_edid.c.
>Make it static.

Change looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>Cc: Wayne Lin <waynelin@amd.com>
>Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>---
> drivers/gpu/drm/drm_edid.c | 10 +---------
> include/drm/drm_edid.h     |  1 -
> 2 files changed, 1 insertion(+), 10 deletions(-)
>
>diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index
>0552175313cb..3df8267adab9 100644
>--- a/drivers/gpu/drm/drm_edid.c
>+++ b/drivers/gpu/drm/drm_edid.c
>@@ -3205,18 +3205,10 @@ static bool drm_valid_cea_vic(u8 vic)
> 	return vic > 0 && vic < ARRAY_SIZE(edid_cea_modes);  }
>
>-/**
>- * drm_get_cea_aspect_ratio - get the picture aspect ratio corresponding to
>- * the input VIC from the CEA mode list
>- * @video_code: ID given to each of the CEA modes
>- *
>- * Returns picture aspect ratio
>- */
>-enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code)
>+static enum hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8
>+video_code)
> {
> 	return edid_cea_modes[video_code].picture_aspect_ratio;
> }
>-EXPORT_SYMBOL(drm_get_cea_aspect_ratio);
>
> /*
>  * Calculate the alternate clock for HDMI modes (those from the HDMI vendor diff --
>git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index
>b9719418c3d2..efce675abf07 100644
>--- a/include/drm/drm_edid.h
>+++ b/include/drm/drm_edid.h
>@@ -481,7 +481,6 @@ int drm_add_edid_modes(struct drm_connector *connector,
>struct edid *edid);  int drm_add_override_edid_modes(struct drm_connector
>*connector);
>
> u8 drm_match_cea_mode(const struct drm_display_mode *to_match); -enum
>hdmi_picture_aspect drm_get_cea_aspect_ratio(const u8 video_code);  bool
>drm_detect_hdmi_monitor(struct edid *edid);  bool
>drm_detect_monitor_audio(struct edid *edid);  enum hdmi_quantization_range
>--
>2.21.0
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic()
  2019-10-04 14:19 ` [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic() Ville Syrjala
@ 2019-10-18 12:51   ` Shankar, Uma
  0 siblings, 0 replies; 17+ messages in thread
From: Shankar, Uma @ 2019-10-18 12:51 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, Wayne Lin



>-----Original Message-----
>From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjala
>Sent: Friday, October 4, 2019 7:49 PM
>To: dri-devel@lists.freedesktop.org
>Cc: intel-gfx@lists.freedesktop.org; Wayne Lin <waynelin@amd.com>
>Subject: [Intel-gfx] [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic()
>
>From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>Extract the logic to compute the final CEA VIC to a small helper.
>We'll reorder it a bit to make future modifications more straightforward. No function
>changes.

Changes look good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>Cc: Wayne Lin <waynelin@amd.com>
>Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>---
> drivers/gpu/drm/drm_edid.c | 53 +++++++++++++++++++++-----------------
> 1 file changed, 30 insertions(+), 23 deletions(-)
>
>diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index
>3df8267adab9..495b7fb4d9ef 100644
>--- a/drivers/gpu/drm/drm_edid.c
>+++ b/drivers/gpu/drm/drm_edid.c
>@@ -5160,6 +5160,35 @@ drm_hdmi_infoframe_set_hdr_metadata(struct
>hdmi_drm_infoframe *frame,  }
>EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
>
>+static u8 drm_mode_cea_vic(struct drm_connector *connector,
>+			   const struct drm_display_mode *mode) {
>+	u8 vendor_if_vic = drm_match_hdmi_mode(mode);
>+	bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
>+	u8 vic;
>+
>+	/*
>+	 * HDMI spec says if a mode is found in HDMI 1.4b 4K modes
>+	 * we should send its VIC in vendor infoframes, else send the
>+	 * VIC in AVI infoframes. Lets check if this mode is present in
>+	 * HDMI 1.4b 4K modes
>+	 */
>+	if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
>+		return 0;
>+
>+	vic = drm_match_cea_mode(mode);
>+
>+	/*
>+	 * HDMI 1.4 VIC range: 1 <= VIC <= 64 (CEA-861-D) but
>+	 * HDMI 2.0 VIC range: 1 <= VIC <= 107 (CEA-861-F). So we
>+	 * have to make sure we dont break HDMI 1.4 sinks.
>+	 */
>+	if (!is_hdmi2_sink(connector) && vic > 64)
>+		return 0;
>+
>+	return vic;
>+}
>+
> /**
>  * drm_hdmi_avi_infoframe_from_display_mode() - fill an HDMI AVI infoframe with
>  *                                              data from a DRM display mode
>@@ -5187,29 +5216,7 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
>hdmi_avi_infoframe *frame,
> 	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> 		frame->pixel_repeat = 1;
>
>-	frame->video_code = drm_match_cea_mode(mode);
>-
>-	/*
>-	 * HDMI 1.4 VIC range: 1 <= VIC <= 64 (CEA-861-D) but
>-	 * HDMI 2.0 VIC range: 1 <= VIC <= 107 (CEA-861-F). So we
>-	 * have to make sure we dont break HDMI 1.4 sinks.
>-	 */
>-	if (!is_hdmi2_sink(connector) && frame->video_code > 64)
>-		frame->video_code = 0;
>-
>-	/*
>-	 * HDMI spec says if a mode is found in HDMI 1.4b 4K modes
>-	 * we should send its VIC in vendor infoframes, else send the
>-	 * VIC in AVI infoframes. Lets check if this mode is present in
>-	 * HDMI 1.4b 4K modes
>-	 */
>-	if (frame->video_code) {
>-		u8 vendor_if_vic = drm_match_hdmi_mode(mode);
>-		bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
>-
>-		if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
>-			frame->video_code = 0;
>-	}
>+	frame->video_code = drm_mode_cea_vic(connector, mode);
>
> 	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
>
>--
>2.21.0
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [Intel-gfx] [PATCH 3/4] drm/edid: Fix HDMI VIC handling
  2019-10-04 14:19 ` [PATCH 3/4] drm/edid: Fix HDMI VIC handling Ville Syrjala
@ 2019-10-18 16:02   ` Shankar, Uma
  0 siblings, 0 replies; 17+ messages in thread
From: Shankar, Uma @ 2019-10-18 16:02 UTC (permalink / raw)
  To: Ville Syrjala, dri-devel; +Cc: intel-gfx, Wayne Lin



>-----Original Message-----
>From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Ville Syrjala
>Sent: Friday, October 4, 2019 7:49 PM
>To: dri-devel@lists.freedesktop.org
>Cc: intel-gfx@lists.freedesktop.org; Wayne Lin <waynelin@amd.com>
>Subject: [Intel-gfx] [PATCH 3/4] drm/edid: Fix HDMI VIC handling
>
>From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
>Extract drm_mode_hdmi_vic() to correctly calculate the final HDMI VIC for us.
>Currently this is being done a bit differently between the AVI and HDMI infoframes.
>Let's get both to agree on this.
>
>We need to allow the case where a mode is both 3D and has a HDMI VIC. Currently
>we'll just refuse to generate the HDMI infoframe when we really should be setting
>HDMI VIC to 0 and instead enabling 3D stereo signalling.
>
>If the sink doesn't even support the HDMI infoframe we should not be picking the
>HDMI VIC in favor of the CEA VIC, because then we'll end up not sending either VIC in
>the end.

Looks good to me.
Reviewed-by: Uma Shankar <uma.shankar@intel.com>

>Cc: Wayne Lin <waynelin@amd.com>
>Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>---
> drivers/gpu/drm/drm_edid.c | 37 +++++++++++++++++++++----------------
> 1 file changed, 21 insertions(+), 16 deletions(-)
>
>diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index
>495b7fb4d9ef..c7f9f7ca75a2 100644
>--- a/drivers/gpu/drm/drm_edid.c
>+++ b/drivers/gpu/drm/drm_edid.c
>@@ -5160,11 +5160,25 @@ drm_hdmi_infoframe_set_hdr_metadata(struct
>hdmi_drm_infoframe *frame,  }
>EXPORT_SYMBOL(drm_hdmi_infoframe_set_hdr_metadata);
>
>+static u8 drm_mode_hdmi_vic(struct drm_connector *connector,
>+			    const struct drm_display_mode *mode) {
>+	bool has_hdmi_infoframe = connector ?
>+		connector->display_info.has_hdmi_infoframe : false;
>+
>+	if (!has_hdmi_infoframe)
>+		return 0;
>+
>+	/* No HDMI VIC when signalling 3D video format */
>+	if (mode->flags & DRM_MODE_FLAG_3D_MASK)
>+		return 0;
>+
>+	return drm_match_hdmi_mode(mode);
>+}
>+
> static u8 drm_mode_cea_vic(struct drm_connector *connector,
> 			   const struct drm_display_mode *mode)  {
>-	u8 vendor_if_vic = drm_match_hdmi_mode(mode);
>-	bool is_s3d = mode->flags & DRM_MODE_FLAG_3D_MASK;
> 	u8 vic;
>
> 	/*
>@@ -5173,7 +5187,7 @@ static u8 drm_mode_cea_vic(struct drm_connector
>*connector,
> 	 * VIC in AVI infoframes. Lets check if this mode is present in
> 	 * HDMI 1.4b 4K modes
> 	 */
>-	if (drm_valid_hdmi_vic(vendor_if_vic) && !is_s3d)
>+	if (drm_mode_hdmi_vic(connector, mode))
> 		return 0;
>
> 	vic = drm_match_cea_mode(mode);
>@@ -5433,8 +5447,6 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct
>hdmi_vendor_infoframe *frame,
> 	bool has_hdmi_infoframe = connector ?
> 		connector->display_info.has_hdmi_infoframe : false;
> 	int err;
>-	u32 s3d_flags;
>-	u8 vic;
>
> 	if (!frame || !mode)
> 		return -EINVAL;
>@@ -5442,8 +5454,9 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct
>hdmi_vendor_infoframe *frame,
> 	if (!has_hdmi_infoframe)
> 		return -EINVAL;
>
>-	vic = drm_match_hdmi_mode(mode);
>-	s3d_flags = mode->flags & DRM_MODE_FLAG_3D_MASK;
>+	err = hdmi_vendor_infoframe_init(frame);
>+	if (err < 0)
>+		return err;
>
> 	/*
> 	 * Even if it's not absolutely necessary to send the infoframe @@ -5454,15
>+5467,7 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct
>hdmi_vendor_infoframe *frame,
> 	 * mode if the source simply stops sending the infoframe when
> 	 * it wants to switch from 3D to 2D.
> 	 */
>-
>-	if (vic && s3d_flags)
>-		return -EINVAL;
>-
>-	err = hdmi_vendor_infoframe_init(frame);
>-	if (err < 0)
>-		return err;
>-
>-	frame->vic = vic;
>+	frame->vic = drm_mode_hdmi_vic(connector, mode);
> 	frame->s3d_struct = s3d_structure_from_display_mode(mode);
>
> 	return 0;
>--
>2.21.0
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
  2019-10-14 14:41     ` Ville Syrjälä
@ 2019-10-21  6:28       ` Lin, Wayne
  2019-10-25 19:19           ` Ville Syrjälä
  0 siblings, 1 reply; 17+ messages in thread
From: Lin, Wayne @ 2019-10-21  6:28 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Monday, October 14, 2019 10:42 PM
> To: Lin, Wayne <Wayne.Lin@amd.com>
> Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> 
> On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> >
> >
> > > -----Original Message-----
> > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > Sent: Friday, October 4, 2019 10:19 PM
> > > To: dri-devel@lists.freedesktop.org
> > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > I think this should provide most of necessary logic for adding
> > > aspecr ratios to the HDMI 4k modes.
> > >
> > > Cc: Wayne Lin <waynelin@amd.com>
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > >  drivers/gpu/drm/drm_edid.c | 37
> > > +++++++++++++++++++++++++++++++------
> > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > index
> > > c7f9f7ca75a2..c76814edc784 100644
> > > --- a/drivers/gpu/drm/drm_edid.c
> > > +++ b/drivers/gpu/drm/drm_edid.c
> > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > drm_get_cea_aspect_ratio(const u8 video_code)
> > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > >  }
> > >
> > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> > > +video_code) {
> > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > +}
> > > +
> >
> > There are no picture_aspect_ratio attributes defined for modes in
> > edid_4k_modes[] now. Should add on those definitions.
> >
> > >  /*
> > >   * Calculate the alternate clock for HDMI modes (those from the
> > > HDMI vendor
> > >   * specific block).
> > > @@ -3236,6 +3241,9 @@ static u8
> > > drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode
> *to_
> > >  	if (!to_match->clock)
> > >  		return 0;
> > >
> > > +	if (to_match->picture_aspect_ratio)
> > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > +
> > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > >  		const struct drm_display_mode *hdmi_mode =
> &edid_4k_modes[vic];
> > >  		unsigned int clock1, clock2;
> > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> > > drm_display_mode *to_match)
> > >  	if (!to_match->clock)
> > >  		return 0;
> > >
> > > +	if (to_match->picture_aspect_ratio)
> > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > +
> > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > >  		const struct drm_display_mode *hdmi_mode =
> &edid_4k_modes[vic];
> > >  		unsigned int clock1, clock2;
> >
> > Current code in drm_match_hdmi_mdoe() &
> > drm_match_hdmi_mode_clock_tolerance()
> > use hdmi_mode_alternate_clock() to find alternate clocks.
> > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode
> > (4096x2160@24) due to there is no alternate clock defined for that
> > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> should also revise that part.
> 
> I'm tempted to just remove that exception. I have a hard time imagining it
> causing serious problems.

Thanks for your time.
I've run smoke test and CTS to verify these patches (with adding the aspect ratio 
attribute to edid_4k_modes[] and removing the exception for23.98Hz). So far it
looks good on my environment. Is there any further modification should be done
on these patches?

> 
> >
> > > @@ -5218,6 +5229,7 @@
> > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > *frame,
> > >  					 const struct drm_display_mode *mode)  {
> > >  	enum hdmi_picture_aspect picture_aspect;
> > > +	u8 vic, hdmi_vic;
> > >  	int err;
> > >
> > >  	if (!frame || !mode)
> > > @@ -5230,7 +5242,8 @@
> > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > *frame,
> > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > >  		frame->pixel_repeat = 1;
> > >
> > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > +	vic = drm_mode_cea_vic(connector, mode);
> > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > >
> > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > >
> > > @@ -5244,11 +5257,15 @@
> > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > *frame,
> > >
> > >  	/*
> > >  	 * Populate picture aspect ratio from either
> > > -	 * user input (if specified) or from the CEA mode list.
> > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > >  	 */
> > >  	picture_aspect = mode->picture_aspect_ratio;
> > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > +		if (vic)
> > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > +		else if (hdmi_vic)
> > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > +	}
> > >
> > >  	/*
> > >  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > hdmi_avi_infoframe *frame,
> > >  	 * we can only satisfy it by specifying the right VIC.
> > >  	 */
> > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > -		if (picture_aspect !=
> > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > +		if (vic) {
> > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > +				return -EINVAL;
> > > +		} else if (hdmi_vic) {
> > > +			if (picture_aspect !=
> drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > +				return -EINVAL;
> > > +		} else {
> > >  			return -EINVAL;
> > > +		}
> > > +
> > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > >  	}
> > >
> > > +	frame->video_code = vic;
> > >  	frame->picture_aspect = picture_aspect;
> > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > --
> > > 2.21.0
> >
> > --
> > Wayne Lin
> 
> --
> Ville Syrjälä
> Intel

--
Wayne Lin
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
@ 2019-10-25 19:19           ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-10-25 19:19 UTC (permalink / raw)
  To: Lin, Wayne; +Cc: intel-gfx, dri-devel

On Mon, Oct 21, 2019 at 06:28:18AM +0000, Lin, Wayne wrote:
> 
> 
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Sent: Monday, October 14, 2019 10:42 PM
> > To: Lin, Wayne <Wayne.Lin@amd.com>
> > Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > 
> > On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > > Sent: Friday, October 4, 2019 10:19 PM
> > > > To: dri-devel@lists.freedesktop.org
> > > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> > > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > > >
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > I think this should provide most of necessary logic for adding
> > > > aspecr ratios to the HDMI 4k modes.
> > > >
> > > > Cc: Wayne Lin <waynelin@amd.com>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/drm_edid.c | 37
> > > > +++++++++++++++++++++++++++++++------
> > > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > index
> > > > c7f9f7ca75a2..c76814edc784 100644
> > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > > drm_get_cea_aspect_ratio(const u8 video_code)
> > > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > > >  }
> > > >
> > > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> > > > +video_code) {
> > > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > > +}
> > > > +
> > >
> > > There are no picture_aspect_ratio attributes defined for modes in
> > > edid_4k_modes[] now. Should add on those definitions.
> > >
> > > >  /*
> > > >   * Calculate the alternate clock for HDMI modes (those from the
> > > > HDMI vendor
> > > >   * specific block).
> > > > @@ -3236,6 +3241,9 @@ static u8
> > > > drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode
> > *to_
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> > > > drm_display_mode *to_match)
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > >
> > > Current code in drm_match_hdmi_mdoe() &
> > > drm_match_hdmi_mode_clock_tolerance()
> > > use hdmi_mode_alternate_clock() to find alternate clocks.
> > > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode
> > > (4096x2160@24) due to there is no alternate clock defined for that
> > > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> > should also revise that part.
> > 
> > I'm tempted to just remove that exception. I have a hard time imagining it
> > causing serious problems.
> 
> Thanks for your time.
> I've run smoke test and CTS to verify these patches (with adding the aspect ratio 
> attribute to edid_4k_modes[] and removing the exception for23.98Hz). So far it
> looks good on my environment. Is there any further modification should be done
> on these patches?

Can't think of anything right now. I pushed the other three patches
already, so I guess now you could pull this last patch into your
patch set and repost the lot?

> 
> > 
> > >
> > > > @@ -5218,6 +5229,7 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  					 const struct drm_display_mode *mode)  {
> > > >  	enum hdmi_picture_aspect picture_aspect;
> > > > +	u8 vic, hdmi_vic;
> > > >  	int err;
> > > >
> > > >  	if (!frame || !mode)
> > > > @@ -5230,7 +5242,8 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > > >  		frame->pixel_repeat = 1;
> > > >
> > > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > > +	vic = drm_mode_cea_vic(connector, mode);
> > > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > > >
> > > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >
> > > > @@ -5244,11 +5257,15 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >
> > > >  	/*
> > > >  	 * Populate picture aspect ratio from either
> > > > -	 * user input (if specified) or from the CEA mode list.
> > > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > > >  	 */
> > > >  	picture_aspect = mode->picture_aspect_ratio;
> > > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > > -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> > > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > > +		if (vic)
> > > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > > +		else if (hdmi_vic)
> > > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > > +	}
> > > >
> > > >  	/*
> > > >  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> > > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > hdmi_avi_infoframe *frame,
> > > >  	 * we can only satisfy it by specifying the right VIC.
> > > >  	 */
> > > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > > -		if (picture_aspect !=
> > > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > > +		if (vic) {
> > > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > > +				return -EINVAL;
> > > > +		} else if (hdmi_vic) {
> > > > +			if (picture_aspect !=
> > drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > > +				return -EINVAL;
> > > > +		} else {
> > > >  			return -EINVAL;
> > > > +		}
> > > > +
> > > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >  	}
> > > >
> > > > +	frame->video_code = vic;
> > > >  	frame->picture_aspect = picture_aspect;
> > > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > > --
> > > > 2.21.0
> > >
> > > --
> > > Wayne Lin
> > 
> > --
> > Ville Syrjälä
> > Intel
> 
> --
> Wayne Lin

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
@ 2019-10-25 19:19           ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-10-25 19:19 UTC (permalink / raw)
  To: Lin, Wayne; +Cc: intel-gfx, dri-devel

On Mon, Oct 21, 2019 at 06:28:18AM +0000, Lin, Wayne wrote:
> 
> 
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Sent: Monday, October 14, 2019 10:42 PM
> > To: Lin, Wayne <Wayne.Lin@amd.com>
> > Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > 
> > On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > > Sent: Friday, October 4, 2019 10:19 PM
> > > > To: dri-devel@lists.freedesktop.org
> > > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> > > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > > >
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > I think this should provide most of necessary logic for adding
> > > > aspecr ratios to the HDMI 4k modes.
> > > >
> > > > Cc: Wayne Lin <waynelin@amd.com>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/drm_edid.c | 37
> > > > +++++++++++++++++++++++++++++++------
> > > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > index
> > > > c7f9f7ca75a2..c76814edc784 100644
> > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > > drm_get_cea_aspect_ratio(const u8 video_code)
> > > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > > >  }
> > > >
> > > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> > > > +video_code) {
> > > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > > +}
> > > > +
> > >
> > > There are no picture_aspect_ratio attributes defined for modes in
> > > edid_4k_modes[] now. Should add on those definitions.
> > >
> > > >  /*
> > > >   * Calculate the alternate clock for HDMI modes (those from the
> > > > HDMI vendor
> > > >   * specific block).
> > > > @@ -3236,6 +3241,9 @@ static u8
> > > > drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode
> > *to_
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> > > > drm_display_mode *to_match)
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > >
> > > Current code in drm_match_hdmi_mdoe() &
> > > drm_match_hdmi_mode_clock_tolerance()
> > > use hdmi_mode_alternate_clock() to find alternate clocks.
> > > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode
> > > (4096x2160@24) due to there is no alternate clock defined for that
> > > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> > should also revise that part.
> > 
> > I'm tempted to just remove that exception. I have a hard time imagining it
> > causing serious problems.
> 
> Thanks for your time.
> I've run smoke test and CTS to verify these patches (with adding the aspect ratio 
> attribute to edid_4k_modes[] and removing the exception for23.98Hz). So far it
> looks good on my environment. Is there any further modification should be done
> on these patches?

Can't think of anything right now. I pushed the other three patches
already, so I guess now you could pull this last patch into your
patch set and repost the lot?

> 
> > 
> > >
> > > > @@ -5218,6 +5229,7 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  					 const struct drm_display_mode *mode)  {
> > > >  	enum hdmi_picture_aspect picture_aspect;
> > > > +	u8 vic, hdmi_vic;
> > > >  	int err;
> > > >
> > > >  	if (!frame || !mode)
> > > > @@ -5230,7 +5242,8 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > > >  		frame->pixel_repeat = 1;
> > > >
> > > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > > +	vic = drm_mode_cea_vic(connector, mode);
> > > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > > >
> > > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >
> > > > @@ -5244,11 +5257,15 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >
> > > >  	/*
> > > >  	 * Populate picture aspect ratio from either
> > > > -	 * user input (if specified) or from the CEA mode list.
> > > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > > >  	 */
> > > >  	picture_aspect = mode->picture_aspect_ratio;
> > > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > > -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> > > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > > +		if (vic)
> > > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > > +		else if (hdmi_vic)
> > > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > > +	}
> > > >
> > > >  	/*
> > > >  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> > > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > hdmi_avi_infoframe *frame,
> > > >  	 * we can only satisfy it by specifying the right VIC.
> > > >  	 */
> > > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > > -		if (picture_aspect !=
> > > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > > +		if (vic) {
> > > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > > +				return -EINVAL;
> > > > +		} else if (hdmi_vic) {
> > > > +			if (picture_aspect !=
> > drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > > +				return -EINVAL;
> > > > +		} else {
> > > >  			return -EINVAL;
> > > > +		}
> > > > +
> > > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >  	}
> > > >
> > > > +	frame->video_code = vic;
> > > >  	frame->picture_aspect = picture_aspect;
> > > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > > --
> > > > 2.21.0
> > >
> > > --
> > > Wayne Lin
> > 
> > --
> > Ville Syrjälä
> > Intel
> 
> --
> Wayne Lin

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
@ 2019-10-25 19:19           ` Ville Syrjälä
  0 siblings, 0 replies; 17+ messages in thread
From: Ville Syrjälä @ 2019-10-25 19:19 UTC (permalink / raw)
  To: Lin, Wayne; +Cc: intel-gfx, dri-devel

On Mon, Oct 21, 2019 at 06:28:18AM +0000, Lin, Wayne wrote:
> 
> 
> > -----Original Message-----
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Sent: Monday, October 14, 2019 10:42 PM
> > To: Lin, Wayne <Wayne.Lin@amd.com>
> > Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > 
> > On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > > Sent: Friday, October 4, 2019 10:19 PM
> > > > To: dri-devel@lists.freedesktop.org
> > > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne <Wayne.Lin@amd.com>
> > > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> > > >
> > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > >
> > > > I think this should provide most of necessary logic for adding
> > > > aspecr ratios to the HDMI 4k modes.
> > > >
> > > > Cc: Wayne Lin <waynelin@amd.com>
> > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > ---
> > > >  drivers/gpu/drm/drm_edid.c | 37
> > > > +++++++++++++++++++++++++++++++------
> > > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> > > > index
> > > > c7f9f7ca75a2..c76814edc784 100644
> > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > > drm_get_cea_aspect_ratio(const u8 video_code)
> > > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > > >  }
> > > >
> > > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const u8
> > > > +video_code) {
> > > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > > +}
> > > > +
> > >
> > > There are no picture_aspect_ratio attributes defined for modes in
> > > edid_4k_modes[] now. Should add on those definitions.
> > >
> > > >  /*
> > > >   * Calculate the alternate clock for HDMI modes (those from the
> > > > HDMI vendor
> > > >   * specific block).
> > > > @@ -3236,6 +3241,9 @@ static u8
> > > > drm_match_hdmi_mode_clock_tolerance(const struct drm_display_mode
> > *to_
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const struct
> > > > drm_display_mode *to_match)
> > > >  	if (!to_match->clock)
> > > >  		return 0;
> > > >
> > > > +	if (to_match->picture_aspect_ratio)
> > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > +
> > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > >  		const struct drm_display_mode *hdmi_mode =
> > &edid_4k_modes[vic];
> > > >  		unsigned int clock1, clock2;
> > >
> > > Current code in drm_match_hdmi_mdoe() &
> > > drm_match_hdmi_mode_clock_tolerance()
> > > use hdmi_mode_alternate_clock() to find alternate clocks.
> > > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4 mode
> > > (4096x2160@24) due to there is no alternate clock defined for that
> > > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> > should also revise that part.
> > 
> > I'm tempted to just remove that exception. I have a hard time imagining it
> > causing serious problems.
> 
> Thanks for your time.
> I've run smoke test and CTS to verify these patches (with adding the aspect ratio 
> attribute to edid_4k_modes[] and removing the exception for23.98Hz). So far it
> looks good on my environment. Is there any further modification should be done
> on these patches?

Can't think of anything right now. I pushed the other three patches
already, so I guess now you could pull this last patch into your
patch set and repost the lot?

> 
> > 
> > >
> > > > @@ -5218,6 +5229,7 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  					 const struct drm_display_mode *mode)  {
> > > >  	enum hdmi_picture_aspect picture_aspect;
> > > > +	u8 vic, hdmi_vic;
> > > >  	int err;
> > > >
> > > >  	if (!frame || !mode)
> > > > @@ -5230,7 +5242,8 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > > >  		frame->pixel_repeat = 1;
> > > >
> > > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > > +	vic = drm_mode_cea_vic(connector, mode);
> > > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > > >
> > > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >
> > > > @@ -5244,11 +5257,15 @@
> > > > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe
> > > > *frame,
> > > >
> > > >  	/*
> > > >  	 * Populate picture aspect ratio from either
> > > > -	 * user input (if specified) or from the CEA mode list.
> > > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > > >  	 */
> > > >  	picture_aspect = mode->picture_aspect_ratio;
> > > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > > -		picture_aspect = drm_get_cea_aspect_ratio(frame->video_code);
> > > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > > +		if (vic)
> > > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > > +		else if (hdmi_vic)
> > > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > > +	}
> > > >
> > > >  	/*
> > > >  	 * The infoframe can't convey anything but none, 4:3 @@ -5256,12
> > > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > hdmi_avi_infoframe *frame,
> > > >  	 * we can only satisfy it by specifying the right VIC.
> > > >  	 */
> > > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > > -		if (picture_aspect !=
> > > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > > +		if (vic) {
> > > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > > +				return -EINVAL;
> > > > +		} else if (hdmi_vic) {
> > > > +			if (picture_aspect !=
> > drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > > +				return -EINVAL;
> > > > +		} else {
> > > >  			return -EINVAL;
> > > > +		}
> > > > +
> > > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > >  	}
> > > >
> > > > +	frame->video_code = vic;
> > > >  	frame->picture_aspect = picture_aspect;
> > > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > > --
> > > > 2.21.0
> > >
> > > --
> > > Wayne Lin
> > 
> > --
> > Ville Syrjälä
> > Intel
> 
> --
> Wayne Lin

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

* RE: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
@ 2019-10-29 10:21             ` Lin, Wayne
  0 siblings, 0 replies; 17+ messages in thread
From: Lin, Wayne @ 2019-10-29 10:21 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Saturday, October 26, 2019 3:20 AM
> To: Lin, Wayne <Wayne.Lin@amd.com>
> Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> 
> On Mon, Oct 21, 2019 at 06:28:18AM +0000, Lin, Wayne wrote:
> >
> >
> > > -----Original Message-----
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Sent: Monday, October 14, 2019 10:42 PM
> > > To: Lin, Wayne <Wayne.Lin@amd.com>
> > > Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > > Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio
> > > (WIP)
> > >
> > > On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > > > Sent: Friday, October 4, 2019 10:19 PM
> > > > > To: dri-devel@lists.freedesktop.org
> > > > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne
> > > > > <Wayne.Lin@amd.com>
> > > > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio
> > > > > (WIP)
> > > > >
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > >
> > > > > I think this should provide most of necessary logic for adding
> > > > > aspecr ratios to the HDMI 4k modes.
> > > > >
> > > > > Cc: Wayne Lin <waynelin@amd.com>
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > ---
> > > > >  drivers/gpu/drm/drm_edid.c | 37
> > > > > +++++++++++++++++++++++++++++++------
> > > > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/drm_edid.c
> > > > > b/drivers/gpu/drm/drm_edid.c index
> > > > > c7f9f7ca75a2..c76814edc784 100644
> > > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > > > drm_get_cea_aspect_ratio(const u8 video_code)
> > > > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > > > >  }
> > > > >
> > > > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const
> > > > > +u8
> > > > > +video_code) {
> > > > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > > > +}
> > > > > +
> > > >
> > > > There are no picture_aspect_ratio attributes defined for modes in
> > > > edid_4k_modes[] now. Should add on those definitions.
> > > >
> > > > >  /*
> > > > >   * Calculate the alternate clock for HDMI modes (those from the
> > > > > HDMI vendor
> > > > >   * specific block).
> > > > > @@ -3236,6 +3241,9 @@ static u8
> > > > > drm_match_hdmi_mode_clock_tolerance(const struct
> > > > > drm_display_mode
> > > *to_
> > > > >  	if (!to_match->clock)
> > > > >  		return 0;
> > > > >
> > > > > +	if (to_match->picture_aspect_ratio)
> > > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > > +
> > > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > > >  		const struct drm_display_mode *hdmi_mode =
> > > &edid_4k_modes[vic];
> > > > >  		unsigned int clock1, clock2;
> > > > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const
> struct
> > > > > drm_display_mode *to_match)
> > > > >  	if (!to_match->clock)
> > > > >  		return 0;
> > > > >
> > > > > +	if (to_match->picture_aspect_ratio)
> > > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > > +
> > > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > > >  		const struct drm_display_mode *hdmi_mode =
> > > &edid_4k_modes[vic];
> > > > >  		unsigned int clock1, clock2;
> > > >
> > > > Current code in drm_match_hdmi_mdoe() &
> > > > drm_match_hdmi_mode_clock_tolerance()
> > > > use hdmi_mode_alternate_clock() to find alternate clocks.
> > > > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
> > > > mode
> > > > (4096x2160@24) due to there is no alternate clock defined for that
> > > > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> > > should also revise that part.
> > >
> > > I'm tempted to just remove that exception. I have a hard time
> > > imagining it causing serious problems.
> >
> > Thanks for your time.
> > I've run smoke test and CTS to verify these patches (with adding the
> > aspect ratio attribute to edid_4k_modes[] and removing the exception
> > for23.98Hz). So far it looks good on my environment. Is there any
> > further modification should be done on these patches?
> 
> Can't think of anything right now. I pushed the other three patches already, so I
> guess now you could pull this last patch into your patch set and repost the lot?
> 
Sorry for late reply and thanks for your time.
Sure, I will post another new patch set then (including this last patch and my 
modification)
Thanks!

> >
> > >
> > > >
> > > > > @@ -5218,6 +5229,7 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  					 const struct drm_display_mode *mode)  {
> > > > >  	enum hdmi_picture_aspect picture_aspect;
> > > > > +	u8 vic, hdmi_vic;
> > > > >  	int err;
> > > > >
> > > > >  	if (!frame || !mode)
> > > > > @@ -5230,7 +5242,8 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > > > >  		frame->pixel_repeat = 1;
> > > > >
> > > > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > > > +	vic = drm_mode_cea_vic(connector, mode);
> > > > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > > > >
> > > > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > > >
> > > > > @@ -5244,11 +5257,15 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >
> > > > >  	/*
> > > > >  	 * Populate picture aspect ratio from either
> > > > > -	 * user input (if specified) or from the CEA mode list.
> > > > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > > > >  	 */
> > > > >  	picture_aspect = mode->picture_aspect_ratio;
> > > > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > > > -		picture_aspect =
> drm_get_cea_aspect_ratio(frame->video_code);
> > > > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > > > +		if (vic)
> > > > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > > > +		else if (hdmi_vic)
> > > > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > > > +	}
> > > > >
> > > > >  	/*
> > > > >  	 * The infoframe can't convey anything but none, 4:3 @@
> > > > > -5256,12
> > > > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  	 * we can only satisfy it by specifying the right VIC.
> > > > >  	 */
> > > > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > > > -		if (picture_aspect !=
> > > > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > > > +		if (vic) {
> > > > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > > > +				return -EINVAL;
> > > > > +		} else if (hdmi_vic) {
> > > > > +			if (picture_aspect !=
> > > drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > > > +				return -EINVAL;
> > > > > +		} else {
> > > > >  			return -EINVAL;
> > > > > +		}
> > > > > +
> > > > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > > >  	}
> > > > >
> > > > > +	frame->video_code = vic;
> > > > >  	frame->picture_aspect = picture_aspect;
> > > > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > > > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > > > --
> > > > > 2.21.0
> > > >
> > > > --
> > > > Wayne Lin
> > >
> > > --
> > > Ville Syrjälä
> > > Intel
> >
> > --
> > Wayne Lin
> 
> --
> Ville Syrjälä
> Intel

--
Wayne Lin
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Intel-gfx] [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
@ 2019-10-29 10:21             ` Lin, Wayne
  0 siblings, 0 replies; 17+ messages in thread
From: Lin, Wayne @ 2019-10-29 10:21 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, dri-devel



> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Saturday, October 26, 2019 3:20 AM
> To: Lin, Wayne <Wayne.Lin@amd.com>
> Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP)
> 
> On Mon, Oct 21, 2019 at 06:28:18AM +0000, Lin, Wayne wrote:
> >
> >
> > > -----Original Message-----
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > Sent: Monday, October 14, 2019 10:42 PM
> > > To: Lin, Wayne <Wayne.Lin@amd.com>
> > > Cc: dri-devel@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
> > > Subject: Re: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio
> > > (WIP)
> > >
> > > On Mon, Oct 14, 2019 at 09:27:07AM +0000, Lin, Wayne wrote:
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Ville Syrjala <ville.syrjala@linux.intel.com>
> > > > > Sent: Friday, October 4, 2019 10:19 PM
> > > > > To: dri-devel@lists.freedesktop.org
> > > > > Cc: intel-gfx@lists.freedesktop.org; Lin, Wayne
> > > > > <Wayne.Lin@amd.com>
> > > > > Subject: [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio
> > > > > (WIP)
> > > > >
> > > > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > >
> > > > > I think this should provide most of necessary logic for adding
> > > > > aspecr ratios to the HDMI 4k modes.
> > > > >
> > > > > Cc: Wayne Lin <waynelin@amd.com>
> > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > > ---
> > > > >  drivers/gpu/drm/drm_edid.c | 37
> > > > > +++++++++++++++++++++++++++++++------
> > > > >  1 file changed, 31 insertions(+), 6 deletions(-)
> > > > >
> > > > > diff --git a/drivers/gpu/drm/drm_edid.c
> > > > > b/drivers/gpu/drm/drm_edid.c index
> > > > > c7f9f7ca75a2..c76814edc784 100644
> > > > > --- a/drivers/gpu/drm/drm_edid.c
> > > > > +++ b/drivers/gpu/drm/drm_edid.c
> > > > > @@ -3210,6 +3210,11 @@ static enum hdmi_picture_aspect
> > > > > drm_get_cea_aspect_ratio(const u8 video_code)
> > > > >  	return edid_cea_modes[video_code].picture_aspect_ratio;
> > > > >  }
> > > > >
> > > > > +static enum hdmi_picture_aspect drm_get_hdmi_aspect_ratio(const
> > > > > +u8
> > > > > +video_code) {
> > > > > +	return edid_4k_modes[video_code].picture_aspect_ratio;
> > > > > +}
> > > > > +
> > > >
> > > > There are no picture_aspect_ratio attributes defined for modes in
> > > > edid_4k_modes[] now. Should add on those definitions.
> > > >
> > > > >  /*
> > > > >   * Calculate the alternate clock for HDMI modes (those from the
> > > > > HDMI vendor
> > > > >   * specific block).
> > > > > @@ -3236,6 +3241,9 @@ static u8
> > > > > drm_match_hdmi_mode_clock_tolerance(const struct
> > > > > drm_display_mode
> > > *to_
> > > > >  	if (!to_match->clock)
> > > > >  		return 0;
> > > > >
> > > > > +	if (to_match->picture_aspect_ratio)
> > > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > > +
> > > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > > >  		const struct drm_display_mode *hdmi_mode =
> > > &edid_4k_modes[vic];
> > > > >  		unsigned int clock1, clock2;
> > > > > @@ -3271,6 +3279,9 @@ static u8 drm_match_hdmi_mode(const
> struct
> > > > > drm_display_mode *to_match)
> > > > >  	if (!to_match->clock)
> > > > >  		return 0;
> > > > >
> > > > > +	if (to_match->picture_aspect_ratio)
> > > > > +		match_flags |= DRM_MODE_MATCH_ASPECT_RATIO;
> > > > > +
> > > > >  	for (vic = 1; vic < ARRAY_SIZE(edid_4k_modes); vic++) {
> > > > >  		const struct drm_display_mode *hdmi_mode =
> > > &edid_4k_modes[vic];
> > > > >  		unsigned int clock1, clock2;
> > > >
> > > > Current code in drm_match_hdmi_mdoe() &
> > > > drm_match_hdmi_mode_clock_tolerance()
> > > > use hdmi_mode_alternate_clock() to find alternate clocks.
> > > > In hdmi_mode_alternate_clock(), it adds an exception for VIC 4
> > > > mode
> > > > (4096x2160@24) due to there is no alternate clock defined for that
> > > > mode in HDMI1.4b. But HDMI2.0 adds 23.98Hz for that mode. Maybe we
> > > should also revise that part.
> > >
> > > I'm tempted to just remove that exception. I have a hard time
> > > imagining it causing serious problems.
> >
> > Thanks for your time.
> > I've run smoke test and CTS to verify these patches (with adding the
> > aspect ratio attribute to edid_4k_modes[] and removing the exception
> > for23.98Hz). So far it looks good on my environment. Is there any
> > further modification should be done on these patches?
> 
> Can't think of anything right now. I pushed the other three patches already, so I
> guess now you could pull this last patch into your patch set and repost the lot?
> 
Sorry for late reply and thanks for your time.
Sure, I will post another new patch set then (including this last patch and my 
modification)
Thanks!

> >
> > >
> > > >
> > > > > @@ -5218,6 +5229,7 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  					 const struct drm_display_mode *mode)  {
> > > > >  	enum hdmi_picture_aspect picture_aspect;
> > > > > +	u8 vic, hdmi_vic;
> > > > >  	int err;
> > > > >
> > > > >  	if (!frame || !mode)
> > > > > @@ -5230,7 +5242,8 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  	if (mode->flags & DRM_MODE_FLAG_DBLCLK)
> > > > >  		frame->pixel_repeat = 1;
> > > > >
> > > > > -	frame->video_code = drm_mode_cea_vic(connector, mode);
> > > > > +	vic = drm_mode_cea_vic(connector, mode);
> > > > > +	hdmi_vic = drm_mode_hdmi_vic(connector, mode);
> > > > >
> > > > >  	frame->picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > > >
> > > > > @@ -5244,11 +5257,15 @@
> > > > > drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >
> > > > >  	/*
> > > > >  	 * Populate picture aspect ratio from either
> > > > > -	 * user input (if specified) or from the CEA mode list.
> > > > > +	 * user input (if specified) or from the CEA/HDMI mode lists.
> > > > >  	 */
> > > > >  	picture_aspect = mode->picture_aspect_ratio;
> > > > > -	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE)
> > > > > -		picture_aspect =
> drm_get_cea_aspect_ratio(frame->video_code);
> > > > > +	if (picture_aspect == HDMI_PICTURE_ASPECT_NONE) {
> > > > > +		if (vic)
> > > > > +			picture_aspect = drm_get_cea_aspect_ratio(vic);
> > > > > +		else if (hdmi_vic)
> > > > > +			picture_aspect = drm_get_hdmi_aspect_ratio(hdmi_vic);
> > > > > +	}
> > > > >
> > > > >  	/*
> > > > >  	 * The infoframe can't convey anything but none, 4:3 @@
> > > > > -5256,12
> > > > > +5273,20 @@ drm_hdmi_avi_infoframe_from_display_mode(struct
> > > > > hdmi_avi_infoframe *frame,
> > > > >  	 * we can only satisfy it by specifying the right VIC.
> > > > >  	 */
> > > > >  	if (picture_aspect > HDMI_PICTURE_ASPECT_16_9) {
> > > > > -		if (picture_aspect !=
> > > > > -		    drm_get_cea_aspect_ratio(frame->video_code))
> > > > > +		if (vic) {
> > > > > +			if (picture_aspect != drm_get_cea_aspect_ratio(vic))
> > > > > +				return -EINVAL;
> > > > > +		} else if (hdmi_vic) {
> > > > > +			if (picture_aspect !=
> > > drm_get_hdmi_aspect_ratio(hdmi_vic))
> > > > > +				return -EINVAL;
> > > > > +		} else {
> > > > >  			return -EINVAL;
> > > > > +		}
> > > > > +
> > > > >  		picture_aspect = HDMI_PICTURE_ASPECT_NONE;
> > > > >  	}
> > > > >
> > > > > +	frame->video_code = vic;
> > > > >  	frame->picture_aspect = picture_aspect;
> > > > >  	frame->active_aspect = HDMI_ACTIVE_ASPECT_PICTURE;
> > > > >  	frame->scan_mode = HDMI_SCAN_MODE_UNDERSCAN;
> > > > > --
> > > > > 2.21.0
> > > >
> > > > --
> > > > Wayne Lin
> > >
> > > --
> > > Ville Syrjälä
> > > Intel
> >
> > --
> > Wayne Lin
> 
> --
> Ville Syrjälä
> Intel

--
Wayne Lin
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2019-10-29 14:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 14:19 [PATCH 1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Ville Syrjala
2019-10-04 14:19 ` [PATCH 2/4] drm/edid: Extract drm_mode_cea_vic() Ville Syrjala
2019-10-18 12:51   ` Shankar, Uma
2019-10-04 14:19 ` [PATCH 3/4] drm/edid: Fix HDMI VIC handling Ville Syrjala
2019-10-18 16:02   ` [Intel-gfx] " Shankar, Uma
2019-10-04 14:19 ` [PATCH 4/4] drm/edid: Prep for HDMI VIC aspect ratio (WIP) Ville Syrjala
2019-10-14  9:27   ` Lin, Wayne
2019-10-14 14:41     ` Ville Syrjälä
2019-10-21  6:28       ` Lin, Wayne
2019-10-25 19:19         ` Ville Syrjälä
2019-10-25 19:19           ` [Intel-gfx] " Ville Syrjälä
2019-10-25 19:19           ` Ville Syrjälä
2019-10-29 10:21           ` Lin, Wayne
2019-10-29 10:21             ` [Intel-gfx] " Lin, Wayne
2019-10-04 18:15 ` ✓ Fi.CI.BAT: success for series starting with [1/4] drm/edid: Make drm_get_cea_aspect_ratio() static Patchwork
2019-10-05  4:58 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-18 12:37 ` [PATCH 1/4] " Shankar, Uma

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.