From 52056ce1ddec96343b8079014d0ae15f2c0d903a Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 12 Jul 2024 03:58:08 +0000 Subject: [PATCH] drm/amd/display: Skip finding free audio for unknown engine_id From Alex Hung 95ad20ee3c4efbb91f9a4ab08e070aa3697f5879 in linux-6.6.y/6.6.39 1357b2165d9ad94faa4c4a20d5e2ce29c2ff29c3 in mainline linux --- sys/dev/pci/drm/amd/display/dc/core/dc_resource.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c index efdd9b134af..d0df3605231 100644 --- a/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c +++ b/sys/dev/pci/drm/amd/display/dc/core/dc_resource.c @@ -2385,6 +2385,9 @@ static struct audio *find_first_free_audio( { int i, available_audio_count; + if (id == ENGINE_ID_UNKNOWN) + return NULL; + available_audio_count = pool->audio_count; for (i = 0; i < available_audio_count; i++) { -- 2.20.1