]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: add support for disconnected eDP panels
authorJun Lei <Jun.Lei@amd.com>
Mon, 15 Apr 2019 18:52:25 +0000 (14:52 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:20:49 +0000 (12:20 -0500)
[why]
On some configurations, eDP from GPU is muxed with another GPU.  DC does
not know state of mux, but DM has this knowledge.  This flag allows DC to ignore
creating EDP link when DM informs DC that EDP mux is not connected.

[how]
Add flag to dc, populate flag in DM

Signed-off-by: Jun Lei <Jun.Lei@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h

index ee6b646180b6618ed1a4bd5db033d9b6d3b93f48..700278216424ff64ddb39765022935528b226636 100644 (file)
@@ -169,9 +169,14 @@ static bool create_links(
                link = link_create(&link_init_params);
 
                if (link) {
-                       dc->links[dc->link_count] = link;
-                       link->dc = dc;
-                       ++dc->link_count;
+                       if (dc->config.edp_not_connected &&
+                                       link->connector_signal == SIGNAL_TYPE_EDP) {
+                               link_destroy(&link);
+                       } else {
+                               dc->links[dc->link_count] = link;
+                               link->dc = dc;
+                               ++dc->link_count;
+                       }
                }
        }
 
index a7144cd189cffc6ebe6c6ac711475c8c8e9b8806..12ca7538836248cd4f06c9845931eb786d70ca30 100644 (file)
@@ -205,6 +205,7 @@ struct dc_config {
        bool disable_fractional_pwm;
        bool allow_seamless_boot_optimization;
        bool power_down_display_on_boot;
+       bool edp_not_connected;
 };
 
 enum visual_confirm {