浏览代码

drm/amd/display: Define remove_stream_from_ctx resource func

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>
Nikola Cornij 7 年之前
父节点
当前提交
e56ae556e1
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 3 0
      drivers/gpu/drm/amd/display/dc/core/dc_resource.c
  2. 5 0
      drivers/gpu/drm/amd/display/dc/inc/core_types.h

+ 3 - 0
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

@@ -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;

+ 5 - 0
drivers/gpu/drm/amd/display/dc/inc/core_types.h

@@ -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{