]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amd/display: Add new DSC interface to disconnect from pipe
authorEric Bernstein <eric.bernstein@amd.com>
Thu, 21 Apr 2022 20:19:34 +0000 (16:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 4 May 2022 14:43:55 +0000 (10:43 -0400)
[Why & How]
Add new DSC interface to disconnect from pipe.

Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Eric Bernstein <eric.bernstein@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/dcn20/dcn20_dsc.c
drivers/gpu/drm/amd/display/dc/inc/hw/dsc.h

index ef5c4c0f4d6c242c5e6c60708f8d7c9875563108..c4f14aef0649f06eb99961d61f0e4b21e7426fac 100644 (file)
@@ -45,6 +45,7 @@ static void dsc2_set_config(struct display_stream_compressor *dsc, const struct
 static bool dsc2_get_packed_pps(struct display_stream_compressor *dsc, const struct dsc_config *dsc_cfg, uint8_t *dsc_packed_pps);
 static void dsc2_enable(struct display_stream_compressor *dsc, int opp_pipe);
 static void dsc2_disable(struct display_stream_compressor *dsc);
+static void dsc2_disconnect(struct display_stream_compressor *dsc);
 
 const struct dsc_funcs dcn20_dsc_funcs = {
        .dsc_get_enc_caps = dsc2_get_enc_caps,
@@ -54,6 +55,7 @@ const struct dsc_funcs dcn20_dsc_funcs = {
        .dsc_get_packed_pps = dsc2_get_packed_pps,
        .dsc_enable = dsc2_enable,
        .dsc_disable = dsc2_disable,
+       .dsc_disconnect = dsc2_disconnect,
 };
 
 /* Macro definitios for REG_SET macros*/
@@ -276,6 +278,15 @@ static void dsc2_disable(struct display_stream_compressor *dsc)
                DSC_CLOCK_EN, 0);
 }
 
+static void dsc2_disconnect(struct display_stream_compressor *dsc)
+{
+       struct dcn20_dsc *dsc20 = TO_DCN20_DSC(dsc);
+
+       DC_LOG_DSC("disconnect DSC %d", dsc->inst);
+
+       REG_UPDATE(DSCRM_DSC_FORWARD_CONFIG,
+               DSCRM_DSC_FORWARD_EN, 0);
+}
 
 /* This module's internal functions */
 static void dsc_log_pps(struct display_stream_compressor *dsc, struct drm_dsc_config *pps)
index 346f0ba73e864397f69e7ce933d98a863b31fa07..d7b8d586b5237e9a8ecb67c1cbf9254a2f38c1d3 100644 (file)
@@ -104,6 +104,7 @@ struct dsc_funcs {
                        uint8_t *dsc_packed_pps);
        void (*dsc_enable)(struct display_stream_compressor *dsc, int opp_pipe);
        void (*dsc_disable)(struct display_stream_compressor *dsc);
+       void (*dsc_disconnect)(struct display_stream_compressor *dsc);
 };
 
 #endif