1 From d27c36f9beed7d6a9d19ea1d642a7fb898eb6d95 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Wed, 14 Apr 2021 16:21:08 +0200
4 Subject: [PATCH] drm/edid: Rename drm_hdmi_avi_infoframe_colorspace to
7 The drm_hdmi_avi_infoframe_colorspace() function actually sets the
8 colorimetry and extended_colorimetry fields in the hdmi_avi_infoframe
9 structure with DRM_MODE_COLORIMETRY_* values.
11 To make things worse, the hdmi_avi_infoframe structure also has a
12 colorspace field used to signal whether an RGB or YUV output is being
15 Let's remove the inconsistency and allow for the colorspace usage by
16 renaming the function.
18 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
20 drivers/gpu/drm/drm_edid.c | 8 ++++----
21 drivers/gpu/drm/i915/display/intel_hdmi.c | 2 +-
22 drivers/gpu/drm/i915/display/intel_lspcon.c | 2 +-
23 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
24 include/drm/drm_edid.h | 4 ++--
25 5 files changed, 9 insertions(+), 9 deletions(-)
27 --- a/drivers/gpu/drm/drm_edid.c
28 +++ b/drivers/gpu/drm/drm_edid.c
29 @@ -5743,13 +5743,13 @@ static const u32 hdmi_colorimetry_val[]
33 - * drm_hdmi_avi_infoframe_colorspace() - fill the HDMI AVI infoframe
34 - * colorspace information
35 + * drm_hdmi_avi_infoframe_colorimetry() - fill the HDMI AVI infoframe
36 + * colorimetry information
37 * @frame: HDMI AVI infoframe
38 * @conn_state: connector state
41 -drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
42 +drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
43 const struct drm_connector_state *conn_state)
46 @@ -5768,7 +5768,7 @@ drm_hdmi_avi_infoframe_colorspace(struct
47 frame->extended_colorimetry = (colorimetry_val >> 2) &
48 EXTENDED_COLORIMETRY_MASK;
50 -EXPORT_SYMBOL(drm_hdmi_avi_infoframe_colorspace);
51 +EXPORT_SYMBOL(drm_hdmi_avi_infoframe_colorimetry);
54 * drm_hdmi_avi_infoframe_quant_range() - fill the HDMI AVI infoframe
55 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
56 +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
57 @@ -730,7 +730,7 @@ intel_hdmi_compute_avi_infoframe(struct
59 frame->colorspace = HDMI_COLORSPACE_RGB;
61 - drm_hdmi_avi_infoframe_colorspace(frame, conn_state);
62 + drm_hdmi_avi_infoframe_colorimetry(frame, conn_state);
64 /* nonsense combination */
65 drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
66 --- a/drivers/gpu/drm/i915/display/intel_lspcon.c
67 +++ b/drivers/gpu/drm/i915/display/intel_lspcon.c
68 @@ -537,7 +537,7 @@ void lspcon_set_infoframes(struct intel_
69 frame.avi.colorspace = HDMI_COLORSPACE_RGB;
71 /* Set the Colorspace as per the HDMI spec */
72 - drm_hdmi_avi_infoframe_colorspace(&frame.avi, conn_state);
73 + drm_hdmi_avi_infoframe_colorimetry(&frame.avi, conn_state);
75 /* nonsense combination */
76 drm_WARN_ON(encoder->base.dev, crtc_state->limited_color_range &&
77 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
78 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
79 @@ -517,7 +517,7 @@ static void vc4_hdmi_set_avi_infoframe(s
80 vc4_encoder->limited_rgb_range ?
81 HDMI_QUANTIZATION_RANGE_LIMITED :
82 HDMI_QUANTIZATION_RANGE_FULL);
83 - drm_hdmi_avi_infoframe_colorspace(&frame.avi, cstate);
84 + drm_hdmi_avi_infoframe_colorimetry(&frame.avi, cstate);
85 drm_hdmi_avi_infoframe_bars(&frame.avi, cstate);
87 vc4_hdmi_write_infoframe(encoder, &frame);
88 --- a/include/drm/drm_edid.h
89 +++ b/include/drm/drm_edid.h
90 @@ -401,8 +401,8 @@ drm_hdmi_vendor_infoframe_from_display_m
91 const struct drm_display_mode *mode);
94 -drm_hdmi_avi_infoframe_colorspace(struct hdmi_avi_infoframe *frame,
95 - const struct drm_connector_state *conn_state);
96 +drm_hdmi_avi_infoframe_colorimetry(struct hdmi_avi_infoframe *frame,
97 + const struct drm_connector_state *conn_state);
100 drm_hdmi_avi_infoframe_bars(struct hdmi_avi_infoframe *frame,