Skip to contentSkip to conversation

HDMI 2.0+ video modes handling in DRM core

RFC In review Jose Abreu 5 participants 28 messages Mar 22, 2017 – Mar 28, 2017

Subsystems (2)
lore
Share & tools
lore

Jose Abreu

author
#0 lore raw

cover HDMI 2.0+ video modes handling in DRM core

Hi all,

This is a RFC series that aims to collect comments regarding the handling of HDMI 2.0+ video modes and features in the DRM core.

Some of the HDMI 2.0 features are already implemented and only affect kernel drivers (SDCD for example). There are some features, though, which can, and will, affect userspace.

It is clear that userspace can't be broken, so, based on previous discussions I started implementing a "HDMI 2.0+ knob" which can be set by userspace to enable HDMI 2.0+ features.

For now this only limits the exposing of the video modes defined in CEA-861-F, but it can be extended adding, for example, YCbCr 4:2:0.

Please do not see this as a formal patch as this wasn't even compiled tested but, please, feel free to comment :)

NOTE: The adding of the new video modes timings was originally done by Shashank Sharma <[email protected]> so, credit to him. I modified it a little bit (added the HDMI 2.0+ flag) and I don't know if I should add his signed-off-by as it was modified.

Best regards,
Jose Miguel Abreu

Cc Carlos Palminha <[email protected]>

Jose Abreu (5):
drm: Add HDMI 2.0+ features exposing knob
drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag
drm: edid: Add HDMI 2.0 CEA video modes
drm: connector: Add hdmi2_allowed flag
drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked
to

 drivers/gpu/drm/drm_connector.c    |   2 +
 drivers/gpu/drm/drm_edid.c         | 258 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_ioctl.c        |   5 +
 drivers/gpu/drm/drm_probe_helper.c |   9 +-
 include/drm/drm_connector.h        |   2 +
 include/drm/drm_file.h             |   8 ++
 include/drm/drm_modes.h            |  14 ++
 include/uapi/drm/drm.h             |   7 +
 include/uapi/drm/drm_mode.h        |   9 ++
 9 files changed, 313 insertions(+), 1 deletion(-)
Signature · 7 lines
1.9.1


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

RFC 1/5 drm: Add HDMI 2.0+ features exposing knob

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
drivers/gpu/drm/drm_ioctl.c +5 -0
index a7c61c2..2430e2e 100644
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 7 lines
1.9.1


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

Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

Quoted 19 lines · Jose Abreu

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
drivers/gpu/drm/drm_ioctl.c +0 -0
index a7c61c2..2430e2e 100644

drivers/gpu/drm/drm_ioctl.c static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ · line 324

Quoted 7 lines
drivers/gpu/drm/drm_ioctl.c +4 -0
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org driver).
-Daniel

Quoted 49 lines
drivers/gpu/drm/drm_ioctl.c +1 -0
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#3 lore raw

Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

Hi Daniel,

Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jose Abreu

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
Quoted 15 lines

drivers/gpu/drm/drm_ioctl.c static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ · line 324

Quoted 12 lines
drivers/gpu/drm/drm_ioctl.c +4 -0
index a7c61c2..2430e2e 100644
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org driver).
-Daniel

I see your point but shouldn't this be merged before actually starting to work in userspace?

Best regards,
Jose Miguel Abreu

Quoted 46 lines
Quoted 46 lines
drivers/gpu/drm/drm_ioctl.c +1 -0
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 1 line
1.9.1
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=4lBpQovdR7O8jeC7mV8SX9xvTypMtV8CBDEDg3bGgzw&s=h-gqFlO62i53pir0j2lJ-upE_bXQxhn3BK1nhdxoB6Y&e=

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

#4 lore raw

Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

Quoted 35 lines · Jose Abreu

Hi Daniel,

Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jose Abreu

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
Quoted 15 lines

drivers/gpu/drm/drm_ioctl.c static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ · line 324

Quoted 12 lines
drivers/gpu/drm/drm_ioctl.c +4 -0
index a7c61c2..2430e2e 100644
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org driver).
-Daniel

Quoted 2 lines

I see your point but shouldn't this be merged before actually starting to work in userspace?

No, see

https://dri.freedesktop.org/docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements

for reasons behind this and the precise flow.

Cheers, Daniel

Quoted 55 lines

Best regards,
Jose Miguel Abreu

Quoted 50 lines
Quoted 50 lines
drivers/gpu/drm/drm_ioctl.c +1 -0
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=4lBpQovdR7O8jeC7mV8SX9xvTypMtV8CBDEDg3bGgzw&s=h-gqFlO62i53pir0j2lJ-upE_bXQxhn3BK1nhdxoB6Y&e= 
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#5 lore raw

Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

Hi Daniel,

Quoted 37 lines · Daniel Vetter
Quoted 34 lines · Jose Abreu

Hi Daniel,

Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jose Abreu

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
Quoted 15 lines

drivers/gpu/drm/drm_ioctl.c static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ · line 324

Quoted 12 lines
drivers/gpu/drm/drm_ioctl.c +4 -0
index a7c61c2..2430e2e 100644
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org driver).
-Daniel

Quoted 2 lines

I see your point but shouldn't this be merged before actually starting to work in userspace?

Quoted 7 lines

No, see

https://urldefense.proofpoint.com/v2/url?u=https-3A__dri.freedesktop.org_docs_drm_gpu_drm-2Duapi.html-23open-2Dsource-2Duserspace-2Drequirements&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=tcc2TQFpF7ats3OIzYgmFrHaeymBrPtqHphO4Ui4AUY&s=qWySmgpGaOwxC8Jl3A5qZVf4aS2qz3LXshVdv3FehJc&e=

for reasons behind this and the precise flow.

Cheers, Daniel

Thanks, I will do that. I can leave the flag and just limit the export of aspect ratios for now, we can limit more stuff later if needed. What do you think?

Another thing: Is it safe to enable this in the modesetting driver, shouldn't the modesetting clients also know about the flag or does modesetting handles this correctly? (I'm not very familiar with this driver, sorry).

Best regards,
Jose Miguel Abreu

Quoted 49 lines
Quoted 49 lines

Best regards,
Jose Miguel Abreu

Quoted 45 lines
Quoted 45 lines
drivers/gpu/drm/drm_ioctl.c +1 -0
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 1 line
1.9.1
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=4lBpQovdR7O8jeC7mV8SX9xvTypMtV8CBDEDg3bGgzw&s=h-gqFlO62i53pir0j2lJ-upE_bXQxhn3BK1nhdxoB6Y&e=

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

#6 lore raw

Re: [RFC 1/5] drm: Add HDMI 2.0+ features exposing knob

Quoted 49 lines · Jose Abreu

Hi Daniel,

Quoted 37 lines · Daniel Vetter
Quoted 34 lines · Jose Abreu

Hi Daniel,

Quoted 15 lines · Daniel Vetter
Quoted 14 lines · Jose Abreu

We can't expect userspace to have full support for all HDMI 2.0+ features. Instead of expecting/waiting for userspace to support the new features add a knob, much like the stereo knob, so that DRM core will only expose the features when asked too.

---
 drivers/gpu/drm/drm_ioctl.c | 5 +++++
 include/drm/drm_file.h      | 8 ++++++++
 include/uapi/drm/drm.h      | 7 +++++++
 3 files changed, 20 insertions(+)
Quoted 15 lines

drivers/gpu/drm/drm_ioctl.c static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_ · line 324

Quoted 12 lines
drivers/gpu/drm/drm_ioctl.c +4 -0
index a7c61c2..2430e2e 100644
@@ -318,6 +318,11 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_
 		file_priv->atomic = req->value;
 		file_priv->universal_planes = req->value;
 		break;
