OSDN Git Service

drm/amd/display: Define remove_stream_from_ctx resource func
authorNikola Cornij <nikola.cornij@amd.com>
Thu, 14 Dec 2017 22:57:56 +0000 (17:57 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 19 Feb 2018 19:17:30 +0000 (14:17 -0500)
This will allow us to clean up resources on a stream as needed.

Signed-off-by: Nikola Cornij <nikola.cornij@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@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/inc/core_types.h

index 36d54ef..ba88284 100644 (file)
@@ -1554,6 +1554,9 @@ enum dc_status dc_remove_stream_from_ctx(
                                                          dc->res_pool,
                                                          del_pipe->clock_source);
 
+                       if (dc->res_pool->funcs->remove_stream_from_ctx)
+                               dc->res_pool->funcs->remove_stream_from_ctx(dc, new_ctx, stream);
+
                        memset(del_pipe, 0, sizeof(*del_pipe));
 
                        break;
index 8dcaf91..59d2699 100644 (file)
@@ -119,6 +119,11 @@ struct resource_funcs {
                        struct dc *dc,
                        struct dc_state *new_ctx,
                        struct dc_stream_state *dc_stream);
+
+       enum dc_status (*remove_stream_from_ctx)(
+                               struct dc *dc,
+                               struct dc_state *new_ctx,
+                               struct dc_stream_state *stream);
 };
 
 struct audio_support{