aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0810-drm-amd-dal-allow-non-audio-DP-HDMI-light-up.patch
blob: 39555ccf6373e72f0d5aff81b20d0e37de611747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 274b66f7447b467234f35ee71045ed38d4b58858 Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Thu, 18 Feb 2016 06:05:09 -0500
Subject: [PATCH 0810/1110] drm/amd/dal: allow non-audio DP/HDMI light-up

In case asic has less audio endpoints available
then pipes, display still should be available to
light-up

Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/dc/core/dc_resource.c | 12 ++++++++----
 drivers/gpu/drm/amd/dal/dc/inc/core_status.h  |  1 -
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
index 80fb823..5d9095e 100644
--- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
@@ -838,10 +838,14 @@ enum dc_status map_resources(
 				pipe_ctx->audio = find_first_free_audio(
 						&context->res_ctx);
 
-				if (!pipe_ctx->audio)
-					return DC_NO_STREAM_AUDIO_RESOURCE;
-
-				set_audio_in_use(&context->res_ctx,
+				/*
+				 * Audio assigned in order first come first get.
+				 * There are asics which has number of audio
+				 * resources less then number of pipes
+				 */
+				if (pipe_ctx->audio)
+					set_audio_in_use(
+						&context->res_ctx,
 						pipe_ctx->audio);
 			}
 		}
diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_status.h b/drivers/gpu/drm/amd/dal/dc/inc/core_status.h
index 9682cf8..b395ae5 100644
--- a/drivers/gpu/drm/amd/dal/dc/inc/core_status.h
+++ b/drivers/gpu/drm/amd/dal/dc/inc/core_status.h
@@ -31,7 +31,6 @@ enum dc_status {
 
 	DC_NO_CONTROLLER_RESOURCE,
 	DC_NO_STREAM_ENG_RESOURCE,
-	DC_NO_STREAM_AUDIO_RESOURCE,
 	DC_NO_CLOCK_SOURCE_RESOURCE,
 	DC_FAIL_CONTROLLER_VALIDATE,
 	DC_FAIL_ENC_VALIDATE,
-- 
2.7.4