drivers: video: hdmi: log ext colorimetry applicability
Subsystems (2)
PATCH 1/1 drivers: video: hdmi: log ext colorimetry applicability
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/video/hdmi.c +7 -1
@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level,hdmi_log (" active aspect: %s\n" ,hdmi_active_aspect_get_name (frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); -hdmi_log (" extended colorimetry: %s\n" , + +if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry); +hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 17 lines · Johan Korsnes
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
Signed-off-by Johan Korsnes <[email protected]>--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/video/hdmi.c +0
-0@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level, hdmi_log(" active aspect: %s\n",
drivers/video/hdmi.c static void hdmi_avi_infoframe_log(const char *level, · line 691
Quoted 10 lines
drivers/video/hdmi.c +6
-1hdmi_active_aspect_get_name(frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); -hdmi_log (" extended colorimetry: %s\n" , + +if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry);
Yeah, seems fine. Might make the logs a bit less confusing at least.
PS. would be nice it someone were to extend this code to deal with the ACE bits too. Do you have plans/interest in doing that?
Quoted 11 lines
drivers/video/hdmi.c +1
-0+hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 2 lines
Ville Syrjälä Intel
Quoted 31 lines · Ville Syrjälä
Quoted 17 lines · Johan Korsnes
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
Signed-off-by Johan Korsnes <[email protected]>--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/video/hdmi.c +0
-0@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level, hdmi_log(" active aspect: %s\n",drivers/video/hdmi.c static void hdmi_avi_infoframe_log(const char *level, · line 691
Quoted 10 lines
drivers/video/hdmi.c +6
-1hdmi_active_aspect_get_name(frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); -hdmi_log (" extended colorimetry: %s\n" , + +if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry);Yeah, seems fine. Might make the logs a bit less confusing at least.
Quoted 4 lines
Reviewed-by Ville Syrjälä <[email protected]>PS. would be nice it someone were to extend this code to deal with the ACE bits too. Do you have plans/interest in doing that?
I was actually going to deal with the ACE bits as part of this patch, but noticed that things seem to be hard coded for AVI InfoFrame v2:
int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame) {
memset(frame, 0, sizeof(*frame));
frame->type = HDMI_INFOFRAME_TYPE_AVI;
frame->version = 2;
frame->length = HDMI_AVI_INFOFRAME_SIZE;
return 0;
}I have no plans to fix this, for now, unfortunately.
Quoted 8 lines
Quoted 8 lines
drivers/video/hdmi.c +1
-0+hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));Signature · 1 line
2.20.1
Quoted 5 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
Quoted 31 lines · Ville Syrjälä
Quoted 17 lines · Johan Korsnes
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
Signed-off-by Johan Korsnes <[email protected]>--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/video/hdmi.c +0
-0@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level, hdmi_log(" active aspect: %s\n",drivers/video/hdmi.c static void hdmi_avi_infoframe_log(const char *level, · line 691
Quoted 10 lines
drivers/video/hdmi.c +6
-1hdmi_active_aspect_get_name(frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); -hdmi_log (" extended colorimetry: %s\n" , + +if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry);Yeah, seems fine. Might make the logs a bit less confusing at least.
Quoted 4 lines
Reviewed-by Ville Syrjälä <[email protected]>PS. would be nice it someone were to extend this code to deal with the ACE bits too. Do you have plans/interest in doing that?
If we tackle this, then it would be part of a larger effort in updating this code. There are more fields missing in other InfoFrames as well.
So yes, we have interest in this, but no, there are no plans :-)
Regards,
Hans
Quoted 13 lines
Quoted 12 lines
drivers/video/hdmi.c +1
-0+hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Johan Korsnes
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
Signed-off-by Johan Korsnes <[email protected]>--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/video/hdmi.c +1
-1@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level,hdmi_log (" active aspect: %s\n" ,hdmi_active_aspect_get_name (frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); - hdmi_log(" extended colorimetry: %s\n", +
drivers/video/hdmi.c static void hdmi_avi_infoframe_log(const char *level, · line 695
Quoted 10 lines
drivers/video/hdmi.c +6
-0+if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry); +hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));
I just realized that there are more fields like that:
content_type is only valid if itc == true
quantization_range is only valid if colorspace is RGB
ycc_quantization_range is only valid if colorspace is YCC
Can you make a v2 where these fields are handled in the same way? That would really help reduce the confusion when logging the AVI InfoFrame.
Regards,
Hans
Quoted 38 lines · Hans Verkuil
Quoted 22 lines · Johan Korsnes
When logging the AVI InfoFrame, clearly indicate whether or not the extended colorimetry attribute is active. This is only the case when the AVI InfoFrame colorimetry attribute is set to extended. [0]
[0] CTA-861-G section 6.4 page 57
Signed-off-by Johan Korsnes <[email protected]>--- drivers/video/hdmi.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/video/hdmi.c +1
-1@@ -682,8 +682,14 @@ static void hdmi_avi_infoframe_log(const char *level,hdmi_log (" active aspect: %s\n" ,hdmi_active_aspect_get_name (frame->active_aspect));hdmi_log (" itc: %s\n" , frame->itc ?"IT Content" :"No Data" ); - hdmi_log(" extended colorimetry: %s\n", +drivers/video/hdmi.c static void hdmi_avi_infoframe_log(const char *level, · line 695
Quoted 10 lines
drivers/video/hdmi.c +6
-0+if (frame->colorimetry ==HDMI_COLORIMETRY_EXTENDED ) +hdmi_log (" extended colorimetry: %s\n" ,hdmi_extended_colorimetry_get_name (frame->extended_colorimetry)); +else +hdmi_log (" extended colorimetry: N/A (0x%x)\n" , + frame->extended_colorimetry); +hdmi_log (" quantization range: %s\n" ,hdmi_quantization_range_get_name (frame->quantization_range));hdmi_log (" nups: %s\n" ,hdmi_nups_get_name (frame->nups));I just realized that there are more fields like that:
content_typeis only valid if itc == true
Quoted 7 lines
quantization_rangeis only valid if colorspace is RGB
ycc_quantization_rangeis only valid if colorspace is YCCCan you make a v2 where these fields are handled in the same way? That would really help reduce the confusion when logging the AVI InfoFrame.
I will make a v2 handling these cases as well; thanks for pointing it out.
Best regards,
Johan
Quoted 5 lines
Regards,
Hans