aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
diff options
context:
space:
mode:
authorKuan-Wei Chiu <[email protected]>2025-01-28 16:54:15 +0000
committerTakashi Iwai <[email protected]>2025-01-28 17:02:31 +0000
commit3b4309546b48fc167aa615a2d881a09c0a97971f (patch)
tree194991bcfa7066f03e56d8465ae3684839ecd4d5 /drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
parentALSA: pcm: use new array-copying-wrapper (diff)
downloadkernel-3b4309546b48fc167aa615a2d881a09c0a97971f.tar.gz
kernel-3b4309546b48fc167aa615a2d881a09c0a97971f.zip
ALSA: hda: Fix headset detection failure due to unstable sort
The auto_parser assumed sort() was stable, but the kernel's sort() uses heapsort, which has never been stable. After commit 0e02ca29a563 ("lib/sort: optimize heapsort with double-pop variation"), the order of equal elements changed, causing the headset to fail to work. Fix the issue by recording the original order of elements before sorting and using it as a tiebreaker for equal elements in the comparison function. Fixes: b9030a005d58 ("ALSA: hda - Use standard sort function in hda_auto_parser.c") Reported-by: Austrum <[email protected]> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219158 Tested-by: Austrum <[email protected]> Cc: [email protected] Signed-off-by: Kuan-Wei Chiu <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c')
0 files changed, 0 insertions, 0 deletions