diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0543-drm-amd-dal-fix-bug-in-dc_link_remove_sink.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0543-drm-amd-dal-fix-bug-in-dc_link_remove_sink.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0543-drm-amd-dal-fix-bug-in-dc_link_remove_sink.patch b/common/recipes-kernel/linux/files/0543-drm-amd-dal-fix-bug-in-dc_link_remove_sink.patch new file mode 100644 index 00000000..eeb74f28 --- /dev/null +++ b/common/recipes-kernel/linux/files/0543-drm-amd-dal-fix-bug-in-dc_link_remove_sink.patch @@ -0,0 +1,47 @@ +From 7e21aac36597382339dcd4ce4a0353b45601196e Mon Sep 17 00:00:00 2001 +From: Mykola Lysenko <Mykola.Lysenko@amd.com> +Date: Tue, 1 Dec 2015 18:32:26 +0800 +Subject: [PATCH 0543/1110] drm/amd/dal: fix bug in dc_link_remove_sink + +Signed-off-by: Harry Wentland <harry.wentland@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/dal/dc/core/dc.c | 8 ++++++++ + drivers/gpu/drm/amd/dal/dc/dc.h | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c +index 60cbb47..fded924 100644 +--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c ++++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c +@@ -847,6 +847,14 @@ void dc_link_remove_sink(struct dc_link *link, const struct dc_sink *sink) + if (link->sink[i] == sink) { + dc_sink_release(sink); + link->sink[i] = NULL; ++ ++ /* shrink array to remove empty place */ ++ dc_service_memmove( ++ &link->sink[i], ++ &link->sink[i + 1], ++ (link->sink_count - i - 1) * ++ sizeof(link->sink[i])); ++ + link->sink_count--; + return; + } +diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h +index 77fa4c8..7b611d7 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc.h +@@ -270,7 +270,7 @@ void dc_update_stream(const struct dc_stream *dc_stream, + * The currently active signal type (HDMI, DP-SST, DP-MST) is also reported. + */ + struct dc_link { +- const struct dc_sink *sink[MAX_SINKS_PER_LINK]; /* TODO: multiple sink support for MST */ ++ const struct dc_sink *sink[MAX_SINKS_PER_LINK]; + unsigned int sink_count; + enum dc_connection_type type; + enum signal_type connector_signal; +-- +2.7.4 + |