diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0353-drm-amd-display-Move-resource_validate_ctx_destruct-.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/0353-drm-amd-display-Move-resource_validate_ctx_destruct-.patch | 176 |
1 files changed, 176 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0353-drm-amd-display-Move-resource_validate_ctx_destruct-.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0353-drm-amd-display-Move-resource_validate_ctx_destruct-.patch new file mode 100644 index 00000000..2eb1e87f --- /dev/null +++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0353-drm-amd-display-Move-resource_validate_ctx_destruct-.patch @@ -0,0 +1,176 @@ +From 3ebccc8c471dc9de8d8bc06effceb6a6f7d8033b Mon Sep 17 00:00:00 2001 +From: Harry Wentland <harry.wentland@amd.com> +Date: Wed, 29 Mar 2017 11:15:14 -0400 +Subject: [PATCH 0353/4131] drm/amd/display: Move + resource_validate_ctx_destruct to dc.h + +This will be needed to clean up context once we add it to private +atomic state. + +Signed-off-by: Harry Wentland <harry.wentland@amd.com> +Acked-by: Harry Wentland <Harry.Wentland@amd.com> +Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> +Signed-off-by: Alex Deucher <alexander.deucher@amd.com> +--- + drivers/gpu/drm/amd/display/dc/core/dc.c | 22 +++++++++++----------- + drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 4 ++-- + drivers/gpu/drm/amd/display/dc/dc.h | 6 ++++++ + drivers/gpu/drm/amd/display/dc/inc/resource.h | 6 ------ + 4 files changed, 19 insertions(+), 19 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c +index 0d870e9..5620fe3 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c +@@ -389,7 +389,7 @@ static void allocate_dc_stream_funcs(struct core_dc *core_dc) + + static void destruct(struct core_dc *dc) + { +- resource_validate_ctx_destruct(dc->current_context); ++ dc_resource_validate_ctx_destruct(dc->current_context); + + destroy_links(dc); + +@@ -654,7 +654,7 @@ bool dc_validate_resources( + result = core_dc->res_pool->funcs->validate_with_context( + core_dc, set, set_count, context); + +- resource_validate_ctx_destruct(context); ++ dc_resource_validate_ctx_destruct(context); + dm_free(context); + + context_alloc_fail: +@@ -684,7 +684,7 @@ bool dc_validate_guaranteed( + result = core_dc->res_pool->funcs->validate_guaranteed( + core_dc, stream, context); + +- resource_validate_ctx_destruct(context); ++ dc_resource_validate_ctx_destruct(context); + dm_free(context); + + context_alloc_fail: +@@ -838,7 +838,7 @@ bool dc_commit_streams( + __func__, + result); + BREAK_TO_DEBUGGER(); +- resource_validate_ctx_destruct(context); ++ dc_resource_validate_ctx_destruct(context); + goto fail; + } + +@@ -870,7 +870,7 @@ bool dc_commit_streams( + context->streams[i]->public.timing.pix_clk_khz); + } + +- resource_validate_ctx_destruct(core_dc->current_context); ++ dc_resource_validate_ctx_destruct(core_dc->current_context); + dm_free(core_dc->current_context); + + core_dc->current_context = context; +@@ -903,7 +903,7 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) + dm_error("%s: failed to create validate ctx\n", __func__); + return false; + } +- resource_validate_ctx_copy_construct(core_dc->current_context, context); ++ dc_resource_validate_ctx_copy_construct(core_dc->current_context, context); + + post_surface_trace(dc); + for (i = 0; i < context->res_ctx.pool->pipe_count; i++) +@@ -920,9 +920,9 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) + + core_dc->hwss.set_bandwidth(core_dc, context, true); + +- resource_validate_ctx_copy_construct(context, core_dc->current_context); ++ dc_resource_validate_ctx_copy_construct(context, core_dc->current_context); + +- resource_validate_ctx_destruct(context); ++ dc_resource_validate_ctx_destruct(context); + dm_free(context); + + return true; +@@ -1205,7 +1205,7 @@ void dc_update_surfaces_and_stream(struct dc *dc, + + /* initialize scratch memory for building context */ + context = dm_alloc(sizeof(*context)); +- resource_validate_ctx_copy_construct( ++ dc_resource_validate_ctx_copy_construct( + core_dc->current_context, context); + + /* add surface to context */ +@@ -1409,7 +1409,7 @@ void dc_update_surfaces_and_stream(struct dc *dc, + } + + if (core_dc->current_context != context) { +- resource_validate_ctx_destruct(core_dc->current_context); ++ dc_resource_validate_ctx_destruct(core_dc->current_context); + dm_free(core_dc->current_context); + + core_dc->current_context = context; +@@ -1418,7 +1418,7 @@ void dc_update_surfaces_and_stream(struct dc *dc, + + fail: + if (core_dc->current_context != context) { +- resource_validate_ctx_destruct(context); ++ dc_resource_validate_ctx_destruct(context); + dm_free(context); + } + } +diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +index 2d40864..2e12a0b 100644 +--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c ++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +@@ -2050,7 +2050,7 @@ static void set_vsc_info_packet( + /*TODO: stereo 3D support and extend pixel encoding colorimetry*/ + } + +-void resource_validate_ctx_destruct(struct validate_context *context) ++void dc_resource_validate_ctx_destruct(struct validate_context *context) + { + int i, j; + +@@ -2069,7 +2069,7 @@ void resource_validate_ctx_destruct(struct validate_context *context) + * Copy src_ctx into dst_ctx and retain all surfaces and streams referenced + * by the src_ctx + */ +-void resource_validate_ctx_copy_construct( ++void dc_resource_validate_ctx_copy_construct( + const struct validate_context *src_ctx, + struct validate_context *dst_ctx) + { +diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h +index 7d548b4..7de2080 100644 +--- a/drivers/gpu/drm/amd/display/dc/dc.h ++++ b/drivers/gpu/drm/amd/display/dc/dc.h +@@ -522,6 +522,12 @@ bool dc_validate_guaranteed( + const struct dc *dc, + const struct dc_stream *stream); + ++void dc_resource_validate_ctx_copy_construct( ++ const struct validate_context *src_ctx, ++ struct validate_context *dst_ctx); ++ ++void dc_resource_validate_ctx_destruct(struct validate_context *context); ++ + /* + * Set up streams and links associated to drive sinks + * The streams parameter is an absolute set of all active streams. +diff --git a/drivers/gpu/drm/amd/display/dc/inc/resource.h b/drivers/gpu/drm/amd/display/dc/inc/resource.h +index eb9c966..b1987ca 100644 +--- a/drivers/gpu/drm/amd/display/dc/inc/resource.h ++++ b/drivers/gpu/drm/amd/display/dc/inc/resource.h +@@ -141,12 +141,6 @@ void resource_validate_ctx_update_pointer_after_copy( + const struct validate_context *src_ctx, + struct validate_context *dst_ctx); + +-void resource_validate_ctx_copy_construct( +- const struct validate_context *src_ctx, +- struct validate_context *dst_ctx); +- +-void resource_validate_ctx_destruct(struct validate_context *context); +- + enum dc_status resource_map_clock_resources( + const struct core_dc *dc, + struct validate_context *context); +-- +2.7.4 + |