Skip to contentSkip to conversation

drm/edid: Clean up DRM_EDID_DIGITAL_* flags

PATCH In review Ville Syrjala 3 participants 5 messages May 29, 2019 – Jun 6, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/edid: Clean up DRM_EDID_DIGITAL_* flags

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

Give the "DFP 1.x" bit a proper name, and clean up the rest of the bits defines as well.

---
 drivers/gpu/drm/drm_edid.c |  2 +-
 include/drm/drm_edid.h     | 32 +++++++++++++++++---------------
 2 files changed, 18 insertions(+), 16 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index d87f574feeca..dd601ed6a30e 100644
@@ -4570,7 +4570,7 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
 	 * extensions which tell otherwise.
 	 */
 	if ((info->bpc == 0) && (edid->revision < 4) &&
-	    (edid->input & DRM_EDID_DIGITAL_TYPE_DVI)) {
+	    (edid->input & DRM_EDID_DIGITAL_DFP_1_X)) {
 		info->bpc = 8;
 		DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
 			  connector->name, info->bpc);
include/drm/drm_edid.h +17 -15
index 0e21e91c4314..88b63801f9db 100644
@@ -177,21 +177,23 @@ struct detailed_timing {
 #define DRM_EDID_INPUT_BLANK_TO_BLACK  (1 << 4)
 #define DRM_EDID_INPUT_VIDEO_LEVEL     (3 << 5)
 #define DRM_EDID_INPUT_DIGITAL         (1 << 7)
-#define DRM_EDID_DIGITAL_DEPTH_MASK    (7 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_UNDEF   (0 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_6       (1 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_8       (2 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_10      (3 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_12      (4 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_14      (5 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_16      (6 << 4)
-#define DRM_EDID_DIGITAL_DEPTH_RSVD    (7 << 4)
-#define DRM_EDID_DIGITAL_TYPE_UNDEF    (0)
-#define DRM_EDID_DIGITAL_TYPE_DVI      (1)
-#define DRM_EDID_DIGITAL_TYPE_HDMI_A   (2)
-#define DRM_EDID_DIGITAL_TYPE_HDMI_B   (3)
-#define DRM_EDID_DIGITAL_TYPE_MDDI     (4)
-#define DRM_EDID_DIGITAL_TYPE_DP       (5)
+#define DRM_EDID_DIGITAL_DEPTH_MASK    (7 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_UNDEF   (0 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_6       (1 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_8       (2 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_10      (3 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_12      (4 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_14      (5 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_16      (6 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_DEPTH_RSVD    (7 << 4) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_MASK     (7 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_UNDEF    (0 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_DVI      (1 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_HDMI_A   (2 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_HDMI_B   (3 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_MDDI     (4 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_TYPE_DP       (5 << 0) /* 1.4 */
+#define DRM_EDID_DIGITAL_DFP_1_X       (1 << 0) /* 1.3 */
 
 #define DRM_EDID_FEATURE_DEFAULT_GTF      (1 << 0)
 #define DRM_EDID_FEATURE_PREFERRED_TIMING (1 << 1)
Signature · 6 lines
2.21.0

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

PATCH 2/2 drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -2
index dd601ed6a30e..c3296a72fff9 100644
@@ -4569,8 +4569,8 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
 	 * tells us to assume 8 bpc color depth if the EDID doesn't have
 	 * extensions which tell otherwise.
 	 */
-	if ((info->bpc == 0) && (edid->revision < 4) &&
-	    (edid->input & DRM_EDID_DIGITAL_DFP_1_X)) {
+	if (info->bpc == 0 && edid->revision == 3 &&
+	    edid->input & DRM_EDID_DIGITAL_DFP_1_X) {
 		info->bpc = 8;
 		DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
 			  connector->name, info->bpc);
Signature · 6 lines
2.21.0

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

Re: [PATCH 2/2] drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier

Quoted 8 lines · Ville Syrjala

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

Quoted 5 lines

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

Series is:

Quoted 22 lines
---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -3
index dd601ed6a30e..c3296a72fff9 100644
@@ -4569,8 +4569,8 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
         * tells us to assume 8 bpc color depth if the EDID doesn't have
         * extensions which tell otherwise.
         */
-       if ((info->bpc == 0) && (edid->revision < 4) &&
-           (edid->input & DRM_EDID_DIGITAL_DFP_1_X)) {
+       if (info->bpc == 0 && edid->revision == 3 &&
+           edid->input & DRM_EDID_DIGITAL_DFP_1_X) {
                info->bpc = 8;
                DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
                          connector->name, info->bpc);
--

2.21.0

Quoted 4 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

Reviewed-by
#3 lore raw

Re: [PATCH 2/2] drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier

Quoted 8 lines · Ville Syrjala

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

Quoted 5 lines

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

Yes. Series is:

-mario

Quoted 42 lines · Alex Deucher
Quoted 8 lines · Ville Syrjala

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

Quoted 5 lines

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

Series is:

Quoted 22 lines
---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -3
index dd601ed6a30e..c3296a72fff9 100644
@@ -4569,8 +4569,8 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
         * tells us to assume 8 bpc color depth if the EDID doesn't have
         * extensions which tell otherwise.
         */
-       if ((info->bpc == 0) && (edid->revision < 4) &&
-           (edid->input & DRM_EDID_DIGITAL_DFP_1_X)) {
+       if (info->bpc == 0 && edid->revision == 3 &&
+           edid->input & DRM_EDID_DIGITAL_DFP_1_X) {
                info->bpc = 8;
                DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
                          connector->name, info->bpc);
--

2.21.0

Quoted 8 lines
Quoted 4 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

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

#4 lore raw

Re: [PATCH 2/2] drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier

Quoted 16 lines · Mario Kleiner
Quoted 8 lines · Ville Syrjala

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

Quoted 5 lines

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

Quoted 25 lines

Yes. Series is:

-mario

Quoted 19 lines · Alex Deucher
Quoted 8 lines · Ville Syrjala

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

From VESA EDID implementation guide v1.0:
"For EDID version 1 revision 2 or earlier data structures when offset 14h
bit 7 is set to one, the value of bits 6-0 are undefined, and therefore cannot be interpreted to mean anything."

Quoted 5 lines

And since EDID 1.4 redefines that bit let's consult it only for EDID 1.3.

Series is:

Thanks. Series pushed to drm-misc-next.

Quoted 31 lines
Quoted 31 lines
Quoted 23 lines
---
 drivers/gpu/drm/drm_edid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_edid.c +2 -3
index dd601ed6a30e..c3296a72fff9 100644
@@ -4569,8 +4569,8 @@ u32 drm_add_display_info(struct drm_connector *connector, const struct edid *edi
         * tells us to assume 8 bpc color depth if the EDID doesn't have
         * extensions which tell otherwise.
         */
-       if ((info->bpc == 0) && (edid->revision < 4) &&
-           (edid->input & DRM_EDID_DIGITAL_DFP_1_X)) {
+       if (info->bpc == 0 && edid->revision == 3 &&
+           edid->input & DRM_EDID_DIGITAL_DFP_1_X) {
                info->bpc = 8;
                DRM_DEBUG("%s: Assigning DFP sink color depth as %d bpc.\n",
                          connector->name, info->bpc);
--

2.21.0

Quoted 4 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

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