+	case DRM_CLIENT_CAP_HDMI2:
+		if (req->value > 1)
+			return -EINVAL;
+		file_priv->hdmi2_allowed = req->value;

Needs some userspace to make use of this (like the -modesetting x.org driver).
-Daniel

Quoted 2 lines

I see your point but shouldn't this be merged before actually starting to work in userspace?

Quoted 7 lines

No, see

https://urldefense.proofpoint.com/v2/url?u=https-3A__dri.freedesktop.org_docs_drm_gpu_drm-2Duapi.html-23open-2Dsource-2Duserspace-2Drequirements&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=tcc2TQFpF7ats3OIzYgmFrHaeymBrPtqHphO4Ui4AUY&s=qWySmgpGaOwxC8Jl3A5qZVf4aS2qz3LXshVdv3FehJc&e=

for reasons behind this and the precise flow.

Cheers, Daniel

Quoted 8 lines

Thanks, I will do that. I can leave the flag and just limit the export of aspect ratios for now, we can limit more stuff later if needed. What do you think?

Another thing: Is it safe to enable this in the modesetting driver, shouldn't the modesetting clients also know about the flag or does modesetting handles this correctly? (I'm not very familiar with this driver, sorry).

Probably needs an xrandr revision too.
-Daniel

Quoted 58 lines

Best regards,
Jose Miguel Abreu

Quoted 53 lines
Quoted 53 lines

Best regards,
Jose Miguel Abreu

Quoted 49 lines
Quoted 49 lines
drivers/gpu/drm/drm_ioctl.c +1 -0
+		break;
 	default:
 		return -EINVAL;
 	}
