]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd/display: Pass errors from amdgpu_dm_init() up
authorMario Limonciello <mario.limonciello@amd.com>
Sun, 19 May 2024 13:02:23 +0000 (08:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 23 May 2024 19:13:54 +0000 (15:13 -0400)
Errors in amdgpu_dm_init() are silently ignored and dm_hw_init()
will succeed. However often these are fatal errors and it would
be better to pass them up.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

index 1e263b357c1332e14c9450df576a5fd9f755473a..975feb1c69b8510181b12fc0185e0bb4b266339c 100644 (file)
@@ -2594,8 +2594,12 @@ static int amdgpu_dm_smu_write_watermarks_table(struct amdgpu_device *adev)
 static int dm_hw_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+       int r;
+
        /* Create DAL display manager */
-       amdgpu_dm_init(adev);
+       r = amdgpu_dm_init(adev);
+       if (r)
+               return r;
        amdgpu_dm_hpd_init(adev);
 
        return 0;