]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amd/display: Add control flag to dc_stream_state to skip eDP BL off/link off
authorMax Tseng <max.tseng@amd.com>
Tue, 25 Apr 2023 07:05:17 +0000 (15:05 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:41:29 +0000 (12:41 -0400)
Add control flag to dc_stream_state to skip eDP BL off/link off.

Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Max Tseng <max.tseng@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_stream.h
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/link/link_dpms.c

index d5b3e3a32cc6d4c7db5ad2d6c433beda306798eb..3697ea1d14c1bf5f219f40e1cbc7e71cc8a36799 100644 (file)
@@ -302,6 +302,7 @@ struct dc_stream_state {
        bool vblank_synchronized;
        bool fpo_in_use;
        struct mall_stream_config mall_stream_config;
+       bool skip_edp_power_down;
 };
 
 #define ABM_LEVEL_IMMEDIATE_DISABLE 255
index d4cacb8df6310b218735b085fc82fed36d04ef89..6c9ca43d1040b3610699ec94615b40356cee3ceb 100644 (file)
@@ -1216,7 +1216,8 @@ void dce110_blank_stream(struct pipe_ctx *pipe_ctx)
        struct dce_hwseq *hws = link->dc->hwseq;
 
        if (link->local_sink && link->local_sink->sink_signal == SIGNAL_TYPE_EDP) {
-               hws->funcs.edp_backlight_control(link, false);
+               if (!stream->skip_edp_power_down)
+                       hws->funcs.edp_backlight_control(link, false);
                link->dc->hwss.set_abm_immediate_disable(pipe_ctx);
        }
 
index f7f1a1586f3b2d373bb8870b7229826da7399e02..1a7b93e41e352adb0e67a11d01a36e7d76eaffbc 100644 (file)
@@ -2207,9 +2207,8 @@ static enum dc_status enable_link(
         * link settings. Need to call disable first before enabling at
         * new link settings.
         */
-       if (link->link_status.link_active) {
+       if (link->link_status.link_active && !stream->skip_edp_power_down)
                disable_link(link, &pipe_ctx->link_res, pipe_ctx->stream->signal);
-       }
 
        switch (pipe_ctx->stream->signal) {
        case SIGNAL_TYPE_DISPLAY_PORT:
@@ -2327,7 +2326,9 @@ void link_set_dpms_off(struct pipe_ctx *pipe_ctx)
                dc->hwss.disable_stream(pipe_ctx);
        } else {
                dc->hwss.disable_stream(pipe_ctx);
-               disable_link(pipe_ctx->stream->link, &pipe_ctx->link_res, pipe_ctx->stream->signal);
+               if (!pipe_ctx->stream->skip_edp_power_down) {
+                       disable_link(pipe_ctx->stream->link, &pipe_ctx->link_res, pipe_ctx->stream->signal);
+               }
        }
 
        if (pipe_ctx->stream->timing.flags.DSC) {