include/drm/drm_file.h +8 -0
index 5dd27ae..7b97d85 100644
@@ -192,6 +192,14 @@ struct drm_file {
 	unsigned is_master:1;
 
 	/**
+	 * @hdmi2_allowed:
+	 *
+	 * True if client understands HDMI 2.0+ features like, for example,
+	 * extended aspect ratios
+	 */
+	unsigned hdmi2_allowed:1;
+
+	/**
 	 * @master:
 	 *
 	 * Master this node is currently associated with. Only relevant if
include/uapi/drm/drm.h +7 -0
index b2c5284..9e25138 100644
@@ -678,6 +678,13 @@ struct drm_get_cap {
  */
 #define DRM_CLIENT_CAP_ATOMIC	3
 
+/**
+ * DRM_CLIENT_CAP_HDMI2
+ *
+ * If set to 1, the DRM core will expose HDMI 2.0+ features to userspace
+ */
+#define DRM_CLIENT_CAP_HDMI2	4
+
 /** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
 struct drm_set_client_cap {
 	__u64 capability;
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=4lBpQovdR7O8jeC7mV8SX9xvTypMtV8CBDEDg3bGgzw&s=h-gqFlO62i53pir0j2lJ-upE_bXQxhn3BK1nhdxoB6Y&e= 
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#7 lore raw

RFC 2/5 drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag

In reply to Jose Abreu

Add the HDMI 2.0 aspect ratio flags (64:27 and 256:135) and a new flag which will signal userspace that this is a HDMI 2.0+ mode. It is expected that these new flags will not be exported to userspace unless client asks to.

---
 include/uapi/drm/drm_mode.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/drm/drm_mode.h +9 -0
index 8c67fc0..62e679c 100644
@@ -89,6 +89,8 @@
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135		4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -98,6 +100,13 @@
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
+
+/* HDMI 2.0+ mode flag: will only be set if client supports it */
+#define DRM_MODE_FLAG_HDMI2			(1<<23)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 7 lines
1.9.1


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

Re: [RFC 2/5] drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag

Quoted 4 lines · Jose Abreu

Add the HDMI 2.0 aspect ratio flags (64:27 and 256:135) and a new flag which will signal userspace that this is a HDMI 2.0+ mode. It is expected that these new flags will not be exported to userspace unless client asks to.

W.r.t. the aspect ratio userspace story, there was some discussion on #dri-devel recently about extending the xrandr protocol for 3d stereo support. If that is going to happen then it might make sense to try and get the aspect ratio stuff also included at the same time so that we would only have to deal with one protocol bump.

Quoted 43 lines
---
 include/uapi/drm/drm_mode.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/drm/drm_mode.h +9 -0
index 8c67fc0..62e679c 100644
@@ -89,6 +89,8 @@
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135		4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -98,6 +100,13 @@
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
+
+/* HDMI 2.0+ mode flag: will only be set if client supports it */
+#define DRM_MODE_FLAG_HDMI2			(1<<23)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#9 lore raw

Re: [RFC 2/5] drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag

Hi Ville,

Quoted 10 lines · Ville Syrjälä
Quoted 4 lines · Jose Abreu

Add the HDMI 2.0 aspect ratio flags (64:27 and 256:135) and a new flag which will signal userspace that this is a HDMI 2.0+ mode. It is expected that these new flags will not be exported to userspace unless client asks to.

W.r.t. the aspect ratio userspace story, there was some discussion on #dri-devel recently about extending the xrandr protocol for 3d stereo support. If that is going to happen then it might make sense to try and get the aspect ratio stuff also included at the same time so that we would only have to deal with one protocol bump.

Hmm, are you saying to just use one knob for 3d and the aspect ratios? Aren't there already userspace consumers of the 3d knob?

Best regards,
Jose Miguel Abreu

Quoted 39 lines
Quoted 39 lines
---
 include/uapi/drm/drm_mode.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/drm/drm_mode.h +9 -0
index 8c67fc0..62e679c 100644
@@ -89,6 +89,8 @@
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135		4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -98,6 +100,13 @@
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
+
+/* HDMI 2.0+ mode flag: will only be set if client supports it */
+#define DRM_MODE_FLAG_HDMI2			(1<<23)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 1 line
1.9.1
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIDAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=BBAO8Rra0sW4KcCLB5lMOfONxg0v9pfUSaDNr5WDh2w&s=p6tAeWYwiSDL7BonKeijv2zmweBF9eW7xV7OX5e5gG4&e=

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

#10 lore raw

Re: [RFC 2/5] drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag

Quoted 9 lines · Jose Abreu

Hi Ville,

Quoted 5 lines · Ville Syrjälä
Quoted 4 lines · Jose Abreu

Add the HDMI 2.0 aspect ratio flags (64:27 and 256:135) and a new flag which will signal userspace that this is a HDMI 2.0+ mode. It is expected that these new flags will not be exported to userspace unless client asks to.

Quoted 8 lines
Quoted 5 lines

W.r.t. the aspect ratio userspace story, there was some discussion on #dri-devel recently about extending the xrandr protocol for 3d stereo support. If that is going to happen then it might make sense to try and get the aspect ratio stuff also included at the same time so that we would only have to deal with one protocol bump.

Hmm, are you saying to just use one knob for 3d and the aspect ratios?

No. I'm saying that extending xrandr with either means a protocol bump. But if we do both at the same time we just need one bump.

Quoted 1 line

Aren't there already userspace consumers of the 3d knob?

Not that I know of. And there's definitely nothing in xrandr for this stuff, so any consumer would have to be something non-x11 based.

Quoted 47 lines

Best regards,
Jose Miguel Abreu

Quoted 43 lines
Quoted 43 lines
---
 include/uapi/drm/drm_mode.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/drm/drm_mode.h +9 -0
index 8c67fc0..62e679c 100644
@@ -89,6 +89,8 @@
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135		4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -98,6 +100,13 @@
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
+
+/* HDMI 2.0+ mode flag: will only be set if client supports it */
+#define DRM_MODE_FLAG_HDMI2			(1<<23)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIDAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=BBAO8Rra0sW4KcCLB5lMOfONxg0v9pfUSaDNr5WDh2w&s=p6tAeWYwiSDL7BonKeijv2zmweBF9eW7xV7OX5e5gG4&e= 
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#11 lore raw

Re: [RFC 2/5] drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag

Hi Ville,

Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Jose Abreu

Hi Ville,

Quoted 10 lines · Ville Syrjälä
Quoted 4 lines · Jose Abreu

Add the HDMI 2.0 aspect ratio flags (64:27 and 256:135) and a new flag which will signal userspace that this is a HDMI 2.0+ mode. It is expected that these new flags will not be exported to userspace unless client asks to.

W.r.t. the aspect ratio userspace story, there was some discussion on #dri-devel recently about extending the xrandr protocol for 3d stereo support. If that is going to happen then it might make sense to try and get the aspect ratio stuff also included at the same time so that we would only have to deal with one protocol bump.

Quoted 4 lines
Quoted 2 lines

Hmm, are you saying to just use one knob for 3d and the aspect ratios?

No. I'm saying that extending xrandr with either means a protocol bump. But if we do both at the same time we just need one bump.

Ok. Anything in this series that you think can start helping contribute for that?

Best regards,
Jose Miguel Abreu

Quoted 46 lines
Quoted 2 lines

Aren't there already userspace consumers of the 3d knob?

Not that I know of. And there's definitely nothing in xrandr for this stuff, so any consumer would have to be something non-x11 based.

Quoted 41 lines

Best regards,
Jose Miguel Abreu

Quoted 38 lines
Quoted 38 lines
---
 include/uapi/drm/drm_mode.h | 9 +++++++++
 1 file changed, 9 insertions(+)
include/uapi/drm/drm_mode.h +9 -0
index 8c67fc0..62e679c 100644
@@ -89,6 +89,8 @@
 #define DRM_MODE_PICTURE_ASPECT_NONE		0
 #define DRM_MODE_PICTURE_ASPECT_4_3		1
 #define DRM_MODE_PICTURE_ASPECT_16_9		2
+#define DRM_MODE_PICTURE_ASPECT_64_27		3
+#define DRM_MODE_PICTURE_ASPECT_256_135		4
 
 /* Aspect ratio flag bitmask (4 bits 22:19) */
 #define DRM_MODE_FLAG_PIC_AR_MASK		(0x0F<<19)
@@ -98,6 +100,13 @@
 			(DRM_MODE_PICTURE_ASPECT_4_3<<19)
 #define  DRM_MODE_FLAG_PIC_AR_16_9 \
 			(DRM_MODE_PICTURE_ASPECT_16_9<<19)
+#define  DRM_MODE_FLAG_PIC_AR_64_27 \
+			(DRM_MODE_PICTURE_ASPECT_64_27<<19)
+#define  DRM_MODE_FLAG_PIC_AR_256_135 \
+			(DRM_MODE_PICTURE_ASPECT_256_135<<19)
+
+/* HDMI 2.0+ mode flag: will only be set if client supports it */
+#define DRM_MODE_FLAG_HDMI2			(1<<23)
 
 /* DPMS flags */
 /* bit compatible with the xorg definitions. */
Signature · 1 line
1.9.1
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIDAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=BBAO8Rra0sW4KcCLB5lMOfONxg0v9pfUSaDNr5WDh2w&s=p6tAeWYwiSDL7BonKeijv2zmweBF9eW7xV7OX5e5gG4&e=

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

author
#12 lore raw

RFC 3/5 drm: edid: Add HDMI 2.0 CEA video modes

In reply to Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
 /*
Signature · 7 lines
1.9.1


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

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Regards
Andrzej

Quoted 267 lines
---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +251 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),

drivers/gpu/drm/drm_edid.c struct minimode { · line 1264

Quoted 10 lines
drivers/gpu/drm/drm_edid.c +7 -0
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
 /*

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

author
#14 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

Hi Andrzej,

Thanks for the feedback!

Quoted 4 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

Quoted 10 lines

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

But this is what I do in patch 5/5 (see
https://patchwork.kernel.org/patch/9640205/), unless drivers ask to I don't expose the new modes.

Best regards,
Jose Miguel Abreu

Quoted 278 lines

Regards
Andrzej

Quoted 275 lines
---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
Quoted 2 lines

drivers/gpu/drm/drm_edid.c struct minimode { · line 1264

Quoted 1 line
drivers/gpu/drm/drm_edid.c +0 -0
 /*

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

#15 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

Quoted 20 lines · Jose Abreu

Hi Andrzej,

Thanks for the feedback!

Quoted 4 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

Quoted 10 lines

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Quoted 3 lines

But this is what I do in patch 5/5 (see
https://patchwork.kernel.org/patch/9640205/), unless drivers ask to I don't expose the new modes.

I do not see how it is related to infoframe generation. Look at body of drm_hdmi_avi_infoframe_from_display_mode, it calls drm_match_cea_mode, which looks for given mode in edid_cea_modes array.
Anyway if there is or will be a patch which deals with it, it should be applied before extending edid_cea_modes array, not after.

Regards
Andrzej

Quoted 281 lines

Best regards,
Jose Miguel Abreu

Quoted 277 lines

Regards
Andrzej

Quoted 275 lines
---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
Quoted 3 lines
Quoted 1 line

drivers/gpu/drm/drm_edid.c struct minimode { · line 1264

Quoted 1 line
drivers/gpu/drm/drm_edid.c +0 -0
 /*

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

author
#16 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

Hi Andrzej,

Quoted 21 lines · Andrzej Hajda
Quoted 20 lines · Jose Abreu

Hi Andrzej,

Thanks for the feedback!

Quoted 14 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Quoted 6 lines
Quoted 3 lines

But this is what I do in patch 5/5 (see
https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_9640205_&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=c7Qf9lk2pdXRbmjFNPSsZsy7LKiZWrqGlE72r-OTA-M&s=37RkfhQjJpjdKmQniKnhZwb1vtwb6HXSxY2Y7HrNlp4&e= ), unless drivers ask to I don't expose the new modes.

I do not see how it is related to infoframe generation. Look at body of drm_hdmi_avi_infoframe_from_display_mode, it calls drm_match_cea_mode, which looks for given mode in edid_cea_modes array.

Yes but drm_hdmi_avi_infoframe_from_display_mode is called from driver context, so the mode bust be previously probed by the drm core, and it isn't if the hdmi2_allowed flag is not set so the mode will never reach the driver and the infoframe will never be built. And also if the receiver is not HDMI 2.0 compliant then the mode will not also be probed.

But I see a flaw here: If the user specify manually the mode then it will be passed to driver which will try to match with CEA table. Is this the scenario you were thinking about? I think with the new DRM_MODE_FLAG_HDMI2 flag this will not happen, see this:

- Modesetting X driver (for example) does not set HDMI 2 cap
- As the flag is not set HDMI 2 modes will not be exposed to
userspace
- If the user specifies the mode the modesetting driver will
not set HDMI 2 flag
- As the flag is not set then
drm_mode_equal_no_clocks_no_stereo will not match the mode

Of course this needs patches to modesetting X driver, which are not in this series. What do you think?

Quoted 2 lines

Anyway if there is or will be a patch which deals with it, it should be applied before extending edid_cea_modes array, not after.

Right, I will correct this :)

Best regards,
Jose Miguel Abreu

Quoted 287 lines

Regards
Andrzej

Quoted 282 lines

Best regards,
Jose Miguel Abreu

Quoted 278 lines

Regards
Andrzej

Quoted 276 lines
---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
 /*

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

#17 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

Quoted 43 lines · Jose Abreu

Hi Andrzej,

Quoted 21 lines · Andrzej Hajda
Quoted 20 lines · Jose Abreu

Hi Andrzej,

Thanks for the feedback!

Quoted 14 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Quoted 6 lines
Quoted 3 lines

But this is what I do in patch 5/5 (see
https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.kernel.org_patch_9640205_&d=DwICaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=c7Qf9lk2pdXRbmjFNPSsZsy7LKiZWrqGlE72r-OTA-M&s=37RkfhQjJpjdKmQniKnhZwb1vtwb6HXSxY2Y7HrNlp4&e= ), unless drivers ask to I don't expose the new modes.

I do not see how it is related to infoframe generation. Look at body of drm_hdmi_avi_infoframe_from_display_mode, it calls drm_match_cea_mode, which looks for given mode in edid_cea_modes array.

Yes but drm_hdmi_avi_infoframe_from_display_mode is called from driver context, so the mode bust be previously probed by the drm core, and it isn't if the hdmi2_allowed flag is not set so the mode will never reach the driver and the infoframe will never be built. And also if the receiver is not HDMI 2.0 compliant then the mode will not also be probed.

But I see a flaw here: If the user specify manually the mode then it will be passed to driver which will try to match with CEA table. Is this the scenario you were thinking about? I think with the new DRM_MODE_FLAG_HDMI2 flag this will not happen, see this:

Quoted 7 lines

- Modesetting X driver (for example) does not set HDMI 2 cap
- As the flag is not set HDMI 2 modes will not be exposed to
userspace
- If the user specifies the mode the modesetting driver will
not set HDMI 2 flag
- As the flag is not set then
drm_mode_equal_no_clocks_no_stereo will not match the mode

OK I see, HDMI2 flag in mode will distinguish between 4K modes in HDMI1.4 and HDMI2.0, even if all other fields are the same. For now it looks safe indeed in case of HDMI<2 devices.
I am not sure if this approach will not generate problems with drivers supporting both HDMI2 and 4K modes, but this 'issue' is already raised by Daniel.

Regards
Andrzej

Quoted 295 lines

Of course this needs patches to modesetting X driver, which are not in this series. What do you think?

Quoted 2 lines

Anyway if there is or will be a patch which deals with it, it should be applied before extending edid_cea_modes array, not after.

Right, I will correct this :)

Best regards,
Jose Miguel Abreu

Quoted 284 lines

Regards
Andrzej

Quoted 280 lines

Best regards,
Jose Miguel Abreu

Quoted 277 lines

Regards
Andrzej

Quoted 275 lines
---
 drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
 		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
 		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
 	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
 };
 
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

drivers/gpu/drm/drm_edid.c struct minimode { · line 1264

Quoted 1 line
drivers/gpu/drm/drm_edid.c +0 -0
 /*

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

#18 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

In reply to Andrzej Hajda

Regards

Shashank

Quoted 15 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Quoted 2 lines

Regards
Andrzej

I had a small discussion with Ville on this, and we were thinking on adding monitor info before VIC calculation in match_cea_modes() function, so that it should give a VIC of 0 for HDMI 1.4 sinks but appropriate VIC for HDMI 2.0 sink. Consider WIP.

- Shashank

Quoted 275 lines
Quoted 275 lines
---
  drivers/gpu/drm/drm_edid.c | 258 +++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +258 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
  		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
  		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
  	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9, },
+	/* 65 - 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 66 - 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+		   3740, 3960, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 67 - 1280x720@30Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 68 - 1280x720@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 69 - 1280x720@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 70 - 1280x720@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+		   1760, 1980, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 71 - 1280x720@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+		   1430, 1650, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 72 - 1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+		   2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 73 - 1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 74 - 1920x1080@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 75 - 1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 76 - 1920x1080@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	  .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 77 - 1920x1080@100Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+		   2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 78 - 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	 .vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 79 - 1680x720@24Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+		   3080, 3300, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 80 - 1680x720@25Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+		   2948, 3168, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 81 - 1680x720@30Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+		   2420, 2640, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 82 - 1680x720@50Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 83 - 1680x720@60Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+		   1980, 2200, 0, 720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 84 - 1680x720@100Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 85 - 1680x720@120Hz */
+	{ DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+		   1780, 2000, 0, 720, 725, 730, 825, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 86 - 2560x1080@24Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+		   3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 87 - 2560x1080@25Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+		   3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 88 - 2560x1080@30Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+		   3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 89 - 2560x1080@50Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 90 - 2560x1080@60Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+		   2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 91 - 2560x1080@100Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+		   2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 100, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 92 - 2560x1080@120Hz */
+	{ DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+		   3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 120, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27, },
+	/* 93 - 3840x2160p@24Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9,},
+	/* 94 - 3840x2160p@25Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 95 - 3840x2160p@30Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 96 - 3840x2160p@50Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 97 - 3840x2160p@60Hz 16:9 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+	/* 98 - 4096x2160p@24Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 99 - 4096x2160p@25Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 100 - 4096x2160p@30Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 101 - 4096x2160p@50Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+		   5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 102 - 4096x2160p@60Hz 256:135 */
+	{ DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+		   4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_256_135},
+	/* 103 - 3840x2160p@24Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+		   5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 24, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 104 - 3840x2160p@25Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 105 - 3840x2160p@30Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 106 - 3840x2160p@50Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+		   4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
+	/* 107 - 3840x2160p@60Hz 64:27 */
+	{ DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+		   4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+		   DRM_MODE_FLAG_HDMI2),
+	.vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_64_27},
  };
 
Quoted 6 lines

drivers/gpu/drm/drm_edid.c struct minimode { · line 1264

Quoted 1 line
drivers/gpu/drm/drm_edid.c +0 -0
  /*

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

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

#19 lore raw

Re: [RFC 3/5] drm: edid: Add HDMI 2.0 CEA video modes

You guys might wanna use this series, to solve this problem.

https://patchwork.freedesktop.org/series/21773/

Patch 1: completes the CEA modes 1-107

Patch 2: Protects HDMI 1.4 monitors from HDMI 2.0 VICs

Regards
Shashank

Quoted 21 lines · Shashank

Regards

Shashank

Quoted 15 lines · Andrzej Hajda
Quoted 3 lines · Jose Abreu

This patch completes CEA table of video modes so that VIC 1-107 are now available. Use the HDMI 2.0+ flag to signal these are modes for HDMI 2.0 onwards.

edid_cea_modes array is used in different contexts, simple extensions of the array with modes not present in HDMI < 2.0 can result in different behavior of drivers.
There should be put sentinels somewhere to limit table lookup to old VICs if device/driver/receiver is not HDMI2.0 compliant.
The only situation I am aware of at the moment is infoframe generation code. For TVs not supporting 4K modes but not HDMI 2.0 compatible, VIC field in AVI infoframe should be 0 for 4K modes and vendor infoframe should be generated with proper HDMI-VIC. With current infoframe helpers and this patch it will not work this way.

Quoted 329 lines
Quoted 2 lines

Regards
Andrzej

I had a small discussion with Ville on this, and we were thinking on adding monitor info before VIC calculation in match_cea_modes() function, so that it should give a VIC of 0 for HDMI 1.4 sinks but appropriate VIC for HDMI 2.0 sink. Consider WIP.

- Shashank

Quoted 321 lines
Quoted 314 lines
---
  drivers/gpu/drm/drm_edid.c | 258 
+++++++++++++++++++++++++++++++++++++++++++++
  1 file changed, 258 insertions(+)
drivers/gpu/drm/drm_edid.c +18 -0
index fad3d44..90080368 100644
@@ -1001,6 +1001,264 @@ struct minimode {
             2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
             DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
       .vrefresh = 100, .picture_aspect_ratio = 
 HDMI_PICTURE_ASPECT_16_9, },
+    /* 65 - 1280x720@24Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400, 1280, 3040,
+           3080, 3300, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 24, .picture_aspect_ratio = 
 HDMI_PICTURE_ASPECT_64_27, },
+    /* 66 - 1280x720@25Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3700,
+           3740, 3960, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 25, .picture_aspect_ratio = 
 HDMI_PICTURE_ASPECT_64_27, },
+    /* 67 - 1280x720@30Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 3040,
+           3080, 3300, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 68 - 1280x720@50Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1720,
+           1760, 1980, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 69 - 1280x720@60Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250, 1280, 1390,
+           1430, 1650, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 70 - 1280x720@100Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1720,
+           1760, 1980, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 100, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 71 - 1280x720@120Hz */
+    { DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500, 1280, 1390,
+           1430, 1650, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 120, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 72 - 1920x1080@24Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2558,
+           2602, 2750, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 73 - 1920x1080@25Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2448,
+           2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 25, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 74 - 1920x1080@30Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250, 1920, 2008,
+           2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 75 - 1920x1080@50Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2448,
+           2492, 2640, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 76 - 1920x1080@60Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
+           2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+      .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 77 - 1920x1080@100Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2448,
+           2492, 2640, 0, 1080, 1084, 1094, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+     .vrefresh = 100, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 78 - 1920x1080@120Hz */
+    { DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000, 1920, 2008,
+           2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+     .vrefresh = 120, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 79 - 1680x720@24Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 3040,
+           3080, 3300, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 80 - 1680x720@25Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2908,
+           2948, 3168, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 25, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 81 - 1680x720@30Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 59400, 1680, 2380,
+           2420, 2640, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 82 - 1680x720@50Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 82500, 1680, 1940,
+           1980, 2200, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 83 - 1680x720@60Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 99000, 1680, 1940,
+           1980, 2200, 0, 720, 725, 730, 750, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 84 - 1680x720@100Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 165000, 1680, 1740,
+           1780, 2000, 0, 720, 725, 730, 825, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 100, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 85 - 1680x720@120Hz */
+    { DRM_MODE("1680x720", DRM_MODE_TYPE_DRIVER, 198000, 1680, 1740,
+           1780, 2000, 0, 720, 725, 730, 825, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 120, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 86 - 2560x1080@24Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 99000, 2560, 3558,
+           3602, 3750, 0, 1080, 1084, 1089, 1100, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 87 - 2560x1080@25Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 90000, 2560, 3008,
+           3052, 3200, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 25, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 88 - 2560x1080@30Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 118800, 2560, 3328,
+           3372, 3520, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 89 - 2560x1080@50Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 185625, 2560, 3108,
+           3152, 3300, 0, 1080, 1084, 1089, 1125, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 90 - 2560x1080@60Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 198000, 2560, 2808,
+           2852, 3000, 0, 1080, 1084, 1089, 1100, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 91 - 2560x1080@100Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 371250, 2560, 2778,
+           2822, 2970, 0, 1080, 1084, 1089, 1250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 100, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 92 - 2560x1080@120Hz */
+    { DRM_MODE("2560x1080", DRM_MODE_TYPE_DRIVER, 495000, 2560, 3108,
+           3152, 3300, 0, 1080, 1084, 1089, 1250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 120, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27, },

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 93 - 3840x2160p@24Hz 16:9 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+           5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_16_9,},

drivers/gpu/drm/drm_edid.c +30 -0
+    /* 94 - 3840x2160p@25Hz 16:9 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4896,
+           4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 25, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+    /* 95 - 3840x2160p@30Hz 16:9 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+           4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 30, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+    /* 96 - 3840x2160p@50Hz 16:9 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+           4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+    /* 97 - 3840x2160p@60Hz 16:9 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+           4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 60, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_16_9},
+    /* 98 - 4096x2160p@24Hz 256:135 */
+    { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5116,
+           5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_256_135},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 99 - 4096x2160p@25Hz 256:135 */
+    { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 5064,
+           5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 25, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_256_135},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 100 - 4096x2160p@30Hz 256:135 */
+    { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 297000, 4096, 4184,
+           4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_256_135},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 101 - 4096x2160p@50Hz 256:135 */
+    { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 5064,
+           5152, 5280, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_256_135},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 102 - 4096x2160p@60Hz 256:135 */
+    { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 594000, 4096, 4184,
+           4272, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_256_135},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 103 - 3840x2160p@24Hz 64:27 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 5116,
+           5204, 5500, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 24, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 104 - 3840x2160p@25Hz 64:27 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+           4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 25, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 105 - 3840x2160p@30Hz 64:27 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 297000, 3840, 4016,
+           4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 30, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 106 - 3840x2160p@50Hz 64:27 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4896,
+           4984, 5280, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 50, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27},

drivers/gpu/drm/drm_edid.c +6 -0
+    /* 107 - 3840x2160p@60Hz 64:27 */
+    { DRM_MODE("3840x2160", DRM_MODE_TYPE_DRIVER, 594000, 3840, 4016,
+           4104, 4400, 0, 2160, 2168, 2178, 2250, 0,
+           DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC |
+           DRM_MODE_FLAG_HDMI2),
+    .vrefresh = 60, .picture_aspect_ratio = 

HDMI_PICTURE_ASPECT_64_27},

Quoted 2 lines
  };
    /*

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

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

author
#20 lore raw

RFC 4/5 drm: connector: Add hdmi2_allowed flag

In reply to Jose Abreu

Add a new HDMI 2.0+ flag which will signal core that the connector can handle HDMI 2.0+ video modes.

---
 include/drm/drm_connector.h | 2 ++
 1 file changed, 2 insertions(+)
include/drm/drm_connector.h +2 -0
index f8b766d..f3db9bd 100644
@@ -637,6 +637,7 @@ struct drm_cmdline_mode {
  * @interlace_allowed: can this connector handle interlaced modes?
  * @doublescan_allowed: can this connector handle doublescan?
  * @stereo_allowed: can this connector handle stereo modes?
+ * @hdmi2_allowed: can this connector handle HDMI 2.0+ modes?
  * @funcs: connector control functions
  * @edid_blob_ptr: DRM property containing EDID if present
  * @properties: property tracking for this connector
@@ -701,6 +702,7 @@ struct drm_connector {
 	bool interlace_allowed;
 	bool doublescan_allowed;
 	bool stereo_allowed;
+	bool hdmi2_allowed;
 	/**
 	 * @registered: Is this connector exposed (registered) with userspace?
 	 * Protected by @mutex.
Signature · 7 lines
1.9.1


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

RFC 5/5 drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked to

In reply to Jose Abreu

Perform sanity checks so that HDMI 2.0+ modes are not exported to drivers or userspace unless asked to.

---
 drivers/gpu/drm/drm_connector.c    |  2 ++
 drivers/gpu/drm/drm_probe_helper.c |  9 ++++++++-
 include/drm/drm_modes.h            | 14 ++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_connector.c +2 -0
index 9f84761..430bb2b 100644
@@ -1200,6 +1200,8 @@ static bool drm_mode_expose_to_userspace(const struct drm_display_mode *mode,
 	 */
 	if (!file_priv->stereo_allowed && drm_mode_is_stereo(mode))
 		return false;
+	if (!file_priv->hdmi2_allowed && drm_mode_is_hdmi2(mode))
+		return false;
 
 	return true;
 }
drivers/gpu/drm/drm_probe_helper.c +8 -1
index 85005d5..ddacb5d 100644
@@ -77,6 +77,10 @@
 	    !(flags & DRM_MODE_FLAG_3D_MASK))
 		return MODE_NO_STEREO;
 
+	if ((mode->flags & DRM_MODE_FLAG_HDMI2) &&
+	    !(flags & DRM_MODE_FLAG_HDMI2))
+		return MODE_NO_HDMI2;
+
 	return MODE_OK;
 }
 
