mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
drm/amd/display: Report Proper Quantization Range in AVI Infoframe
[Why?] When a monitor does not set both QS and QY bits, DC does not set Q0, Q1, QY0 and QY1 bits in AVI infoframe. Setting RGB bits should be separate from setting YCC bits. [How?] Separate logic for setting RGB and YCC quantization range bits in the AVI infoframe. Signed-off-by: Dillon Varone <dillon.varone@amd.com> Reviewed-by: Chris Park <Chris.Park@amd.com> Acked-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
dad6bd779a
commit
fdf7d4f547
1 changed files with 19 additions and 14 deletions
|
@ -2506,26 +2506,31 @@ static void set_avi_info_frame(
|
|||
hdmi_info.bits.ITC = itc_value;
|
||||
}
|
||||
|
||||
if (stream->qs_bit == 1) {
|
||||
if (color_space == COLOR_SPACE_SRGB ||
|
||||
color_space == COLOR_SPACE_2020_RGB_FULLRANGE)
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_FULL_RANGE;
|
||||
else if (color_space == COLOR_SPACE_SRGB_LIMITED ||
|
||||
color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE)
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_LIMITED_RANGE;
|
||||
else
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_DEFAULT_RANGE;
|
||||
} else
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_DEFAULT_RANGE;
|
||||
|
||||
/* TODO : We should handle YCC quantization */
|
||||
/* but we do not have matrix calculation */
|
||||
if (stream->qs_bit == 1 &&
|
||||
stream->qy_bit == 1) {
|
||||
if (stream->qy_bit == 1) {
|
||||
if (color_space == COLOR_SPACE_SRGB ||
|
||||
color_space == COLOR_SPACE_2020_RGB_FULLRANGE) {
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_FULL_RANGE;
|
||||
color_space == COLOR_SPACE_2020_RGB_FULLRANGE)
|
||||
hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
|
||||
} else if (color_space == COLOR_SPACE_SRGB_LIMITED ||
|
||||
color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE) {
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_LIMITED_RANGE;
|
||||
else if (color_space == COLOR_SPACE_SRGB_LIMITED ||
|
||||
color_space == COLOR_SPACE_2020_RGB_LIMITEDRANGE)
|
||||
hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
|
||||
} else {
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_DEFAULT_RANGE;
|
||||
else
|
||||
hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
|
||||
}
|
||||
} else {
|
||||
hdmi_info.bits.Q0_Q1 = RGB_QUANTIZATION_DEFAULT_RANGE;
|
||||
hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
|
||||
}
|
||||
} else
|
||||
hdmi_info.bits.YQ0_YQ1 = YYC_QUANTIZATION_LIMITED_RANGE;
|
||||
|
||||
///VIC
|
||||
format = stream->timing.timing_3d_format;
|
||||
|
|
Loading…
Reference in a new issue