Commit 70063a59 authored by Amy Zhang's avatar Amy Zhang Committed by Alex Deucher

drm/amd/display: Add bypass case for PQ transfer function

- Source and destination color space should be the same for
  app control case
- Bypass degamma, regamma, and gamut remap
- Add hdr supported check for info frame
Signed-off-by: default avatarAmy Zhang <Amy.Zhang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5c1879b6
...@@ -1675,7 +1675,7 @@ static void set_hdr_static_info_packet( ...@@ -1675,7 +1675,7 @@ static void set_hdr_static_info_packet(
hdr_metadata = surface->public.hdr_static_ctx; hdr_metadata = surface->public.hdr_static_ctx;
if (!hdr_metadata.is_hdr) if (!hdr_metadata.hdr_supported)
return; return;
if (dc_is_hdmi_signal(signal)) { if (dc_is_hdmi_signal(signal)) {
......
...@@ -186,6 +186,7 @@ enum { ...@@ -186,6 +186,7 @@ enum {
}; };
struct dc_hdr_static_metadata { struct dc_hdr_static_metadata {
bool hdr_supported;
bool is_hdr; bool is_hdr;
/* display chromaticities and white point in units of 0.00001 */ /* display chromaticities and white point in units of 0.00001 */
...@@ -207,6 +208,7 @@ struct dc_hdr_static_metadata { ...@@ -207,6 +208,7 @@ struct dc_hdr_static_metadata {
enum dc_transfer_func_type { enum dc_transfer_func_type {
TF_TYPE_PREDEFINED, TF_TYPE_PREDEFINED,
TF_TYPE_DISTRIBUTED_POINTS, TF_TYPE_DISTRIBUTED_POINTS,
TF_TYPE_BYPASS
}; };
struct dc_transfer_func_distributed_points { struct dc_transfer_func_distributed_points {
......
...@@ -279,6 +279,8 @@ static bool dce110_set_input_transfer_func( ...@@ -279,6 +279,8 @@ static bool dce110_set_input_transfer_func(
result = false; result = false;
break; break;
} }
} else if (tf->public.type == TF_TYPE_BYPASS) {
ipp->funcs->ipp_set_degamma(ipp, IPP_DEGAMMA_MODE_BYPASS);
} else { } else {
/*TF_TYPE_DISTRIBUTED_POINTS - Not supported in DCE 11*/ /*TF_TYPE_DISTRIBUTED_POINTS - Not supported in DCE 11*/
result = false; result = false;
...@@ -428,7 +430,8 @@ static bool dce110_translate_regamma_to_hw_format(const struct dc_transfer_func ...@@ -428,7 +430,8 @@ static bool dce110_translate_regamma_to_hw_format(const struct dc_transfer_func
int32_t segment_start, segment_end; int32_t segment_start, segment_end;
uint32_t i, j, k, seg_distr[16], increment, start_index, hw_points; uint32_t i, j, k, seg_distr[16], increment, start_index, hw_points;
if (output_tf == NULL || regamma_params == NULL) if (output_tf == NULL || regamma_params == NULL ||
output_tf->type == TF_TYPE_BYPASS)
return false; return false;
arr_points = regamma_params->arr_points; arr_points = regamma_params->arr_points;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment