]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.6.5/drm-amd-powerplay-fix-logic-error.patch
Linux 4.6.5
[thirdparty/kernel/stable-queue.git] / releases / 4.6.5 / drm-amd-powerplay-fix-logic-error.patch
1 From 1d7b84d12af8312b52316029f1fa0fa4eac3c9e4 Mon Sep 17 00:00:00 2001
2 From: Rex Zhu <Rex.Zhu@amd.com>
3 Date: Fri, 17 Jun 2016 18:21:01 +0800
4 Subject: drm/amd/powerplay: fix logic error.
5
6 From: Rex Zhu <Rex.Zhu@amd.com>
7
8 commit 1d7b84d12af8312b52316029f1fa0fa4eac3c9e4 upstream.
9
10 the error lead powerplay can't get display info in DGPU case.
11 store_cc6_data just implement in APU.
12
13 Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
14 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
15 Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++++-
20 1 file changed, 5 insertions(+), 1 deletion(-)
21
22 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
23 +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
24 @@ -306,10 +306,14 @@ int phm_store_dal_configuration_data(str
25 {
26 PHM_FUNC_CHECK(hwmgr);
27
28 - if (hwmgr->hwmgr_func->store_cc6_data == NULL)
29 + if (display_config == NULL)
30 return -EINVAL;
31
32 hwmgr->display_config = *display_config;
33 +
34 + if (hwmgr->hwmgr_func->store_cc6_data == NULL)
35 + return -EINVAL;
36 +
37 /* to do pass other display configuration in furture */
38
39 if (hwmgr->hwmgr_func->store_cc6_data)