Lines Matching +full:three +full:- +full:state
1 // SPDX-License-Identifier: MIT
18 * drm_hdmi_infoframe_set_hdr_metadata() - fill an HDMI DRM infoframe with
21 * @conn_state: Connector state containing HDR metadata
33 return -EINVAL;
35 connector = conn_state->connector;
37 if (!conn_state->hdr_output_metadata)
38 return -EINVAL;
40 hdr_metadata = conn_state->hdr_output_metadata->data;
43 return -EINVAL;
46 if (!is_eotf_supported(hdr_metadata->hdmi_metadata_type1.eotf,
47 connector->hdr_sink_metadata.hdmi_type1.eotf))
48 DRM_DEBUG_KMS("Unknown EOTF %d\n", hdr_metadata->hdmi_metadata_type1.eotf);
54 frame->eotf = hdr_metadata->hdmi_metadata_type1.eotf;
55 frame->metadata_type = hdr_metadata->hdmi_metadata_type1.metadata_type;
57 BUILD_BUG_ON(sizeof(frame->display_primaries) !=
58 sizeof(hdr_metadata->hdmi_metadata_type1.display_primaries));
59 BUILD_BUG_ON(sizeof(frame->white_point) !=
60 sizeof(hdr_metadata->hdmi_metadata_type1.white_point));
62 memcpy(&frame->display_primaries,
63 &hdr_metadata->hdmi_metadata_type1.display_primaries,
64 sizeof(frame->display_primaries));
66 memcpy(&frame->white_point,
67 &hdr_metadata->hdmi_metadata_type1.white_point,
68 sizeof(frame->white_point));
70 frame->max_display_mastering_luminance =
71 hdr_metadata->hdmi_metadata_type1.max_display_mastering_luminance;
72 frame->min_display_mastering_luminance =
73 hdr_metadata->hdmi_metadata_type1.min_display_mastering_luminance;
74 frame->max_fall = hdr_metadata->hdmi_metadata_type1.max_fall;
75 frame->max_cll = hdr_metadata->hdmi_metadata_type1.max_cll;
124 * drm_hdmi_avi_infoframe_colorimetry() - fill the HDMI AVI infoframe
127 * @conn_state: connector state
133 u32 colorimetry_index = conn_state->colorspace & FULL_COLORIMETRY_MASK;
140 frame->colorimetry = colorimetry_val & NORMAL_COLORIMETRY_MASK;
145 frame->extended_colorimetry = (colorimetry_val >> 2) &
151 * drm_hdmi_avi_infoframe_bars() - fill the HDMI AVI infoframe
154 * @conn_state: connector state
159 frame->right_bar = conn_state->tv.margins.right;
160 frame->left_bar = conn_state->tv.margins.left;
161 frame->top_bar = conn_state->tv.margins.top;
162 frame->bottom_bar = conn_state->tv.margins.bottom;
167 * drm_hdmi_avi_infoframe_content_type() - fill the HDMI AVI infoframe
171 * @conn_state: DRM display connector state
177 switch (conn_state->content_type) {
179 frame->content_type = HDMI_CONTENT_TYPE_GRAPHICS;
182 frame->content_type = HDMI_CONTENT_TYPE_CINEMA;
185 frame->content_type = HDMI_CONTENT_TYPE_GAME;
188 frame->content_type = HDMI_CONTENT_TYPE_PHOTO;
192 frame->content_type = HDMI_CONTENT_TYPE_GRAPHICS;
195 frame->itc = conn_state->content_type != DRM_MODE_CONTENT_TYPE_NO_DATA;
200 * drm_hdmi_compute_mode_clock() - Computes the TMDS Character Rate
214 unsigned long long clock = mode->clock * 1000ULL;
218 * CTA-861-G Spec, section 5.4 - Color Coding and Quantization
226 * HDMI 1.0 Spec, section 6.5 - Pixel Encoding states that
227 * YUV422 sends 24 bits over three channels, with Cb and Cr
236 * HDMI 1.0 Spec, section 6.5 - Pixel Encoding
237 * specifies that YUV422 sends two 12-bits components over
238 * three TMDS channels per pixel clock, which is equivalent to
239 * three 8-bits components over three channels used by RGB as
246 * HDMI 2.0 Spec, Section 7.1 - YCbCr 4:2:0 Pixel Encoding
253 if (mode->flags & DRM_MODE_FLAG_DBLCLK)
365 * drm_hdmi_acr_get_n_cts() - get N and CTS values for Audio Clock Regeneration
376 * Note, @sample_rate corresponds to the Fs value, see sections 7.2.4 - 7.2.6
377 * on how to select Fs for non-L-PCM formats.
411 n = entry->n * mult;
412 cts = entry->cts;