@@ -221,7 +225,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
  *    - drm_mode_validate_size() filters out modes larger than @maxX and @maxY
  *      (if specified)
  *    - drm_mode_validate_flag() checks the modes against basic connector
- *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed)
+ *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed,
+ *      hdmi2_allowed)
  *    - the optional &drm_connector_helper_funcs.mode_valid helper can perform
  *      driver and/or hardware specific checks
  *
@@ -336,6 +341,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 		mode_flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (connector->stereo_allowed)
 		mode_flags |= DRM_MODE_FLAG_3D_MASK;
+	if (connector->hdmi2_allowed)
+		mode_flags |= DRM_MODE_FLAG_HDMI2;
 
 	list_for_each_entry(mode, &connector->modes, head) {
 		if (mode->status == MODE_OK)
include/drm/drm_modes.h +14 -0
index 6dd34280..83466ff 100644
@@ -80,6 +80,7 @@
  * @MODE_ONE_SIZE: only one resolution is supported
  * @MODE_NO_REDUCED: monitor doesn't accept reduced blanking
  * @MODE_NO_STEREO: stereo modes not supported
+ * @MODE_NO_HDMI2: HDMI 2.0+ modes not supported
  * @MODE_STALE: mode has become stale
  * @MODE_BAD: unspecified reason
  * @MODE_ERROR: error condition
@@ -124,6 +125,7 @@ enum drm_mode_status {
 	MODE_ONE_SIZE,
 	MODE_NO_REDUCED,
 	MODE_NO_STEREO,
+	MODE_NO_HDMI2,
 	MODE_STALE = -3,
 	MODE_BAD = -2,
 	MODE_ERROR = -1
@@ -422,6 +424,18 @@ static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode)
 	return mode->flags & DRM_MODE_FLAG_3D_MASK;
 }
 
