]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/powerplay: Fix code error for translating int type to bool type correctly
authorChengming Gui <Jack.Gui@amd.com>
Tue, 21 May 2019 07:57:21 +0000 (15:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:25:56 +0000 (12:25 -0500)
Fix code error to support value < 0 or > 1.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <hawking.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

index 3a47130f81500592456f2cb430cc8c0b57fe9a2e..d5f03b9625396a5f13d0f55f8652edbbd129b192 100644 (file)
@@ -348,7 +348,7 @@ static int smu_early_init(void *handle)
        struct smu_context *smu = &adev->smu;
 
        smu->adev = adev;
-       smu->pm_enabled = amdgpu_dpm;
+       smu->pm_enabled = !!amdgpu_dpm;
        mutex_init(&smu->mutex);
 
        return smu_set_funcs(adev);