aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch
diff options
context:
space:
mode:
authorAwais Belal <awais_belal@mentor.com>2016-10-13 14:39:46 +0500
committerAwais Belal <awais_belal@mentor.com>2016-10-14 15:22:00 +0500
commit912c1466ad973230fcdd08b07f766d291a6c13a4 (patch)
tree3e7a0bdfdf033d61c2212f66c19bf192d41e49b2 /common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch
parentb701f13977df4dd34e618e7d074220782b27dd34 (diff)
downloadmeta-amd-912c1466ad973230fcdd08b07f766d291a6c13a4.tar.gz
meta-amd-912c1466ad973230fcdd08b07f766d291a6c13a4.tar.bz2
meta-amd-912c1466ad973230fcdd08b07f766d291a6c13a4.zip
SE/BE: move to 4.4 kernel
This commit does a few things which cannot be separated easily so it cannot be split in to separate commits. * Drops all 4.1 kernel bits. * Moves all common patches from meta-amdfalconx86 to common. * Moves SE/BE builds to 4.4 kernel. Signed-off-by: Awais Belal <awais_belal@mentor.com>
Diffstat (limited to 'common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch')
-rw-r--r--common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch125
1 files changed, 125 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch b/common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch
new file mode 100644
index 00000000..4e966c54
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0762-drm-amd-dal-Expose-dig-index-display_signal-and-ddc-.patch
@@ -0,0 +1,125 @@
+From 9783c01cb969c1c5310d2ceda0a62ea7d20a3f10 Mon Sep 17 00:00:00 2001
+From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Date: Tue, 2 Feb 2016 14:32:29 -0500
+Subject: [PATCH 0762/1110] drm/amd/dal: Expose dig index, display_signal and
+ ddc to amdgpu
+
+Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ .../gpu/drm/amd/dal/dc/adapter/adapter_service.c | 2 +-
+ drivers/gpu/drm/amd/dal/dc/core/dc.c | 44 ++++++++++++++++++++++
+ drivers/gpu/drm/amd/dal/dc/dc.h | 26 ++++++-------
+ 3 files changed, 58 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
+index 3e07408..dd2f931 100644
+--- a/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
++++ b/drivers/gpu/drm/amd/dal/dc/adapter/adapter_service.c
+@@ -92,7 +92,7 @@ static struct feature_source_entry feature_entry_table[] = {
+ * Driver uses SW I2C.
+ * Make Test uses HW I2C.
+ */
+- {FEATURE_RESTORE_USAGE_I2C_SW_ENGINE, true, true},
++ {FEATURE_RESTORE_USAGE_I2C_SW_ENGINE, false, true},
+ {FEATURE_USE_MAX_DISPLAY_CLK, false, true},
+ {FEATURE_ALLOW_EDP_RESOURCE_SHARING, false, true},
+ {FEATURE_SUPPORT_DP_YUV, false, true},
+diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+index e6c7cac..0b8f158 100644
+--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+@@ -886,3 +886,47 @@ void dc_link_remove_remote_sink(const struct dc_link *link, const struct dc_sink
+ }
+ }
+ }
++
++uint8_t dc_get_dig_index(const struct dc_stream *stream)
++{
++
++ struct core_stream *core_stream = DC_STREAM_TO_CORE(stream);
++
++ switch (core_stream->stream_enc->id) {
++ case ENGINE_ID_DIGA:
++ return 0;
++ case ENGINE_ID_DIGB:
++ return 1;
++ case ENGINE_ID_DIGC:
++ return 2;
++ case ENGINE_ID_DIGD:
++ return 3;
++ case ENGINE_ID_DIGE:
++ return 4;
++ case ENGINE_ID_DIGF:
++ return 5;
++ case ENGINE_ID_DIGG:
++ return 6;
++ default:
++ return -1;
++ }
++
++ return 0;
++}
++
++enum gpio_ddc_line dc_get_ddc_line(
++ const struct dc_stream *stream)
++{
++
++ struct core_sink *core_sink = DC_SINK_TO_CORE(stream->sink);
++ struct ddc *ddc_line = dal_ddc_service_get_ddc_pin(
++ core_sink->link->ddc);
++
++ return dal_ddc_get_line(ddc_line);
++}
++
++enum signal_type dc_get_display_signal(
++ const struct dc_stream *stream)
++{
++ return stream->sink->sink_signal;
++}
+diff --git a/drivers/gpu/drm/amd/dal/dc/dc.h b/drivers/gpu/drm/amd/dal/dc/dc.h
+index 1cd0883..61f13bd 100644
+--- a/drivers/gpu/drm/amd/dal/dc/dc.h
++++ b/drivers/gpu/drm/amd/dal/dc/dc.h
+@@ -430,20 +430,10 @@ void dc_resume(const struct dc *dc);
+
+ const struct ddc_service *dc_get_ddc_at_index(
+ struct dc *dc, uint32_t link_index);
+-const struct dc_ddc* dc_get_ddc_from_sink(const struct dc_sink* sink);
+-const struct dc_ddc* dc_get_ddc_from_link(const struct dc_link* link);
+-bool dc_ddc_query_i2c(const struct dc_ddc* ddc,
+- uint32_t address,
+- uint8_t* write_buf,
+- uint32_t write_size,
+- uint8_t* read_buf,
+- uint32_t read_size);
+-bool dc_ddc_dpcd_read(const struct dc_ddc* ddc, uint32_t address,
+- uint8_t* data, uint32_t len);
+-bool dc_ddc_dpcd_write(const struct dc_ddc* ddc, uint32_t address,
+- const uint8_t* data, uint32_t len);
+-
+
++/*
++ * DPCD access interfaces
++ */
+
+ bool dc_read_dpcd(
+ struct dc *dc,
+@@ -459,4 +449,14 @@ bool dc_write_dpcd(
+ const uint8_t *data,
+ uint32_t size);
+
++
++uint8_t dc_get_dig_index(const struct dc_stream *stream);
++
++enum signal_type dc_get_display_signal(
++ const struct dc_stream *stream);
++
++enum gpio_ddc_line dc_get_ddc_line(
++ const struct dc_stream *stream);
++
++
+ #endif /* DC_INTERFACE_H_ */
+--
+2.7.4
+