Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2883673rwb; Mon, 15 Aug 2022 13:15:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ie0MWMeZGftyvuTTfijJlqDen8vN60ArK9G/5iXoy15ds9pHUYrM1la+xe0RfMwMa17BC X-Received: by 2002:a17:90b:3d8:b0:1f4:d5c4:5d76 with SMTP id go24-20020a17090b03d800b001f4d5c45d76mr29772974pjb.219.1660594558035; Mon, 15 Aug 2022 13:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594558; cv=none; d=google.com; s=arc-20160816; b=AKXkSVrOXf/pzCqbI4gXEeeHXWBxjehbmcQuFyMcUGQf6ieIt0XoAGrgKhDdWyGjml 4Ys6Xq1pSCI7qUPhHT1FYso55H9NERZp6akrVEzFfD6qhwi4fB5AxctMl1wY8uRQhETX KjPBuWXeZuJjbagRkEhglcwWgxhAdlVgb1yMrwb/1ShPE5C72LOjTfSvwlR03wrmozZB w9zAnjbW1J6N7HKjp0JiauZgrq96ODNE/Ku03LcFFLR4ZmbDzPBQKuPOWm56YyUROeRC DQhZsKAdvdvCFFcIQtZMyqmRvXT8ibUEmStyCPXxMmfMLgu+0Uifet0qaltfK8X/1dPk +6BQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Tiie6RdTyWrEgxnqawNG21hlzdmoQ5U+IHGD+L04yxE=; b=QpAXxjzKGLp8Bt0FC2CX3m6726cfnVxLP8LgNWsrSAs7aNjHIyEKqnSWDuQFjhXwc6 pvOGAIZmshw/lwPDTWOfEJhd75AMCxFvSqGm/fWpXsx2j6qHlUPS8Tv4uwSldv2a4+pU /RrcZcByK8gV8zCSTV8sWTmdru/YeCRDylWr+qe8RSRWT0mzLi5Mcwr5OLS50scPZ5dI BBzwdA7l6qhQ/4c53Vo5zPjpQrzHejkuQeUa7JgxTuhrskpjfod/wSKZfXyFezM2o21l tbNpKtQpBujX1txwBcxuKBEwOuaiLaWWkhBddZ5NeFsYSeGtb0Cy801jYkKmUrq8ybD/ MDtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jCuZ2bQH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q23-20020a170902edd700b0016f12f2cb15si10401581plk.405.2022.08.15.13.15.46; Mon, 15 Aug 2022 13:15:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jCuZ2bQH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244382AbiHOSxh (ORCPT + 99 others); Mon, 15 Aug 2022 14:53:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244291AbiHOSur (ORCPT ); Mon, 15 Aug 2022 14:50:47 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA0B143E63; Mon, 15 Aug 2022 11:28:55 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 85E6C61024; Mon, 15 Aug 2022 18:28:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6F586C433D6; Mon, 15 Aug 2022 18:28:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660588133; bh=hdV8J5AyuQITJCxcJPRnfcmvqD7I0mHvRmOnQModVmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jCuZ2bQHLapVGuyH1wRsFpL4OYjpZosdy1myybw4JlNfVaEOZC/66o0kZUVTpCzsn HBYRRytL6FZRjq84ZvgMkzA05jzcvIwUlw0LIPeNPvRKetiO3hddMtQp3R8YjyrnP+ 4zqd0t1Ih9C2RHz5ALl9KTl71s8YuAW6uhVFLNZI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dom Cobley , Maxime Ripard , Sasha Levin Subject: [PATCH 5.15 306/779] drm/vc4: hdmi: Avoid full hdmi audio fifo writes Date: Mon, 15 Aug 2022 19:59:10 +0200 Message-Id: <20220815180350.370077660@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dom Cobley [ Upstream commit 1c594eeccf92368177c2e22f1d3ee4933dfb8567 ] We are getting occasional VC4_HD_MAI_CTL_ERRORF in HDMI_MAI_CTL which seem to correspond with audio dropouts. Reduce the threshold where we deassert DREQ to avoid the fifo overfilling Fixes: bb7d78568814 ("drm/vc4: Add HDMI audio support") Signed-off-by: Dom Cobley Link: https://lore.kernel.org/r/20220613144800.326124-21-maxime@cerno.tech Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index e4533fe315bf..879245808e26 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1383,10 +1383,10 @@ static int vc4_hdmi_audio_prepare(struct device *dev, void *data, /* Set the MAI threshold */ HDMI_WRITE(HDMI_MAI_THR, - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) | - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) | - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQHIGH) | - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQLOW)); + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICHIGH) | + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICLOW) | + VC4_SET_FIELD(0x06, VC4_HD_MAI_THR_DREQHIGH) | + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_DREQLOW)); HDMI_WRITE(HDMI_MAI_CONFIG, VC4_HDMI_MAI_CONFIG_BIT_REVERSE | -- 2.35.1