drm/amd/powerplay: fix logic error.
authorRex Zhu <Rex.Zhu@amd.com>
Fri, 17 Jun 2016 10:21:01 +0000 (18:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 21 Jun 2016 14:22:29 +0000 (10:22 -0400)
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>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c

index fa208ad..efb77ed 100644 (file)
@@ -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)