aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch
new file mode 100644
index 00000000..a0389e5a
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.14.71/4938-drm-amd-display-Fix-new-stream-count-check-in-dc_add.patch
@@ -0,0 +1,42 @@
+From ece8913e70ed65b76da811c642071c83b1aae99b Mon Sep 17 00:00:00 2001
+From: Ken Chalmers <ken.chalmers@amd.com>
+Date: Wed, 27 Jun 2018 12:48:21 -0400
+Subject: [PATCH 4938/5725] drm/amd/display: Fix new stream count check in
+ dc_add_stream_to_ctx
+
+[Why]
+The previous code could allow through attempts to enable more streams
+than there are timing generators, in designs where the number of pipes
+is greater than the number of timing generators.
+
+[How]
+Compare the new stream count to the resource pool's timing generator
+count, instead of its pipe count. Also correct a typo in the error
+message.
+
+Signed-off-by: Ken Chalmers <ken.chalmers@amd.com>
+Reviewed-by: Charlene Liu <Charlene.Liu@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_resource.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+index c4c7e00..417d2bf 100644
+--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+@@ -1707,8 +1707,8 @@ enum dc_status dc_add_stream_to_ctx(
+ struct dc_context *dc_ctx = dc->ctx;
+ enum dc_status res;
+
+- if (new_ctx->stream_count >= dc->res_pool->pipe_count) {
+- DC_ERROR("Max streams reached, can add stream %p !\n", stream);
++ if (new_ctx->stream_count >= dc->res_pool->timing_generator_count) {
++ DC_ERROR("Max streams reached, can't add stream %p !\n", stream);
+ return DC_ERROR_UNEXPECTED;
+ }
+
+--
+2.7.4
+