summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-06-17 18:21:01 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-27 08:42:19 -0700
commit2bd21542f31fb3ab1c2155634e9e7002dedbdcfa (patch)
tree248a8b2861365165f05101a3800ef16706d330c7 /drivers
parent02cfc0e22d35a28a7b4148ba9047f096c4f0a659 (diff)
downloadlinux-stable-2bd21542f31fb3ab1c2155634e9e7002dedbdcfa.tar.gz
linux-stable-2bd21542f31fb3ab1c2155634e9e7002dedbdcfa.tar.bz2
linux-stable-2bd21542f31fb3ab1c2155634e9e7002dedbdcfa.zip
drm/amd/powerplay: fix logic error.
commit 1d7b84d12af8312b52316029f1fa0fa4eac3c9e4 upstream. the error lead powerplay can't get display info in DGPU case. store_cc6_data just implement in APU. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
index fa208ada6892..efb77eda7508 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
@@ -306,10 +306,14 @@ int phm_store_dal_configuration_data(struct pp_hwmgr *hwmgr,
{
PHM_FUNC_CHECK(hwmgr);
- if (hwmgr->hwmgr_func->store_cc6_data == NULL)
+ if (display_config == NULL)
return -EINVAL;
hwmgr->display_config = *display_config;
+
+ if (hwmgr->hwmgr_func->store_cc6_data == NULL)
+ return -EINVAL;
+
/* to do pass other display configuration in furture */
if (hwmgr->hwmgr_func->store_cc6_data)