aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch
diff options
context:
space:
mode:
authorArsalan H. Awan <Arsalan_Awan@mentor.com>2019-08-28 14:52:21 +0500
committerArsalan H. Awan <Arsalan_Awan@mentor.com>2019-08-28 15:24:40 +0500
commitcc5953c3a2f348543ed44492244627ee0de76239 (patch)
tree23430cd57f73086e7176e8be4375e5ad3b4079c0 /meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch
parent4149413febf799293758015e230e0ce865ed9cb5 (diff)
downloadmeta-amd-cc5953c3a2f348543ed44492244627ee0de76239.tar.gz
meta-amd-cc5953c3a2f348543ed44492244627ee0de76239.tar.bz2
meta-amd-cc5953c3a2f348543ed44492244627ee0de76239.zip
common: rename to meta-amd-bsp
This renames common layers to meta-amd-bsp as it is going to hold all the bsps in it in the following commits. This also changes the layer title in layer.conf from "amd" to "amd-bsp" Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch
new file mode 100644
index 00000000..63fda12d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/0054-drm-amd-display-Fix-refcount-over-dc_sink.patch
@@ -0,0 +1,51 @@
+From 6f6a9132b79f55dd25cbcce208aaed806a20d7e5 Mon Sep 17 00:00:00 2001
+From: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Date: Wed, 7 Dec 2016 14:10:05 -0500
+Subject: [PATCH 0054/4131] drm/amd/display: Fix refcount over dc_sink.
+
+Retain a dc_sink pointer until a new physical pointer
+arrives in case of new display connected.
+
+Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Reviewed-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+index 88c32c1..2f13465 100644
+--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
++++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+@@ -737,9 +737,17 @@ void amdgpu_dm_update_connector_after_detect(
+ mutex_lock(&dev->mode_config.mutex);
+
+ if (sink) {
+- if (aconnector->dc_sink)
++ if (aconnector->dc_sink) {
+ amdgpu_dm_remove_sink_from_freesync_module(
+ connector);
++ /* retain and release bellow are used for
++ * bump up refcount for sink because the link don't point
++ * to it anymore after disconnect so on next crtc to connector
++ * reshuffle by UMD we will get into unwanted dc_sink release
++ */
++ if (aconnector->dc_sink != aconnector->dc_em_sink)
++ dc_sink_release(aconnector->dc_sink);
++ }
+ aconnector->dc_sink = sink;
+ amdgpu_dm_add_sink_to_freesync_module(
+ connector, aconnector->edid);
+@@ -747,6 +755,8 @@ void amdgpu_dm_update_connector_after_detect(
+ amdgpu_dm_remove_sink_from_freesync_module(connector);
+ if (!aconnector->dc_sink)
+ aconnector->dc_sink = aconnector->dc_em_sink;
++ else if (aconnector->dc_sink != aconnector->dc_em_sink)
++ dc_sink_retain(aconnector->dc_sink);
+ }
+
+ mutex_unlock(&dev->mode_config.mutex);
+--
+2.7.4
+