aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch
new file mode 100644
index 00000000..a8b40f10
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/0282-drm-amd-display-adding-new-dc_update_surfaces_and_st.patch
@@ -0,0 +1,90 @@
+From 9a9932d3fdf122e0a0e38952bd377c3ead30da8d Mon Sep 17 00:00:00 2001
+From: Leon Elazar <leon.elazar@amd.com>
+Date: Thu, 9 Mar 2017 14:38:15 -0500
+Subject: [PATCH 0282/4131] drm/amd/display: adding new
+ dc_update_surfaces_and_stream
+
+Signed-off-by: Leon Elazar <leon.elazar@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 | 21 +++++++++++++++++++++
+ drivers/gpu/drm/amd/display/dc/dc.h | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 50 insertions(+)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index d6041e8..228ef6b 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -1268,6 +1268,27 @@ enum surface_update_type dc_check_update_surfaces_for_stream(
+ return overall_type;
+ }
+
++void dc_update_surfaces_and_stream(struct dc *dc,
++ struct dc_surface_update *surface_updates, int surface_count,
++ const struct dc_stream *dc_stream,
++ struct dc_stream_update *stream_update)
++{
++ const struct dc_stream_status *stream_status;
++
++ stream_status = dc_stream_get_status(dc_stream);
++ ASSERT(stream_status);
++ if (!stream_status)
++ return; /* Cannot update stream that is not committed */
++
++ if (stream_update) {
++ dc->stream_funcs.stream_update_scaling(dc, dc_stream,
++ &stream_update->src, &stream_update->dst);
++ }
++
++ dc_update_surfaces_for_stream(dc, surface_updates,
++ surface_count, dc_stream);
++}
++
+ enum surface_update_type update_surface_trace_level = UPDATE_TYPE_FULL;
+
+ void dc_update_surfaces_for_stream(struct dc *dc,
+diff --git a/drivers/gpu/drm/amd/display/dc/dc.h b/drivers/gpu/drm/amd/display/dc/dc.h
+index 106addc..b1bff59 100644
+--- a/drivers/gpu/drm/amd/display/dc/dc.h
++++ b/drivers/gpu/drm/amd/display/dc/dc.h
+@@ -433,6 +433,35 @@ struct dc_stream {
+ /* TODO: CEA VIC */
+ };
+
++struct dc_stream_update {
++
++ struct rect src;
++
++ struct rect dst;
++
++};
++
++
++/*
++ * Setup stream attributes if no stream updates are provided
++ * there will be no impact on the stream parameters
++ *
++ * Set up surface attributes and associate to a stream
++ * The surfaces parameter is an absolute set of all surface active for the stream.
++ * If no surfaces are provided, the stream will be blanked; no memory read.
++ * Any flip related attribute changes must be done through this interface.
++ *
++ * After this call:
++ * Surfaces attributes are programmed and configured to be composed into stream.
++ * This does not trigger a flip. No surface address is programmed.
++ *
++ */
++
++void dc_update_surfaces_and_stream(struct dc *dc,
++ struct dc_surface_update *surface_updates, int surface_count,
++ const struct dc_stream *dc_stream,
++ struct dc_stream_update *stream_update);
++
+ /*
+ * Log the current stream state.
+ */
+--
+2.7.4
+