mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/i915: Use drm_hdmi_avi_infoframe_quant_range() for SDVO HDMI as well
Fill out the AVI infoframe quantization range bits using drm_hdmi_avi_infoframe_quant_range() for SDVO HDMI encoder as well. This changes the behaviour slightly as drm_hdmi_avi_infoframe_quant_range() will set a non-zero Q bit even when QS==0 iff the Q bit matched the default quantization range for the given mode. This matches the recommendation in HDMI 2.0 and is allowed even before that. v2: Pimp commit msg (DK) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190108172828.15184-2-ville.syrjala@linux.intel.com
This commit is contained in:
parent
13d0add333
commit
c3735f5c1f
1 changed files with 10 additions and 9 deletions
|
@ -984,6 +984,8 @@ static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo,
|
||||||
const struct intel_crtc_state *pipe_config,
|
const struct intel_crtc_state *pipe_config,
|
||||||
const struct drm_connector_state *conn_state)
|
const struct drm_connector_state *conn_state)
|
||||||
{
|
{
|
||||||
|
const struct drm_display_mode *adjusted_mode =
|
||||||
|
&pipe_config->base.adjusted_mode;
|
||||||
uint8_t sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
|
uint8_t sdvo_data[HDMI_INFOFRAME_SIZE(AVI)];
|
||||||
union hdmi_infoframe frame;
|
union hdmi_infoframe frame;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -991,20 +993,19 @@ static bool intel_sdvo_set_avi_infoframe(struct intel_sdvo *intel_sdvo,
|
||||||
|
|
||||||
ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
|
ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
|
||||||
conn_state->connector,
|
conn_state->connector,
|
||||||
&pipe_config->base.adjusted_mode);
|
adjusted_mode);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
DRM_ERROR("couldn't fill AVI infoframe\n");
|
DRM_ERROR("couldn't fill AVI infoframe\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intel_sdvo->rgb_quant_range_selectable) {
|
drm_hdmi_avi_infoframe_quant_range(&frame.avi,
|
||||||
if (pipe_config->limited_color_range)
|
conn_state->connector,
|
||||||
frame.avi.quantization_range =
|
adjusted_mode,
|
||||||
HDMI_QUANTIZATION_RANGE_LIMITED;
|
pipe_config->limited_color_range ?
|
||||||
else
|
HDMI_QUANTIZATION_RANGE_LIMITED :
|
||||||
frame.avi.quantization_range =
|
HDMI_QUANTIZATION_RANGE_FULL,
|
||||||
HDMI_QUANTIZATION_RANGE_FULL;
|
intel_sdvo->rgb_quant_range_selectable);
|
||||||
}
|
|
||||||
|
|
||||||
len = hdmi_infoframe_pack(&frame, sdvo_data, sizeof(sdvo_data));
|
len = hdmi_infoframe_pack(&frame, sdvo_data, sizeof(sdvo_data));
|
||||||
if (len < 0)
|
if (len < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue