aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/2429-amdgpu-dc-make-some-audio-functions-return-void.patch
blob: 9625e0813206d22f8ec099dbd729556919d017c7 (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
55
56
57
58
59
60
61
62
63
64
65
66
From 61f6339004dd5186e7439f8d5c00e4189b1c048e Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 29 Sep 2017 14:34:36 +1000
Subject: [PATCH 2429/4131] amdgpu/dc: make some audio functions return void

There is no need to check for these pointers being valid
at this level. Check earlier if required.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
index 198f453..6e94028 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
@@ -703,14 +703,11 @@ void dce_aud_az_configure(
 */
 
 /* search pixel clock value for Azalia HDMI Audio */
-static bool get_azalia_clock_info_hdmi(
+static void get_azalia_clock_info_hdmi(
 	uint32_t crtc_pixel_clock_in_khz,
 	uint32_t actual_pixel_clock_in_khz,
 	struct azalia_clock_info *azalia_clock_info)
 {
-	if (azalia_clock_info == NULL)
-		return false;
-
 	/* audio_dto_phase= 24 * 10,000;
 	 *   24MHz in [100Hz] units */
 	azalia_clock_info->audio_dto_phase =
@@ -720,18 +717,13 @@ static bool get_azalia_clock_info_hdmi(
 	 *  [khz] -> [100Hz] */
 	azalia_clock_info->audio_dto_module =
 			actual_pixel_clock_in_khz * 10;
-
-	return true;
 }
 
-static bool get_azalia_clock_info_dp(
+static void get_azalia_clock_info_dp(
 	uint32_t requested_pixel_clock_in_khz,
 	const struct audio_pll_info *pll_info,
 	struct azalia_clock_info *azalia_clock_info)
 {
-	if (pll_info == NULL || azalia_clock_info == NULL)
-		return false;
-
 	/* Reported dpDtoSourceClockInkhz value for
 	 * DCE8 already adjusted for SS, do not need any
 	 * adjustment here anymore
@@ -745,8 +737,6 @@ static bool get_azalia_clock_info_dp(
 	 *  [khz] ->[100Hz] */
 	azalia_clock_info->audio_dto_module =
 		pll_info->dp_dto_source_clock_in_khz * 10;
-
-	return true;
 }
 
 void dce_aud_wall_dto_setup(
-- 
2.7.4