aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch
new file mode 100644
index 00000000..90007717
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2366-drm-amd-display-Fix-context-alloc-failed-logging.patch
@@ -0,0 +1,49 @@
+From b4e12014589b4f7393a5371c76e917ace29f7cfb Mon Sep 17 00:00:00 2001
+From: Andrew Jiang <Andrew.Jiang@amd.com>
+Date: Fri, 1 Sep 2017 16:03:16 -0400
+Subject: [PATCH 2366/4131] drm/amd/display: Fix context alloc failed logging
+
+Since there was no return statement in the fail block immediately
+preceding the context_alloc_fail block, any failure within the
+function caused a context alloc failed error message to be printed.
+Since the context_alloc_fail block is only used once, move it to
+where the goto is directly and accompany it with a return statement.
+
+Signed-off-by: Andrew Jiang <Andrew.Jiang@amd.com>
+Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
+Acked-by: Harry Wentland <Harry.Wentland@amd.com>
+Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
+---
+ drivers/gpu/drm/amd/display/dc/core/dc.c | 9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
+index 66857b6..4dbf749 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
+@@ -1270,8 +1270,10 @@ void dc_update_planes_and_stream(struct dc *dc,
+
+ /* initialize scratch memory for building context */
+ context = dm_alloc(sizeof(*context));
+- if (context == NULL)
+- goto context_alloc_fail;
++ if (context == NULL) {
++ DC_ERROR("Failed to allocate new validate context!\n");
++ return;
++ }
+
+ atomic_inc(&context->ref_count);
+
+@@ -1527,9 +1529,6 @@ void dc_update_planes_and_stream(struct dc *dc,
+
+ fail:
+ dc_release_state(context);
+-
+-context_alloc_fail:
+- DC_ERROR("Failed to allocate new validate context!\n");
+ }
+
+ uint8_t dc_get_current_stream_count(struct dc *dc)
+--
+2.7.4
+