+/**
+ * drm_mode_is_hdmi2 - check for HDMI 2.0+ mode flag
+ * @mode: drm_display_mode to check
+ *
+ * Returns:
+ * True if the mode is HDMI 2.0+ mode, false if not
+ */
+static inline bool drm_mode_is_hdmi2(const struct drm_display_mode *mode)
+{
+	return mode->flags & DRM_MODE_FLAG_HDMI2;
+}
+
 struct drm_connector;
 struct drm_cmdline_mode;
 
Signature · 7 lines
1.9.1


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

Re: [RFC 5/5] drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked to

Quoted 2 lines · Jose Abreu

Perform sanity checks so that HDMI 2.0+ modes are not exported to drivers or userspace unless asked to.

Why? They're just normal modes, this doesn't make sense. If you want to filter the aspect ratio stuff, that makes sense, but exposing the modes with default aspect ratio by default should be doable.

I'm also not sure how exactly this is supposed to interact with the partially reverted aspect ratio filtering from Shashank. I guess what you really want is the feature flag for exposing aspect ratio, and then filter accordingly.
-Daniel

Quoted 104 lines
---
 drivers/gpu/drm/drm_connector.c    |  2 ++
 drivers/gpu/drm/drm_probe_helper.c |  9 ++++++++-
 include/drm/drm_modes.h            | 14 ++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_connector.c +2 -0
index 9f84761..430bb2b 100644
@@ -1200,6 +1200,8 @@ static bool drm_mode_expose_to_userspace(const struct drm_display_mode *mode,
 	 */
 	if (!file_priv->stereo_allowed && drm_mode_is_stereo(mode))
 		return false;
+	if (!file_priv->hdmi2_allowed && drm_mode_is_hdmi2(mode))
+		return false;
 
 	return true;
 }
drivers/gpu/drm/drm_probe_helper.c +8 -1
index 85005d5..ddacb5d 100644
@@ -77,6 +77,10 @@
 	    !(flags & DRM_MODE_FLAG_3D_MASK))
 		return MODE_NO_STEREO;
 
+	if ((mode->flags & DRM_MODE_FLAG_HDMI2) &&
+	    !(flags & DRM_MODE_FLAG_HDMI2))
+		return MODE_NO_HDMI2;
+
 	return MODE_OK;
 }
 
@@ -221,7 +225,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
  *    - drm_mode_validate_size() filters out modes larger than @maxX and @maxY
  *      (if specified)
  *    - drm_mode_validate_flag() checks the modes against basic connector
- *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed)
+ *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed,
+ *      hdmi2_allowed)
  *    - the optional &drm_connector_helper_funcs.mode_valid helper can perform
  *      driver and/or hardware specific checks
  *
@@ -336,6 +341,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 		mode_flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (connector->stereo_allowed)
 		mode_flags |= DRM_MODE_FLAG_3D_MASK;
+	if (connector->hdmi2_allowed)
+		mode_flags |= DRM_MODE_FLAG_HDMI2;
 
 	list_for_each_entry(mode, &connector->modes, head) {
 		if (mode->status == MODE_OK)
include/drm/drm_modes.h +14 -0
index 6dd34280..83466ff 100644
@@ -80,6 +80,7 @@
  * @MODE_ONE_SIZE: only one resolution is supported
  * @MODE_NO_REDUCED: monitor doesn't accept reduced blanking
  * @MODE_NO_STEREO: stereo modes not supported
+ * @MODE_NO_HDMI2: HDMI 2.0+ modes not supported
  * @MODE_STALE: mode has become stale
  * @MODE_BAD: unspecified reason
  * @MODE_ERROR: error condition
@@ -124,6 +125,7 @@ enum drm_mode_status {
 	MODE_ONE_SIZE,
 	MODE_NO_REDUCED,
 	MODE_NO_STEREO,
+	MODE_NO_HDMI2,
 	MODE_STALE = -3,
 	MODE_BAD = -2,
 	MODE_ERROR = -1
@@ -422,6 +424,18 @@ static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode)
 	return mode->flags & DRM_MODE_FLAG_3D_MASK;
 }
 
+/**
+ * drm_mode_is_hdmi2 - check for HDMI 2.0+ mode flag
+ * @mode: drm_display_mode to check
+ *
+ * Returns:
+ * True if the mode is HDMI 2.0+ mode, false if not
+ */
+static inline bool drm_mode_is_hdmi2(const struct drm_display_mode *mode)
+{
+	return mode->flags & DRM_MODE_FLAG_HDMI2;
+}
+
 struct drm_connector;
 struct drm_cmdline_mode;
 
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author
#23 lore raw

Re: [RFC 5/5] drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked to

Hi Daniel,

Thanks for the feedback!

Quoted 6 lines · Daniel Vetter
Quoted 2 lines · Jose Abreu

Perform sanity checks so that HDMI 2.0+ modes are not exported to drivers or userspace unless asked to.

Why? They're just normal modes, this doesn't make sense. If you want to filter the aspect ratio stuff, that makes sense, but exposing the modes with default aspect ratio by default should be doable.

Yes my initial intention was to hide the new aspect ratio modes from drivers so that only HDMI 1.4 modes will be available to non HDMI 2.0+ drivers. I think that we should avoid exposing these new modes to drivers. They have higher pixel clock values and sometimes EDID can declare that some modes should use a specific colorspace (YCbCr 4:2:0), but this is another story.

My argument is not very strong though: Pixel clock must always be checked by drivers and rejected if not supported as well as aspect ratio flags. Do you know of any driver that does not do this?

Quoted 5 lines

I'm also not sure how exactly this is supposed to interact with the partially reverted aspect ratio filtering from Shashank. I guess what you really want is the feature flag for exposing aspect ratio, and then filter accordingly.

