aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch')
-rw-r--r--common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch287
1 files changed, 0 insertions, 287 deletions
diff --git a/common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch b/common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch
deleted file mode 100644
index 41cd7e2d..00000000
--- a/common/recipes-kernel/linux/files/0566-drm-amd-dal-Move-disabling-of-link-stream-to-dc_link.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-From ab87ad6d7fa27c5910f4ed67f13cc76660cb9ea4 Mon Sep 17 00:00:00 2001
-From: Harry Wentland <harry.wentland@amd.com>
-Date: Wed, 2 Dec 2015 15:03:30 -0500
-Subject: [PATCH 0566/1110] drm/amd/dal: Move disabling of link & stream to
- dc_link
-
-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_link.c | 77 +++++++++++++++++++++-
- .../drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 72 ++------------------
- drivers/gpu/drm/amd/dal/dc/inc/core_types.h | 7 +-
- drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h | 3 +
- 4 files changed, 87 insertions(+), 72 deletions(-)
-
-diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
-index f29aea7..ad890a5 100644
---- a/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
-+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_link.c
-@@ -983,7 +983,7 @@ static void enable_link_hdmi(struct core_stream *stream)
- }
-
- /****************************enable_link***********************************/
--enum dc_status core_link_enable(struct core_stream *stream)
-+static enum dc_status enable_link(struct core_stream *stream)
- {
- enum dc_status status;
- switch (stream->signal) {
-@@ -1020,7 +1020,7 @@ enum dc_status core_link_enable(struct core_stream *stream)
- return status;
- }
-
--void core_link_disable(struct core_stream *stream)
-+static void disable_link(struct core_stream *stream)
- {
- /* TODO dp_set_hw_test_pattern */
- struct dc *dc = stream->ctx->dc;
-@@ -1143,6 +1143,61 @@ static enum dc_status allocate_mst_payload(struct core_stream *stream)
-
- }
-
-+static enum dc_status deallocate_mst_payload(struct core_stream *stream)
-+{
-+ struct core_link *link = stream->sink->link;
-+ struct link_encoder *link_encoder = link->link_enc;
-+ struct stream_encoder *stream_encoder = stream->stream_enc;
-+ struct dp_mst_stream_allocation_table table = {0};
-+ struct fixed31_32 avg_time_slots_per_mtp = dal_fixed31_32_from_int(0);
-+ uint8_t i;
-+ struct dc *dc = stream->ctx->dc;
-+
-+ /* deallocate_mst_payload is called before disable link. When mode or
-+ * disable/enable monitor, new stream is created which is not in link
-+ * stream[] yet. For this, payload is not allocated yet, so de-alloc
-+ * should not done. For new mode set, map_resources will get engine
-+ * for new stream, so stream_enc->id should be validated until here.
-+ */
-+ if (link->enabled_stream_count == 0)
-+ return DC_OK;
-+
-+ for (i = 0; i < link->enabled_stream_count; i++) {
-+ if (link->enabled_streams[i] == stream)
-+ break;
-+ }
-+ /* stream is not in link stream list */
-+ if (i == link->enabled_stream_count)
-+ return DC_OK;
-+
-+ /* slot X.Y */
-+ dc->hwss.set_mst_bandwidth(
-+ stream_encoder,
-+ avg_time_slots_per_mtp);
-+
-+ /* TODO: which component is responsible for remove payload table? */
-+ dc_helpers_dp_mst_write_payload_allocation_table(
-+ stream->ctx,
-+ &stream->public,
-+ &table,
-+ false);
-+
-+ dc->hwss.update_mst_stream_allocation_table(
-+ link_encoder,
-+ &table);
-+
-+ dc_helpers_dp_mst_poll_for_allocation_change_trigger(
-+ stream->ctx,
-+ &stream->public);
-+
-+ dc_helpers_dp_mst_send_payload_allocation(
-+ stream->ctx,
-+ &stream->public,
-+ false);
-+
-+ return DC_OK;
-+}
-+
- void core_link_enable_stream(
- struct core_link *link,
- struct core_stream *stream)
-@@ -1151,10 +1206,26 @@ void core_link_enable_stream(
-
- dc->hwss.enable_stream(stream);
-
-- if (DC_OK != core_link_enable(stream)) {
-+ if (DC_OK != enable_link(stream)) {
- BREAK_TO_DEBUGGER();
- return;
- }
- if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
- allocate_mst_payload(stream);
- }
-+
-+void core_link_disable_stream(
-+ struct core_link *link,
-+ struct core_stream *stream)
-+{
-+ struct dc *dc = stream->ctx->dc;
-+
-+ if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
-+ deallocate_mst_payload(stream);
-+
-+ dc->hwss.disable_stream(stream);
-+
-+ disable_link(stream);
-+
-+}
-+
-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 fa71095..81935e5 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
-@@ -774,60 +774,6 @@ static enum color_space get_output_color_space(
- return color_space;
- }
-
--static enum dc_status deallocate_mst_payload(struct core_stream *stream)
--{
-- struct core_link *link = stream->sink->link;
-- struct link_encoder *link_encoder = link->link_enc;
-- struct stream_encoder *stream_encoder = stream->stream_enc;
-- struct dp_mst_stream_allocation_table table = {0};
-- struct fixed31_32 avg_time_slots_per_mtp = dal_fixed31_32_from_int(0);
-- uint8_t i;
--
-- /* deallocate_mst_payload is called before disable link. When mode or
-- * disable/enable monitor, new stream is created which is not in link
-- * stream[] yet. For this, payload is not allocated yet, so de-alloc
-- * should not done. For new mode set, map_resources will get engine
-- * for new stream, so stream_enc->id should be validated until here.
-- */
-- if (link->enabled_stream_count == 0)
-- return DC_OK;
--
-- for (i = 0; i < link->enabled_stream_count; i++) {
-- if (link->enabled_streams[i] == stream)
-- break;
-- }
-- /* stream is not in link stream list */
-- if (i == link->enabled_stream_count)
-- return DC_OK;
--
-- /* slot X.Y */
-- dce110_stream_encoder_set_mst_bandwidth(
-- stream_encoder,
-- avg_time_slots_per_mtp);
--
-- /* TODO: which component is responsible for remove payload table? */
-- dc_helpers_dp_mst_write_payload_allocation_table(
-- stream->ctx,
-- &stream->public,
-- &table,
-- false);
--
-- dce110_link_encoder_update_mst_stream_allocation_table(
-- link_encoder,
-- &table);
--
-- dc_helpers_dp_mst_poll_for_allocation_change_trigger(
-- stream->ctx,
-- &stream->public);
--
-- dc_helpers_dp_mst_send_payload_allocation(
-- stream->ctx,
-- &stream->public,
-- false);
--
-- return DC_OK;
--}
--
- static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx,
- struct validate_context *context,
- const struct dc *dc)
-@@ -841,9 +787,8 @@ static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx,
- enum color_space color_space;
-
- if (timing_changed) {
--
-- disable_stream(stream);
-- core_link_disable(stream);
-+ core_link_disable_stream(
-+ stream->sink->link, stream);
-
- /*TODO: AUTO check if timing changed*/
- if (false == dal_clock_source_program_pix_clk(
-@@ -963,10 +908,7 @@ static void power_down_encoders(struct validate_context *context)
- target = context->targets[i];
- stream = DC_STREAM_TO_CORE(target->public.streams[0]);
-
-- if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
-- deallocate_mst_payload(stream);
--
-- core_link_disable(stream);
-+ core_link_disable_stream(stream->sink->link, stream);
- }
- }
-
-@@ -1623,10 +1565,6 @@ static bool update_plane_address(
- static void reset_single_stream_hw_ctx(struct core_stream *stream,
- struct validate_context *context)
- {
-- if (stream->signal == SIGNAL_TYPE_DISPLAY_PORT_MST)
-- deallocate_mst_payload(stream);
--
-- disable_stream(stream);
- if (stream->audio) {
- dal_audio_disable_output(stream->audio,
- stream->stream_enc->id,
-@@ -1634,7 +1572,8 @@ static void reset_single_stream_hw_ctx(struct core_stream *stream,
- stream->audio = NULL;
- }
-
-- core_link_disable(stream);
-+ core_link_disable_stream(stream->sink->link, stream);
-+
- dce110_timing_generator_blank_crtc(stream->tg);
- dce110_timing_generator_disable_crtc(stream->tg);
- dce110_mem_input_deallocate_dmif_buffer(stream->mi, context->target_count);
-@@ -1798,6 +1737,7 @@ static const struct hw_sequencer_funcs dce110_funcs = {
- .enable_display_power_gating = dce110_enable_display_power_gating,
- .program_bw = dce110_program_bw,
- .enable_stream = enable_stream,
-+ .disable_stream = disable_stream,
- .update_mst_stream_allocation_table = dce110_link_encoder_update_mst_stream_allocation_table,
- .set_mst_bandwidth = dce110_stream_encoder_set_mst_bandwidth
- };
-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 299b13e..3781751 100644
---- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
-+++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h
-@@ -233,9 +233,6 @@ struct core_link {
-
- struct core_link *link_create(const struct link_init_data *init_params);
- void link_destroy(struct core_link **link);
--enum dc_status core_link_enable(struct core_stream *stream);
--
--void core_link_disable(struct core_stream *stream);
-
- enum dc_status dc_link_validate_mode_timing(
- const struct core_sink *sink,
-@@ -248,6 +245,10 @@ void core_link_enable_stream(
- struct core_link *link,
- struct core_stream *stream);
-
-+void core_link_disable_stream(
-+ struct core_link *link,
-+ struct core_stream *stream);
-+
- /********** DAL Core*********************/
- #include "display_clock_interface.h"
-
-diff --git a/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h b/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
-index 0502c4d..67cc020 100644
---- a/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
-+++ b/drivers/gpu/drm/amd/dal/dc/inc/hw_sequencer.h
-@@ -157,6 +157,9 @@ struct hw_sequencer_funcs {
- void (*enable_stream)(
- struct core_stream *stream);
-
-+ void (*disable_stream)(
-+ struct core_stream *stream);
-+
- void (*update_mst_stream_allocation_table)(
- struct link_encoder *enc,
- const struct dp_mst_stream_allocation_table *table);
---
-2.7.4
-