]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amd: Drop unnecessary check in amdgpu_connector_add_common_modes()
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 24 Sep 2025 16:16:21 +0000 (11:16 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 25 Sep 2025 19:50:58 +0000 (15:50 -0400)
[Why]
amdgpu_connector_add_common_modes() has a check for the width and height
of common modes being too small, but the array of common_modes[] has fixed
values.  The check is dead code.

[How]
Drop unnecessary check.

Cc: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://lore.kernel.org/r/20250924161624.1975819-3-mario.limonciello@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c

index bf38fc69c1cfb3fa42292bbe93ded8cc58588698..9b915f11ccacdfacc88c05c74fc92ba4c89f1663 100644 (file)
@@ -434,8 +434,6 @@ static void amdgpu_connector_add_common_modes(struct drm_encoder *encoder,
                             common_modes[i].h == native_mode->vdisplay))
                                continue;
                }
-               if (common_modes[i].w < 320 || common_modes[i].h < 200)
-                       continue;
 
                mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
                if (!mode)