drm/edid: Rename drm_hdmi_avi_infoframe_colorspace to _colorimetry
authorMaxime Ripard <maxime@cerno.tech>
Thu, 20 Jan 2022 15:16:10 +0000 (16:16 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 25 Jan 2022 09:00:13 +0000 (10:00 +0100)
The drm_hdmi_avi_infoframe_colorspace() function actually sets the
colorimetry and extended_colorimetry fields in the hdmi_avi_infoframe
structure with DRM_MODE_COLORIMETRY_* values.

To make things worse, the hdmi_avi_infoframe structure also has a
colorspace field used to signal whether an RGB or YUV output is being
used.

Let's remove the inconsistency and allow for the colorspace usage by
renaming the function.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220120151625.594595-2-maxime@cerno.tech
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/i915/display/intel_hdmi.c
drivers/gpu/drm/i915/display/intel_lspcon.c
drivers/gpu/drm/vc4/vc4_hdmi.c
include/drm/drm_edid.h

index eb61a1a..d8df2e7 100644 (file)
@@ -5926,13 +5926,13 @@ static const u32 hdmi_colorimetry_val[] = {
 #undef ACE
 
 /**
- * drm_hdmi_avi_infoframe_colorspace() - fill the HDMI AVI infoframe
- *                                       colorspace information
+ * drm_hdmi_avi_infoframe_colorimetry() - fill the HDMI AVI infoframe
+ *                                       colorimetry information
  * @frame: HDMI AVI infoframe
  * @conn_state: connector state
  */
 void
-drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
+drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
                                  const struct drm_connector_state *conn_state)
 {
        u32 colorimetry_val;
@@ -5951,7 +5951,7 @@ drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
        frame->extended_colorimetry = (colorimetry_val >> 2) &
                                        EXTENDED_COLORIMETRY_MASK;
 }
-EXPORT_SYMBOL(drm_hdmi_avi_infoframe_colorspace);
+EXPORT_SYMBOL(drm_hdmi_avi_infoframe_colorimetry);
 
 /**
  * drm_hdmi_avi_infoframe_quant_range() - fill the HDMI AVI infoframe
index 3b5b9e7..96e508d 100644 (file)
@@ -730,7 +730,7 @@ intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
        else
                frame->colorspace = HDMI_COLORSPACE_RGB;
 
-       drm_hdmi_avi_infoframe_colorspace(frame, conn_state);
+       drm_hdmi_avi_infoframe_colorimetry(frame, conn_state);
 
        /* nonsense combination */
        drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
index e879d36..012f13e 100644 (file)
@@ -537,7 +537,7 @@ void lspcon_set_infoframes(struct intel_encoder *encoder,
                frame.avi.colorspace = HDMI_COLORSPACE_RGB;
 
        /* Set the Colorspace as per the HDMI spec */
-       drm_hdmi_avi_infoframe_colorspace(&frame.avi, conn_state);
+       drm_hdmi_avi_infoframe_colorimetry(&frame.avi, conn_state);
 
        /* nonsense combination */
        drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
index 053fbaf..be39e55 100644 (file)
@@ -502,7 +502,7 @@ static void vc4_hdmi_set_avi_infoframe(struct drm_encoder *encoder)
                                           vc4_encoder->limited_rgb_range ?
                                           HDMI_QUANTIZATION_RANGE_LIMITED :
                                           HDMI_QUANTIZATION_RANGE_FULL);
-       drm_hdmi_avi_infoframe_colorspace(&frame.avi, cstate);
+       drm_hdmi_avi_infoframe_colorimetry(&frame.avi, cstate);
        drm_hdmi_avi_infoframe_bars(&frame.avi, cstate);
 
        vc4_hdmi_write_infoframe(encoder, &frame);
index 18f6c70..144c495 100644 (file)
@@ -401,8 +401,8 @@ drm_hdmi_vendor_infoframe_from_display_mode(struct hdmi_vendor_infoframe *frame,
                                            const struct drm_display_mode *mode);
 
 void
-drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
-                                 const struct drm_connector_state *conn_state);
+drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
+                                  const struct drm_connector_state *conn_state);
 
 void
 drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,