Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1063126ybl; Wed, 14 Aug 2019 10:07:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbmHyFPTBeDG0k+g51Pgtr74itWdINSrTIc78aKQ87Gcy1CNrY3RAOp0IeM5mhLLFP9g1L X-Received: by 2002:a17:90a:9b08:: with SMTP id f8mr693674pjp.103.1565802430890; Wed, 14 Aug 2019 10:07:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565802430; cv=none; d=google.com; s=arc-20160816; b=bkQtthajvW39qGuA2LzORw3DasQPS2q/iCg6lB4T7Vjk+3tUv4NYndZYt4BKDoYVEf U8bbyb6eI/O51Pv2rCTivvneALT3FnAgmMxCieW2kpQaUug7Mt+J7HTBSJsSthTbs7fv cVmJb3IOKMmEpXT6ZCxicDWaN4XqAjiOc8t1UsTeWpb2EQ5vxs5hjfi9hNkjK2sgPx0M gdf800jIMCbMe33Be7kWADtaMDvRDZe4yXV1jnrOyI9yRYi9z5IrJn4OSjdUFKSo85Ww HgXO5ewhIRab5cVyP0vSpByUyHvjU7pZQ3igGRpc3jmkibsty9UlfI4dFJbIB5kUkFXd uYqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L2mHI5Ho6VTRKh+eNwisjbOuFL3GuNzfE4bUwcZhPeI=; b=elyV1Rf9SdCYv92CPcfJkbwjbha0fS6fm/QvbPCfvHSueL1vxG6GglT17zb4j01o56 hdkPBkKTBRYH0ryHp5IFEuJcQF04dWj4UdBiSAkmt3Fc2JHy+36ViIwj39+NsP4W9cZ6 Qd0gXZrlxzBrbaifBLQktDM09BcQd7w63bspQ48rBIPgCDjwNLvwTraDb+HkQn/EBwRh 9pn0JobN+7JRdHsr56erS7lSqcSg5XijbxUnt2HYsRFUueWdNxBKx/ruBzstxVukmhqM 1El3lcwphXX+e8bLtSUq+paFfnrreYdS1toqGIP2mdmFludDXho4+AqAOf12YUkiCF5X FAAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tosbT3N1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j12si64316pfe.188.2019.08.14.10.06.54; Wed, 14 Aug 2019 10:07:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tosbT3N1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729349AbfHNRFC (ORCPT + 99 others); Wed, 14 Aug 2019 13:05:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:53878 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728561AbfHNRFA (ORCPT ); Wed, 14 Aug 2019 13:05:00 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17AB82084D; Wed, 14 Aug 2019 17:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802299; bh=gMyYvyHi4bzkfcwcBzPJRr8p4xBjXOE9TAdzrk2+zuE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tosbT3N1NXDB7d+irX0pMkkLn+mjjqhXLdmDTid2tuEx7zd2+ZRdNvoz6+5BNS9W2 WaANpKosQSQeG7vGn/bY8XZcE48tUkUO9r2ZrW/ewy8RnlufBXpJYhpqHq2SZxIidM WuvAbBEbuvr8CGXdsJXe5dXzNHs1sBz0Ts6XUyMU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alvin Lee , Jun Lei , Leo Li , Alex Deucher , Sasha Levin Subject: [PATCH 5.2 072/144] drm/amd/display: Only enable audio if speaker allocation exists Date: Wed, 14 Aug 2019 19:00:28 +0200 Message-Id: <20190814165802.868097698@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 6ac25e6d5b2fbf251e9fa2f4131d42c815b43867 ] [Why] In dm_helpers_parse_edid_caps, there is a corner case where no speakers can be allocated even though the audio mode count is greater than 0. Enabling audio when no speaker allocations exists can cause issues in the video stream. [How] Add a check to not enable audio unless one or more speaker allocations exist (since doing this can cause issues in the video stream). Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Leo Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index b2525ab8a95f6..b459ce056b609 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -2019,7 +2019,7 @@ enum dc_status resource_map_pool_resources( /* TODO: Add check if ASIC support and EDID audio */ if (!stream->converter_disable_audio && dc_is_audio_capable_signal(pipe_ctx->stream->signal) && - stream->audio_info.mode_count) { + stream->audio_info.mode_count && stream->audio_info.flags.all) { pipe_ctx->stream_res.audio = find_first_free_audio( &context->res_ctx, pool, pipe_ctx->stream_res.stream_enc->id); -- 2.20.1