linux/drivers/gpu/drm/amd/display/amdgpu_dm/tests
Adrian Betschart 54c998c55f drm/amd/display: Don't replace a sink mode that shares the native totals
decide_crtc_timing_for_drm_display_mode() copies the native mode's CRTC
timing into the requested mode when clock, htotal and vtotal match.
That is meant for the modes amdgpu inserts itself:
amdgpu_dm_create_common_mode() duplicates the native mode and changes
only hdisplay and vdisplay, so those are sent with the native timing
and scaled.

A sink can also offer a real mode with the same clock and totals as
its native mode. CTA-861 VIC 102 (4096x2160@60) and VIC 97
(3840x2160@60) both use 594 MHz and 4400x2250. With 3840x2160@60 as
the preferred mode, a 4096x2160@60 request goes out with the 3840x2160
timing and the framebuffer scaled into it (dst 3840x2025 at y=67),
while the AVI InfoFrame still carries VIC 102. A JVC projector then
reports 3840x2160 and shows a corrupted right edge. 4096x2160@24,
whose totals differ, is sent and displayed correctly.

Inserted modes keep the native sync positions; a real mode with its
own active width does not. Compare those too, so only inserted modes
are patched.

Fixes: 4562236b3b ("drm/amd/dc: Add dc display driver (v2)")
Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch>
Assisted-by: Claude-Code:claude-opus-5-5
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Reviewed-by: Roman Li <roman.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 22f9a2da101c37f821cd00954f81dc598754f4d5)
Cc: stable@vger.kernel.org
2026-10-07 13:13:32 -04:00
..
.kunitconfig drm/amd/amdgpu: Fix stack frame size warnings in KUnit tests 2026-07-01 11:39:05 -04:00
amdgpu_dm_audio_test.c drm/amd/display: add KUnit tests for audio commit path 2026-07-28 19:17:30 -04:00
amdgpu_dm_backlight_test.c drm/amd/display: Add KUnit test for native backlight registration 2026-07-28 19:17:30 -04:00
amdgpu_dm_color_test.c drm/amd/display: Add colorop LUT programming tests 2026-07-28 19:17:30 -04:00
amdgpu_dm_colorop_test.c drm/amd/display: Extract shared KUnit test helpers 2026-07-01 11:38:14 -04:00
amdgpu_dm_connector_test.c drm/amd/display: Don't replace a sink mode that shares the native totals 2026-10-07 13:13:32 -04:00
amdgpu_dm_crc_test.c drm/amd/display: add CRC IRQ handler KUnit coverage 2026-07-28 18:34:38 -04:00
amdgpu_dm_crtc_test.c drm/amd/display: Atomize IRQ register read/modify/write ops 2026-09-17 11:52:06 -04:00
amdgpu_dm_cursor_test.c drm/amd/display: add cursor module 2026-07-28 19:17:30 -04:00
amdgpu_dm_dmub_test.c drm/amd/display: add VBIOS bounding box KUnit test 2026-07-28 18:32:05 -04:00
amdgpu_dm_freesync_test.c drm/amd/display: add FreeSync/VRR module 2026-07-28 19:17:30 -04:00
amdgpu_dm_hdcp_test.c drm/amd/display: Add deeper event_property_update tests 2026-07-28 19:17:31 -04:00
amdgpu_dm_helpers_test.c drm/amd/display: Atomize IRQ register read/modify/write ops 2026-09-17 11:52:06 -04:00
amdgpu_dm_irq_test.c drm/amd/display: Atomize IRQ register read/modify/write ops 2026-09-17 11:52:06 -04:00
amdgpu_dm_ism_test.c drm/amd/display: Add KUnit tests for ism 2026-07-14 19:12:35 -04:00
amdgpu_dm_kunit_helpers.c drm/amd/display: Add idle worker tests for crtc 2026-08-06 09:58:54 -04:00
amdgpu_dm_kunit_test_helpers.h drm/amd/display: Add idle worker tests for crtc 2026-08-06 09:58:54 -04:00
amdgpu_dm_mst_types_test.c drm/amd/display: Test MST coverage gaps 2026-07-15 09:15:39 -04:00
amdgpu_dm_plane_test.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
amdgpu_dm_pp_smu_test.c drm/amd/display: move watermarks table to pp_smu 2026-07-28 19:17:29 -04:00
amdgpu_dm_psr_test.c drm/amd/display: share common DM KUnit helpers 2026-07-28 18:57:47 -04:00
amdgpu_dm_quirks_test.c drm/amd/display: move stutter quirk to quirks file 2026-07-28 19:17:29 -04:00
amdgpu_dm_replay_test.c drm/amd/display: Extract shared KUnit test helpers 2026-07-01 11:38:14 -04:00
amdgpu_dm_services_test.c drm/amd/display: Add KUnit tests for amdgpu_dm_services 2026-06-17 16:16:33 -04:00
amdgpu_dm_test.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
amdgpu_dm_wb_test.c drm/amd/display: Fix use-after-free bugs in KUnit tests 2026-07-28 18:57:51 -04:00
Makefile drm/amd/display: Remove duplicate in tests/Makefile 2026-08-06 09:54:48 -04:00