drm/edid: Introduce drm_hdmi_avi_infoframe_quant_range()
Pull the logic to populate the quantization range information in the AVI infoframe into a small helper. We'll be adding a bit more logic to it, and having it in a central place seems like a good idea since it's based on the CEA-861 spec. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170111125725.8086-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com> Acked-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
@@ -465,14 +465,11 @@ static void intel_hdmi_set_avi_infoframe(struct drm_encoder *encoder,
|
||||
return;
|
||||
}
|
||||
|
||||
if (intel_hdmi->rgb_quant_range_selectable) {
|
||||
if (crtc_state->limited_color_range)
|
||||
frame.avi.quantization_range =
|
||||
HDMI_QUANTIZATION_RANGE_LIMITED;
|
||||
else
|
||||
frame.avi.quantization_range =
|
||||
HDMI_QUANTIZATION_RANGE_FULL;
|
||||
}
|
||||
drm_hdmi_avi_infoframe_quant_range(&frame.avi,
|
||||
crtc_state->limited_color_range ?
|
||||
HDMI_QUANTIZATION_RANGE_LIMITED :
|
||||
HDMI_QUANTIZATION_RANGE_FULL,
|
||||
intel_hdmi->rgb_quant_range_selectable);
|
||||
|
||||
intel_write_infoframe(encoder, crtc_state, &frame);
|
||||
}
|
||||
|
Reference in New Issue
Block a user