drm/amd/display: Disable secondary link for certain monitors
authorNikola Cornij <nikola.cornij@amd.com>
Mon, 9 Dec 2019 23:54:26 +0000 (18:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 16 Jan 2020 18:41:50 +0000 (13:41 -0500)
[why]
If the specific monitor supports DSC, the secondary link should be
disabled, and the other way around, too: if either that monitor or
our ASIC doesn't support DSC, the secodary link should be enabled.

[how]
Add a monitor patch and disable secondary link if that monitor
is detected and if ASIC supports DSC, or otherwise enable secondary
link.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Joshua Aberback <Joshua.Aberback@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dc_types.h

index 64a0e08fd019539eb98f075b9030ee786c3e05a3..a0eb9e533a615b316cc442918c740e47a90bab71 100644 (file)
@@ -2066,6 +2066,13 @@ void dc_resource_state_construct(
        dst_ctx->clk_mgr = dc->clk_mgr;
 }
 
+
+bool dc_resource_is_dsc_encoding_supported(const struct dc *dc)
+{
+       return dc->res_pool->res_cap->num_dsc > 0;
+}
+
+
 /**
  * dc_validate_global_state() - Determine if HW can support a given state
  * Checks HW resource availability and bandwidth requirement.
@@ -2897,6 +2904,3 @@ void get_audio_check(struct audio_info *aud_modes,
        }
 }
 
-
-
-
index c4e6c696f06fc787aee169c2a251555f360f385b..29762b0531fc44360afbe61133bad2d00d283431 100644 (file)
@@ -910,6 +910,8 @@ void dc_resource_state_copy_construct_current(
 
 void dc_resource_state_destruct(struct dc_state *context);
 
+bool dc_resource_is_dsc_encoding_supported(const struct dc *dc);
+
 /*
  * TODO update to make it about validation sets
  * Set up streams and links associated to drive sinks
index b1a372c8df833f82fa32ec2a608769918cbfb14d..4b5b97520733e546d2307baa5038ee1ef35cd862 100644 (file)
@@ -229,6 +229,7 @@ struct dc_panel_patch {
        unsigned int extra_t12_ms;
        unsigned int extra_delay_backlight_off;
        unsigned int extra_t7_ms;
+       unsigned int manage_secondary_link;
 };
 
 struct dc_edid_caps {