drm/amd/display: Free DCN version of stream encoder
authorEric Bernstein <eric.bernstein@amd.com>
Wed, 13 Feb 2019 22:56:38 +0000 (17:56 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:49 +0000 (15:36 -0500)
Cross a TODO item off the list. Cleanup SIGNAL_TYPE_HDMI_FRL, it's
not currently supported.

Signed-off-by: Eric Bernstein <eric.bernstein@amd.com>
Reviewed-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Acked-by: Leo Li <sunpeng.li@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/dcn10/dcn10_resource.c
drivers/gpu/drm/amd/display/dc/inc/core_types.h

index 7f3c7defb5401cc564eb616f952f13519e7a6f3e..144440203316a2ab53100afdfe2c1747364d612e 100644 (file)
@@ -260,6 +260,7 @@ bool resource_construct(
                        pool->stream_enc_count++;
                }
        }
+
        dc->caps.dynamic_audio = false;
        if (pool->audio_count < pool->stream_enc_count) {
                dc->caps.dynamic_audio = true;
index 3d82fdde2edf29d4e6e296311d92f15ceb7adb78..e879829a34b9e07f126abfada097bc362974aac4 100644 (file)
@@ -874,10 +874,7 @@ static void destruct(struct dcn10_resource_pool *pool)
 
        for (i = 0; i < pool->base.stream_enc_count; i++) {
                if (pool->base.stream_enc[i] != NULL) {
-                       /* TODO: free dcn version of stream encoder once implemented
-                        * rather than using virtual stream encoder
-                        */
-                       kfree(pool->base.stream_enc[i]);
+                       kfree(DCN10STRENC_FROM_STRENC(pool->base.stream_enc[i]));
                        pool->base.stream_enc[i] = NULL;
                }
        }
@@ -930,9 +927,6 @@ static void destruct(struct dcn10_resource_pool *pool)
                }
        }
 
-       for (i = 0; i < pool->base.stream_enc_count; i++)
-               kfree(pool->base.stream_enc[i]);
-
        for (i = 0; i < pool->base.audio_count; i++) {
                if (pool->base.audios[i])
                        dce_aud_destroy(&pool->base.audios[i]);
index 9df1a2f486fd4bfe9aec183590acd83140cef8bc..ab16683ccb6e9718c3154fb35dca002d477a4808 100644 (file)
@@ -154,6 +154,7 @@ struct resource_pool {
        unsigned int pipe_count;
        unsigned int underlay_pipe_index;
        unsigned int stream_enc_count;
+
        unsigned int ref_clock_inKhz;
        unsigned int timing_generator_count;