mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
Revert "drm/amd/display: Rework YCbCr422 DSC policy"
Revert commit 19b79e4f21 ("drm/amd/display: Rework YCbCr422 DSC policy")
Reason for Revert:
This commit is causing compliance failures
Reviewed-by: Wenjing Liu <wenjing.liu@amd.com>
Signed-off-by: Relja Vojvodic <Relja.Vojvodic@amd.com>
Signed-off-by: Chuanyu Tseng <chuanyu.tseng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4d55784b91
commit
246808e792
|
|
@ -563,7 +563,6 @@ struct dc_config {
|
|||
bool frame_update_cmd_version2;
|
||||
struct spl_sharpness_range dcn_sharpness_range;
|
||||
struct spl_sharpness_range dcn_override_sharpness_range;
|
||||
bool no_native422_support;
|
||||
};
|
||||
|
||||
enum visual_confirm {
|
||||
|
|
@ -988,6 +987,7 @@ struct link_service;
|
|||
* causing an issue or not.
|
||||
*/
|
||||
struct dc_debug_options {
|
||||
bool native422_support;
|
||||
bool disable_dsc;
|
||||
enum visual_confirm visual_confirm;
|
||||
int visual_confirm_rect_height;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ struct dc_dsc_policy {
|
|||
uint32_t max_target_bpp;
|
||||
uint32_t min_target_bpp;
|
||||
bool enable_dsc_when_not_needed;
|
||||
bool ycbcr422_simple;
|
||||
};
|
||||
|
||||
struct dc_dsc_config_options {
|
||||
|
|
|
|||
|
|
@ -680,6 +680,9 @@ static void get_dsc_enc_caps(
|
|||
} else {
|
||||
build_dsc_enc_caps(dsc, dsc_enc_caps);
|
||||
}
|
||||
|
||||
if (dsc->ctx->dc->debug.native422_support)
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
|
||||
}
|
||||
|
||||
/* Returns 'false' if no intersection was found for at least one capability.
|
||||
|
|
@ -1097,14 +1100,13 @@ static bool setup_dsc_config(
|
|||
branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_0_mps;
|
||||
break;
|
||||
case PIXEL_ENCODING_YCBCR422:
|
||||
if (policy.ycbcr422_simple) {
|
||||
is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422;
|
||||
sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps;
|
||||
branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps;
|
||||
if (!is_dsc_possible) {
|
||||
is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_SIMPLE_422;
|
||||
dsc_cfg->ycbcr422_simple = is_dsc_possible;
|
||||
sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_0_mps;
|
||||
} else {
|
||||
is_dsc_possible = (bool)dsc_common_caps.color_formats.bits.YCBCR_NATIVE_422;
|
||||
sink_per_slice_throughput_mps = dsc_sink_caps->throughput_mode_1_mps;
|
||||
branch_max_throughput_mps = dsc_sink_caps->branch_overall_throughput_1_mps;
|
||||
}
|
||||
break;
|
||||
case PIXEL_ENCODING_YCBCR420:
|
||||
|
|
@ -1404,7 +1406,6 @@ void dc_dsc_get_policy_for_timing(const struct dc_crtc_timing *timing,
|
|||
policy->min_target_bpp = 8;
|
||||
/* DP specs limits to 3 x bpc */
|
||||
policy->max_target_bpp = 3 * bpc;
|
||||
policy->ycbcr422_simple = true;
|
||||
break;
|
||||
case PIXEL_ENCODING_YCBCR420:
|
||||
/* DP specs limits to 6 */
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void dsc2_get_enc_caps(struct dsc_enc_caps *dsc_enc_caps, int pixel_clock_100Hz)
|
|||
dsc_enc_caps->color_formats.bits.RGB = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
|
||||
|
||||
dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ void dsc35_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsigned int m
|
|||
dsc_enc_caps->color_formats.bits.RGB = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
|
||||
|
||||
dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ static void dsc401_get_single_enc_caps(struct dsc_enc_caps *dsc_enc_caps, unsign
|
|||
dsc_enc_caps->color_formats.bits.RGB = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_444 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_SIMPLE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 1;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_422 = 0;
|
||||
dsc_enc_caps->color_formats.bits.YCBCR_NATIVE_420 = 1;
|
||||
|
||||
dsc_enc_caps->color_depth.bits.COLOR_DEPTH_8_BPC = 1;
|
||||
|
|
|
|||
|
|
@ -781,8 +781,10 @@ static void restore_phy_clocks_for_destructive_link_verification(const struct dc
|
|||
}
|
||||
|
||||
static void verify_link_capability_destructive(struct dc_link *link,
|
||||
struct dc_sink *sink,
|
||||
enum dc_detect_reason reason)
|
||||
{
|
||||
(void)sink;
|
||||
bool should_prepare_phy_clocks =
|
||||
should_prepare_phy_clocks_for_link_verification(link->dc, reason);
|
||||
|
||||
|
|
@ -854,11 +856,11 @@ static bool should_verify_link_capability_destructively(struct dc_link *link,
|
|||
return destrictive;
|
||||
}
|
||||
|
||||
static void verify_link_capability(struct dc_link *link,
|
||||
static void verify_link_capability(struct dc_link *link, struct dc_sink *sink,
|
||||
enum dc_detect_reason reason)
|
||||
{
|
||||
if (should_verify_link_capability_destructively(link, reason))
|
||||
verify_link_capability_destructive(link, reason);
|
||||
verify_link_capability_destructive(link, sink, reason);
|
||||
else
|
||||
verify_link_capability_non_destructive(link);
|
||||
}
|
||||
|
|
@ -1452,9 +1454,8 @@ bool link_detect(struct dc_link *link, enum dc_detect_reason reason)
|
|||
|
||||
is_local_sink_detect_success = detect_link_and_local_sink(link, reason);
|
||||
|
||||
if (is_local_sink_detect_success && link->local_sink) {
|
||||
verify_link_capability(link, reason);
|
||||
}
|
||||
if (is_local_sink_detect_success && link->local_sink)
|
||||
verify_link_capability(link, link->local_sink, reason);
|
||||
|
||||
DC_LOG_DC("%s: link_index=%d is_local_sink_detect_success=%d pre_link_type=%d link_type=%d\n", __func__,
|
||||
link->link_index, is_local_sink_detect_success, pre_link_type, link->type);
|
||||
|
|
|
|||
|
|
@ -181,8 +181,7 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
|
|||
/* link can be also enabled by vbios. In this case it is not recorded
|
||||
* in pipe_ctx. Disable link phy here to make sure it is completely off
|
||||
*/
|
||||
if (dc_is_dp_signal(link->connector_signal))
|
||||
dp_disable_link_phy(link, &link_res, link->connector_signal);
|
||||
dp_disable_link_phy(link, &link_res, link->connector_signal);
|
||||
}
|
||||
|
||||
void link_resume(struct dc_link *link)
|
||||
|
|
|
|||
|
|
@ -1963,8 +1963,6 @@ static bool dcn31_resource_construct(
|
|||
dc->config.use_pipe_ctx_sync_logic = true;
|
||||
dc->config.disable_hbr_audio_dp2 = true;
|
||||
|
||||
dc->config.no_native422_support = true;
|
||||
|
||||
/* read VBIOS LTTPR caps */
|
||||
{
|
||||
if (ctx->dc_bios->funcs->get_lttpr_caps) {
|
||||
|
|
|
|||
|
|
@ -1926,8 +1926,6 @@ static bool dcn315_resource_construct(
|
|||
dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
|
||||
dc->caps.color.mpc.ocsc = 1;
|
||||
|
||||
dc->config.no_native422_support = true;
|
||||
|
||||
/* read VBIOS LTTPR caps */
|
||||
{
|
||||
if (ctx->dc_bios->funcs->get_lttpr_caps) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user