Skip to contentSkip to conversation

drm/edid: VSDB yCBCr420 Deep Color mode bit definitions

PATCH Applied [email protected] 3 participants 5 messages Oct 5, 2018 – Oct 16, 2018

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

PATCH 1/1 drm/edid: VSDB yCBCr420 Deep Color mode bit definitions

From: Clint Taylor <[email protected]>

HDMI Forum VSDB YCBCR420 deep color capability bits are 2:0. Correct definitions in the header for the mask to work correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107893

---
 drivers/gpu/drm/drm_edid.c | 2 +-
 include/drm/drm_edid.h     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index 1e2b940..ff0bfc6 100644
@@ -4282,7 +4282,7 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
 	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
 
 	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
-	hdmi->y420_dc_modes |= dc_mask;
+	hdmi->y420_dc_modes = dc_mask;
 }
 
 static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
include/drm/drm_edid.h +3 -3
index b25d12e..e3c4048 100644
@@ -214,9 +214,9 @@ struct detailed_timing {
 #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
 /* YCBCR 420 deep color modes */
-#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
-#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
-#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 2)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 1)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 0)
 #define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
 				    DRM_EDID_YCBCR420_DC_36 | \
 				    DRM_EDID_YCBCR420_DC_30)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · On Fri, 05 Oct 2018, [email protected] wrote:

From: Clint Taylor <[email protected]>

HDMI Forum VSDB YCBCR420 deep color capability bits are 2:0. Correct definitions in the header for the mask to work correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107893

When posting fixes like this, please do git blame on the stuff you're fixing, and add Fixes: tag and a bunch of Cc's. It'll help us propagate the fix to stable kernels and get feedback from the authors and reviewers. 'dim fixes' will help you with this:

$ dim fixes e6a9a2c3dc437
Fixes: e6a9a2c3dc43 ("drm/edid: parse ycbcr 420 deep color information")
Cc: Ville Syrjälä <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v4.14+

Anyway this looks sane to me,

but I'm wondering if there was some deeper meaning to the original |= in there.

BR,
Jani.

Quoted 35 lines
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 include/drm/drm_edid.h     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index 1e2b940..ff0bfc6 100644
@@ -4282,7 +4282,7 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
 	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
 
 	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
-	hdmi->y420_dc_modes |= dc_mask;
+	hdmi->y420_dc_modes = dc_mask;
 }
 
 static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
include/drm/drm_edid.h +3 -3
index b25d12e..e3c4048 100644
@@ -214,9 +214,9 @@ struct detailed_timing {
 #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
 /* YCBCR 420 deep color modes */
-#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
-#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
-#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 2)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 1)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 0)
 #define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
 				    DRM_EDID_YCBCR420_DC_36 | \
 				    DRM_EDID_YCBCR420_DC_30)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 26 lines · Jani Nikula
Quoted 7 lines · On Fri, 05 Oct 2018, [email protected] wrote:

From: Clint Taylor <[email protected]>

HDMI Forum VSDB YCBCR420 deep color capability bits are 2:0. Correct definitions in the header for the mask to work correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107893

When posting fixes like this, please do git blame on the stuff you're fixing, and add Fixes: tag and a bunch of Cc's. It'll help us propagate the fix to stable kernels and get feedback from the authors and reviewers. 'dim fixes' will help you with this:

$ dim fixes e6a9a2c3dc437
Fixes: e6a9a2c3dc43 ("drm/edid: parse ycbcr 420 deep color information")
Cc: Ville Syrjälä <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v4.14+
Quoted 6 lines

Anyway this looks sane to me,

but I'm wondering if there was some deeper meaning to the original |= in there.

PS. It'll be useful to repost this Cc: intel-gfx just to get the CI as we seem to be the only consumer of the stuff being fixed.

Quoted 41 lines

BR,
Jani.

Quoted 35 lines
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 include/drm/drm_edid.h     | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index 1e2b940..ff0bfc6 100644
@@ -4282,7 +4282,7 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
 	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
 
 	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
-	hdmi->y420_dc_modes |= dc_mask;
+	hdmi->y420_dc_modes = dc_mask;
 }
 
 static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
include/drm/drm_edid.h +3 -3
index b25d12e..e3c4048 100644
@@ -214,9 +214,9 @@ struct detailed_timing {
 #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
 /* YCBCR 420 deep color modes */
-#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
-#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
-#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 2)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 1)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 0)
 #define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
 				    DRM_EDID_YCBCR420_DC_36 | \
 				    DRM_EDID_YCBCR420_DC_30)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by
#3 lore raw

Regards

Shashank

Quoted 26 lines · Jani Nikula
Quoted 25 lines · Jani Nikula
Quoted 7 lines · On Fri, 05 Oct 2018, [email protected] wrote:

From: Clint Taylor <[email protected]>

HDMI Forum VSDB YCBCR420 deep color capability bits are 2:0. Correct definitions in the header for the mask to work correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107893

When posting fixes like this, please do git blame on the stuff you're fixing, and add Fixes: tag and a bunch of Cc's. It'll help us propagate the fix to stable kernels and get feedback from the authors and reviewers. 'dim fixes' will help you with this:

$ dim fixes e6a9a2c3dc437
Fixes: e6a9a2c3dc43 ("drm/edid: parse ycbcr 420 deep color information")
Cc: Ville Syrjälä <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v4.14+
Quoted 6 lines
Quoted 6 lines

Anyway this looks sane to me,

but I'm wondering if there was some deeper meaning to the original |= in there.

Honestly, I was considering new blocks in HDMI 2.1 spec for dc, and parsing of those before this block, keeping |= required. But we can always do other way around, or will take care of it when we add code for it.
Just cross checked with the spec too,

- Shashank

Quoted 33 lines

PS. It'll be useful to repost this Cc: intel-gfx just to get the CI as we seem to be the only consumer of the stuff being fixed.

Quoted 30 lines

BR,
Jani.

Quoted 25 lines
---
  drivers/gpu/drm/drm_edid.c | 2 +-
  include/drm/drm_edid.h     | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index 1e2b940..ff0bfc6 100644
@@ -4282,7 +4282,7 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
  	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
 
  	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
-	hdmi->y420_dc_modes |= dc_mask;
+	hdmi->y420_dc_modes = dc_mask;
  }
 
  static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
include/drm/drm_edid.h +0 -0
index b25d12e..e3c4048 100644
@@ -214,9 +214,9 @@ struct detailed_timing {
  #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
Quoted 10 lines
Quoted 10 lines

include/drm/drm_edid.h struct detailed_timing { · line 222

Quoted 10 lines
include/drm/drm_edid.h +3 -3
  /* YCBCR 420 deep color modes */
-#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
-#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
-#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 2)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 1)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 0)
  #define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
  				    DRM_EDID_YCBCR420_DC_36 | \
  				    DRM_EDID_YCBCR420_DC_30)

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

Applied
#4 lore raw
Quoted 38 lines · Shashank

Regards

Shashank

Quoted 26 lines · Jani Nikula
Quoted 25 lines · Jani Nikula
Quoted 7 lines · On Fri, 05 Oct 2018, [email protected] wrote:

From: Clint Taylor <[email protected]>

HDMI Forum VSDB YCBCR420 deep color capability bits are 2:0. Correct definitions in the header for the mask to work correctly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107893

When posting fixes like this, please do git blame on the stuff you're fixing, and add Fixes: tag and a bunch of Cc's. It'll help us propagate the fix to stable kernels and get feedback from the authors and reviewers. 'dim fixes' will help you with this:

$ dim fixes e6a9a2c3dc437
Fixes: e6a9a2c3dc43 ("drm/edid: parse ycbcr 420 deep color information")
Cc: Ville Syrjälä <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: Shashank Sharma <[email protected]>
Cc: Gustavo Padovan <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Cc: <[email protected]> # v4.14+
Quoted 6 lines
Quoted 6 lines

Anyway this looks sane to me,

but I'm wondering if there was some deeper meaning to the original |= in there.

Quoted 7 lines

Honestly, I was considering new blocks in HDMI 2.1 spec for dc, and parsing of those before this block, keeping |= required. But we can always do other way around, or will take care of it when we add code for it.
Just cross checked with the spec too,

Pushed to drm-misc-fixes, thanks for the patch and review!

BR,
Jani.

Quoted 47 lines

- Shashank

Quoted 43 lines

PS. It'll be useful to repost this Cc: intel-gfx just to get the CI as we seem to be the only consumer of the stuff being fixed.

Quoted 40 lines

BR,
Jani.

Quoted 35 lines
---
  drivers/gpu/drm/drm_edid.c | 2 +-
  include/drm/drm_edid.h     | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_edid.c +1 -1
index 1e2b940..ff0bfc6 100644
@@ -4282,7 +4282,7 @@ static void drm_parse_ycbcr420_deep_color_info(struct drm_connector *connector,
  	struct drm_hdmi_info *hdmi = &connector->display_info.hdmi;
 
  	dc_mask = db[7] & DRM_EDID_YCBCR420_DC_MASK;
-	hdmi->y420_dc_modes |= dc_mask;
+	hdmi->y420_dc_modes = dc_mask;
  }
 
  static void drm_parse_hdmi_forum_vsdb(struct drm_connector *connector,
include/drm/drm_edid.h +3 -3
index b25d12e..e3c4048 100644
@@ -214,9 +214,9 @@ struct detailed_timing {
  #define DRM_EDID_HDMI_DC_Y444             (1 << 3)
 
  /* YCBCR 420 deep color modes */
-#define DRM_EDID_YCBCR420_DC_48		  (1 << 6)
-#define DRM_EDID_YCBCR420_DC_36		  (1 << 5)
-#define DRM_EDID_YCBCR420_DC_30		  (1 << 4)
+#define DRM_EDID_YCBCR420_DC_48		  (1 << 2)
+#define DRM_EDID_YCBCR420_DC_36		  (1 << 1)
+#define DRM_EDID_YCBCR420_DC_30		  (1 << 0)
  #define DRM_EDID_YCBCR420_DC_MASK (DRM_EDID_YCBCR420_DC_48 | \
  				    DRM_EDID_YCBCR420_DC_36 | \
  				    DRM_EDID_YCBCR420_DC_30)
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx