aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch')
-rw-r--r--common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch153
1 files changed, 153 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch b/common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch
new file mode 100644
index 00000000..50a0f8fb
--- /dev/null
+++ b/common/recipes-kernel/linux/files/1053-drm-amd-dal-Change-reset-pipe_ctx-check-conditon.patch
@@ -0,0 +1,153 @@
+From 2f548663a8e1b073634cafd3bdad7f9c57b1a6f4 Mon Sep 17 00:00:00 2001
+From: Yongqiang Sun <yongqiang.sun@amd.com>
+Date: Thu, 7 Apr 2016 10:47:08 -0400
+Subject: [PATCH 1053/1110] drm/amd/dal: Change reset pipe_ctx check conditon
+
+Signed-off-by: Yongqiang Sun <yongqiang.sun@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/dal/dc/core/dc_resource.c | 43 ++++++++++++++++++++++
+ .../drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 43 ----------------------
+ drivers/gpu/drm/amd/dal/dc/inc/core_types.h | 5 ---
+ drivers/gpu/drm/amd/dal/dc/inc/resource.h | 4 ++
+ 4 files changed, 47 insertions(+), 48 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+index 12e4515..3f62986 100644
+--- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+@@ -1269,3 +1269,46 @@ enum dc_status resource_map_clock_resources(
+
+ return DC_OK;
+ }
++
++static bool check_timing_change(struct core_stream *cur_stream,
++ struct core_stream *new_stream)
++{
++ if (cur_stream == NULL)
++ return true;
++
++ /* If sink pointer changed, it means this is a hotplug, we should do
++ * full hw setting.
++ */
++ if (cur_stream->sink != new_stream->sink)
++ return true;
++
++ return !resource_is_same_timing(
++ &cur_stream->public.timing,
++ &new_stream->public.timing);
++}
++
++bool pipe_need_reprogram(
++ struct pipe_ctx *pipe_ctx_old,
++ struct pipe_ctx *pipe_ctx)
++{
++ if (pipe_ctx_old->stream->sink != pipe_ctx->stream->sink)
++ return true;
++
++ if (pipe_ctx_old->signal != pipe_ctx->signal)
++ return true;
++
++ if (pipe_ctx_old->audio != pipe_ctx->audio)
++ return true;
++
++ if (pipe_ctx_old->clock_source != pipe_ctx->clock_source)
++ return true;
++
++ if (pipe_ctx_old->stream_enc != pipe_ctx->stream_enc)
++ return true;
++
++ if (check_timing_change(pipe_ctx_old->stream, pipe_ctx->stream))
++ return true;
++
++
++ return false;
++}
+diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
+index 62363ef..d1dd0d5 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
++++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c
+@@ -1156,49 +1156,6 @@ static void set_drr(struct pipe_ctx **pipe_ctx,
+ }
+ }
+
+-static bool check_timing_change(struct core_stream *cur_stream,
+- struct core_stream *new_stream)
+-{
+- if (cur_stream == NULL)
+- return true;
+-
+- /* If sink pointer changed, it means this is a hotplug, we should do
+- * full hw setting.
+- */
+- if (cur_stream->sink != new_stream->sink)
+- return true;
+-
+- return !resource_is_same_timing(
+- &cur_stream->public.timing,
+- &new_stream->public.timing);
+-}
+-
+-static bool pipe_need_reprogram(
+- struct pipe_ctx *pipe_ctx_old,
+- struct pipe_ctx *pipe_ctx)
+-{
+- if (pipe_ctx_old->stream->sink != pipe_ctx->stream->sink)
+- return true;
+-
+- if (pipe_ctx_old->signal != pipe_ctx->signal)
+- return true;
+-
+- if (pipe_ctx_old->audio != pipe_ctx->audio)
+- return true;
+-
+- if (pipe_ctx_old->clock_source != pipe_ctx->clock_source)
+- return true;
+-
+- if (pipe_ctx_old->stream_enc != pipe_ctx->stream_enc)
+- return true;
+-
+- if (check_timing_change(pipe_ctx_old->stream, pipe_ctx->stream))
+- return true;
+-
+-
+- return false;
+-}
+-
+ /*TODO: const validate_context*/
+ static enum dc_status apply_ctx_to_hw(
+ struct core_dc *dc,
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+index 5994ad1..94e0adf 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
+@@ -290,11 +290,6 @@ struct pipe_ctx {
+ struct encoder_info_frame encoder_info_frame;
+
+ uint8_t pipe_idx;
+-
+- struct flags {
+- bool unchanged;
+- bool timing_changed;
+- } flags;
+ };
+
+ struct resource_context {
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/resource.h b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
+index 00843a4..e66f73e 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/resource.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
+@@ -92,5 +92,9 @@ enum dc_status resource_map_clock_resources(
+ const struct core_dc *dc,
+ struct validate_context *context);
+
++bool pipe_need_reprogram(
++ struct pipe_ctx *pipe_ctx_old,
++ struct pipe_ctx *pipe_ctx);
++
+
+ #endif /* DRIVERS_GPU_DRM_AMD_DAL_DEV_DC_INC_RESOURCE_H_ */
+--
+2.7.4
+