So you propose to change this validation to only check for aspect ratio flags? Shouldn't we play it safe and allow this flag so that if anything besides aspect ratio arises we can safely prevent drivers from getting the mode?

Notice that this flag is not for HDMI 2.0 modes only, it is for HDMI 2.0+. I'm thinking about HDMI 2.1 which will include new video modes and possible even new flags.

Best regards,
Jose Miguel Abreu

Quoted 96 lines

-Daniel

Quoted 95 lines
---
 drivers/gpu/drm/drm_connector.c    |  2 ++
 drivers/gpu/drm/drm_probe_helper.c |  9 ++++++++-
 include/drm/drm_modes.h            | 14 ++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_connector.c +2 -0
index 9f84761..430bb2b 100644
@@ -1200,6 +1200,8 @@ static bool drm_mode_expose_to_userspace(const struct drm_display_mode *mode,
 	 */
 	if (!file_priv->stereo_allowed && drm_mode_is_stereo(mode))
 		return false;
+	if (!file_priv->hdmi2_allowed && drm_mode_is_hdmi2(mode))
+		return false;
 
 	return true;
 }
drivers/gpu/drm/drm_probe_helper.c +8 -1
index 85005d5..ddacb5d 100644
@@ -77,6 +77,10 @@
 	    !(flags & DRM_MODE_FLAG_3D_MASK))
 		return MODE_NO_STEREO;
 
+	if ((mode->flags & DRM_MODE_FLAG_HDMI2) &&
+	    !(flags & DRM_MODE_FLAG_HDMI2))
+		return MODE_NO_HDMI2;
+
 	return MODE_OK;
 }
 
@@ -221,7 +225,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
  *    - drm_mode_validate_size() filters out modes larger than @maxX and @maxY
  *      (if specified)
  *    - drm_mode_validate_flag() checks the modes against basic connector
- *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed)
+ *      capabilities (interlace_allowed,doublescan_allowed,stereo_allowed,
+ *      hdmi2_allowed)
  *    - the optional &drm_connector_helper_funcs.mode_valid helper can perform
  *      driver and/or hardware specific checks
  *
@@ -336,6 +341,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
 		mode_flags |= DRM_MODE_FLAG_DBLSCAN;
 	if (connector->stereo_allowed)
 		mode_flags |= DRM_MODE_FLAG_3D_MASK;
+	if (connector->hdmi2_allowed)
+		mode_flags |= DRM_MODE_FLAG_HDMI2;
 
 	list_for_each_entry(mode, &connector->modes, head) {
 		if (mode->status == MODE_OK)
include/drm/drm_modes.h +14 -0
index 6dd34280..83466ff 100644
@@ -80,6 +80,7 @@
  * @MODE_ONE_SIZE: only one resolution is supported
  * @MODE_NO_REDUCED: monitor doesn't accept reduced blanking
  * @MODE_NO_STEREO: stereo modes not supported
+ * @MODE_NO_HDMI2: HDMI 2.0+ modes not supported
  * @MODE_STALE: mode has become stale
  * @MODE_BAD: unspecified reason
  * @MODE_ERROR: error condition
@@ -124,6 +125,7 @@ enum drm_mode_status {
 	MODE_ONE_SIZE,
 	MODE_NO_REDUCED,
 	MODE_NO_STEREO,
+	MODE_NO_HDMI2,
 	MODE_STALE = -3,
 	MODE_BAD = -2,
 	MODE_ERROR = -1
@@ -422,6 +424,18 @@ static inline bool drm_mode_is_stereo(const struct drm_display_mode *mode)
 	return mode->flags & DRM_MODE_FLAG_3D_MASK;
 }
 
+/**
+ * drm_mode_is_hdmi2 - check for HDMI 2.0+ mode flag
+ * @mode: drm_display_mode to check
+ *
+ * Returns:
+ * True if the mode is HDMI 2.0+ mode, false if not
+ */
+static inline bool drm_mode_is_hdmi2(const struct drm_display_mode *mode)
+{
+	return mode->flags & DRM_MODE_FLAG_HDMI2;
+}
+
 struct drm_connector;
 struct drm_cmdline_mode;
 
Quoted 8 lines
Quoted 8 lines
Signature · 7 lines
1.9.1


_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIBAg&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=ZrB1FUUWlSj6zYGBcO_CFTd1XHdKAzijVyu1XqZ5gfc&s=fMJ9nzD0WR6AhnAOZug1j9qT7yb0_i3tu8BC_D6qiGs&e= 

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

author
#24 lore raw
In reply to Jose Abreu

++ Daniel

++ Ville

++ Shashank

Quoted 38 lines · Jose Abreu

Hi all,

This is a RFC series that aims to collect comments regarding the handling of HDMI 2.0+ video modes and features in the DRM core.

Some of the HDMI 2.0 features are already implemented and only affect kernel drivers (SDCD for example). There are some features, though, which can, and will, affect userspace.

It is clear that userspace can't be broken, so, based on previous discussions I started implementing a "HDMI 2.0+ knob" which can be set by userspace to enable HDMI 2.0+ features.

For now this only limits the exposing of the video modes defined in CEA-861-F, but it can be extended adding, for example, YCbCr 4:2:0.

Please do not see this as a formal patch as this wasn't even compiled tested but, please, feel free to comment :)

NOTE: The adding of the new video modes timings was originally done by Shashank Sharma <[email protected]> so, credit to him. I modified it a little bit (added the HDMI 2.0+ flag) and I don't know if I should add his signed-off-by as it was modified.

Best regards,
Jose Miguel Abreu

Cc Carlos Palminha <[email protected]>

Jose Abreu (5):
drm: Add HDMI 2.0+ features exposing knob
drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag
drm: edid: Add HDMI 2.0 CEA video modes
drm: connector: Add hdmi2_allowed flag
drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked
to

Quoted 11 lines
 drivers/gpu/drm/drm_connector.c    |   2 +
 drivers/gpu/drm/drm_edid.c         | 258 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_ioctl.c        |   5 +
 drivers/gpu/drm/drm_probe_helper.c |   9 +-
 include/drm/drm_connector.h        |   2 +
 include/drm/drm_file.h             |   8 ++
 include/drm/drm_modes.h            |  14 ++
 include/uapi/drm/drm.h             |   7 +
 include/uapi/drm/drm_mode.h        |   9 ++
 9 files changed, 313 insertions(+), 1 deletion(-)

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

#25 lore raw

Hi Jose,
I can't find the other patches of this series in dri patchwork, am I missing something ?

Also, I am planning to publish a series for YUV 420 handling, where I have re-used one of your patch to parse YUV 420 block, with some modifications :-).

Regards
Shashank
-----Original Message-----
From: Jose Abreu [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:13 PM
To: [email protected]
Cc: Carlos Palminha <[email protected]>; Vetter, Daniel <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]
Subject: Re: [RFC 0/5] HDMI 2.0+ video modes handling in DRM core

++ Daniel

++ Ville

++ Shashank

Quoted 38 lines · Jose Abreu

Hi all,

This is a RFC series that aims to collect comments regarding the handling of HDMI 2.0+ video modes and features in the DRM core.

Some of the HDMI 2.0 features are already implemented and only affect kernel drivers (SDCD for example). There are some features, though, which can, and will, affect userspace.

It is clear that userspace can't be broken, so, based on previous discussions I started implementing a "HDMI 2.0+ knob" which can be set by userspace to enable HDMI 2.0+ features.

For now this only limits the exposing of the video modes defined in CEA-861-F, but it can be extended adding, for example, YCbCr 4:2:0.

Please do not see this as a formal patch as this wasn't even compiled tested but, please, feel free to comment :)

