aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch
new file mode 100644
index 00000000..39558b54
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2542-drm-amd-display-Handle-case-when-stream-not-found-in.patch
@@ -0,0 +1,45 @@
+From c6312be56219539fed7964b5ffd39830b0358e62 Mon Sep 17 00:00:00 2001
+From: Eric Yang <Eric.Yang2@amd.com>
+Date: Tue, 3 Oct 2017 18:15:51 -0400
+Subject: [PATCH 2542/4131] drm/amd/display: Handle case when stream not found
+ in set_dpms
+
+When validate with context fail to add stream to the context, we have
+a case where set_dpms won't be able to find the stream that need to
+be disabled.
+
+Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index a17525a..838ee07 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -363,7 +363,7 @@ void set_dpms(
+ struct dc_stream_state *stream,
+ bool dpms_off)
+ {
+- struct pipe_ctx *pipe_ctx;
++ struct pipe_ctx *pipe_ctx = NULL;
+ int i;
+
+ for (i = 0; i < MAX_PIPES; i++) {
+@@ -373,6 +373,11 @@ void set_dpms(
+ }
+ }
+
++ if (!pipe_ctx) {
++ ASSERT(0);
++ return;
++ }
++
+ if (stream->dpms_off != dpms_off) {
+ stream->dpms_off = dpms_off;
+ if (dpms_off)
+--
+2.7.4
+