NOTE: The adding of the new video modes timings was originally done by Shashank Sharma <[email protected]> so, credit to him. I modified it a little bit (added the HDMI 2.0+ flag) and I don't know if I should add his signed-off-by as it was modified.

Best regards,
Jose Miguel Abreu

Cc Carlos Palminha <[email protected]>

Jose Abreu (5):
drm: Add HDMI 2.0+ features exposing knob
drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag
drm: edid: Add HDMI 2.0 CEA video modes
drm: connector: Add hdmi2_allowed flag
drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked
to

Quoted 11 lines
 drivers/gpu/drm/drm_connector.c    |   2 +
 drivers/gpu/drm/drm_edid.c         | 258 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_ioctl.c        |   5 +
 drivers/gpu/drm/drm_probe_helper.c |   9 +-
 include/drm/drm_connector.h        |   2 +
 include/drm/drm_file.h             |   8 ++
 include/drm/drm_modes.h            |  14 ++
 include/uapi/drm/drm.h             |   7 +
 include/uapi/drm/drm_mode.h        |   9 ++
 9 files changed, 313 insertions(+), 1 deletion(-)

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

author
#26 lore raw

Hi Shashank,

Quoted 2 lines · Shashank

Hi Jose,
I can't find the other patches of this series in dri patchwork, am I missing something ?

You can find them now in patchwork (I don't know what happened).

Quoted 2 lines

Also, I am planning to publish a series for YUV 420 handling, where I have re-used one of your patch to parse YUV 420 block, with some modifications :-).

Nice :) Please cc me and I will try to review them.

Best regards,
Jose Miguel Abreu

Quoted 67 lines

Regards
Shashank
-----Original Message-----
From: Jose Abreu [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:13 PM
To: [email protected]
Cc: Carlos Palminha <[email protected]>; Vetter, Daniel <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]
Subject: Re: [RFC 0/5] HDMI 2.0+ video modes handling in DRM core

++ Daniel

++ Ville

++ Shashank

Quoted 38 lines · Jose Abreu

Hi all,

This is a RFC series that aims to collect comments regarding the handling of HDMI 2.0+ video modes and features in the DRM core.

Some of the HDMI 2.0 features are already implemented and only affect kernel drivers (SDCD for example). There are some features, though, which can, and will, affect userspace.

It is clear that userspace can't be broken, so, based on previous discussions I started implementing a "HDMI 2.0+ knob" which can be set by userspace to enable HDMI 2.0+ features.

For now this only limits the exposing of the video modes defined in CEA-861-F, but it can be extended adding, for example, YCbCr 4:2:0.

Please do not see this as a formal patch as this wasn't even compiled tested but, please, feel free to comment :)

NOTE: The adding of the new video modes timings was originally done by Shashank Sharma <[email protected]> so, credit to him. I modified it a little bit (added the HDMI 2.0+ flag) and I don't know if I should add his signed-off-by as it was modified.

Best regards,
Jose Miguel Abreu

Cc Carlos Palminha <[email protected]>

Jose Abreu (5):
drm: Add HDMI 2.0+ features exposing knob
drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag
drm: edid: Add HDMI 2.0 CEA video modes
drm: connector: Add hdmi2_allowed flag
drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked
to

Quoted 11 lines
 drivers/gpu/drm/drm_connector.c    |   2 +
 drivers/gpu/drm/drm_edid.c         | 258 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/drm_ioctl.c        |   5 +
 drivers/gpu/drm/drm_probe_helper.c |   9 +-
 include/drm/drm_connector.h        |   2 +
 include/drm/drm_file.h             |   8 ++
 include/drm/drm_modes.h            |  14 ++
 include/uapi/drm/drm.h             |   7 +
 include/uapi/drm/drm_mode.h        |   9 ++
 9 files changed, 313 insertions(+), 1 deletion(-)
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=yaVFU4TjGY0gVF8El1uKcisy6TPsyCl9uN7Wsis-qhY&m=2OKRtIbkxjKURLp5pmoJ8lSSpsZfM6cXwik8mwS0U_4&s=oxPm-LzATMtdXVlKmybIHwYKhKvT-eeayLhz7xRtQkg&e=

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

#27 lore raw

I realized it was too early to search that in dri-devel last night, I guess it takes some time to sync.

Now I can see them all :)

Quoted 6 lines · Jose Abreu

Hi Shashank,

Quoted 2 lines · Shashank

Hi Jose,
I can't find the other patches of this series in dri patchwork, am I missing something ?

Quoted 78 lines

You can find them now in patchwork (I don't know what happened).

Quoted 1 line

Also, I am planning to publish a series for YUV 420 handling, where I have re-used one of your patch to parse YUV 420 block, with some modifications :-).

Nice :) Please cc me and I will try to review them.

Best regards,
Jose Miguel Abreu

Quoted 70 lines

Regards
Shashank
-----Original Message-----
From: Jose Abreu [mailto:[email protected]]
Sent: Wednesday, March 22, 2017 8:13 PM
To: [email protected]
Cc: Carlos Palminha <[email protected]>; Vetter, Daniel <[email protected]>; Sharma, Shashank <[email protected]>; [email protected]
Subject: Re: [RFC 0/5] HDMI 2.0+ video modes handling in DRM core

++ Daniel

++ Ville

++ Shashank

Quoted 38 lines · Jose Abreu

Hi all,

This is a RFC series that aims to collect comments regarding the handling of HDMI 2.0+ video modes and features in the DRM core.

Some of the HDMI 2.0 features are already implemented and only affect kernel drivers (SDCD for example). There are some features, though, which can, and will, affect userspace.

It is clear that userspace can't be broken, so, based on previous discussions I started implementing a "HDMI 2.0+ knob" which can be set by userspace to enable HDMI 2.0+ features.

For now this only limits the exposing of the video modes defined in CEA-861-F, but it can be extended adding, for example, YCbCr 4:2:0.

Please do not see this as a formal patch as this wasn't even compiled tested but, please, feel free to comment :)

NOTE: The adding of the new video modes timings was originally done by Shashank Sharma <[email protected]> so, credit to him. I modified it a little bit (added the HDMI 2.0+ flag) and I don't know if I should add his signed-off-by as it was modified.

Best regards,
Jose Miguel Abreu

Cc Carlos Palminha <[email protected]>

Jose Abreu (5):
drm: Add HDMI 2.0+ features exposing knob
drm: uapi: Add HDMI 2.0 aspect ratio flags and HDMI 2.0+ mode flag
drm: edid: Add HDMI 2.0 CEA video modes
drm: connector: Add hdmi2_allowed flag
drm: Do not expose HDMI 2.0+ modes to userspace/drivers unless asked
to

Quoted 11 lines
  drivers/gpu/drm/drm_connector.c    |   2 +
  drivers/gpu/drm/drm_edid.c         | 258 +++++++++++++++++++++++++++++++++++++
  drivers/gpu/drm/drm_ioctl.c        |   5 +
  drivers/gpu/drm/drm_probe_helper.c |   9 +-
  include/drm/drm_connector.h        |   2 +
  include/drm/drm_file.h             |   8 ++
  include/drm/drm_modes.h            |  14 ++
  include/uapi/drm/drm.h             |   7 +
  include/uapi/drm/drm_mode.h        |   9 ++
  9 files changed, 313 insertions(+), 1 deletion(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIGaQ&c=DPL6_X_6JkXFx7AXWqB0tg&r=yaVFU4TjGY0gVF8El1uKcisy6TPsyCl9uN7Wsis-qhY&m=2OKRtIbkxjKURLp5pmoJ8lSSpsZfM6cXwik8mwS0U_4&s=oxPm-LzATMtdXVlKmybIHwYKhKvT-eeayLhz7xRtQkg&e=

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