Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp444938pxb; Thu, 9 Sep 2021 04:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxTxuyRw3SnB2cIuhDjUvsntJHYbJ1jqAiDa7ExreDusMxu+5rO7mTQd0nTUOhIBFVEthe X-Received: by 2002:a05:6638:5b5:: with SMTP id b21mr2382918jar.109.1631187941222; Thu, 09 Sep 2021 04:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187941; cv=none; d=google.com; s=arc-20160816; b=cUATRWPx/PQg7erOFC9+X+0+G57z8W4qTxgYNjcg/njG7ArCrITGpg0FHJVpMreCi6 3gj2aLtBEw08ld0URXgO8DwvTr0TccL+0g4jjML4W/GlID9gMMXrxEPcRMRYQV0TBm8n EBgzyWQ8ehfZ2E5JBtlf+XJaHKEolPzWscqqS+OJrKz6qcshdCFIqnkNxb/2wBAxHdEa F0ZGiwCIL0jhaT6wQdPCMqGbvGJx6Ix0UGyy8yBV+5Llw+b3PwvMBWxIHdsAwNiu+okd SS0C2sq9dhBHfVp4h8pg4pzdqoqekwXnXg46l/eipBGZ2FkRJymXEPl6arCPa2rUNUZo 9qbg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pmvcdbRz30STdyUOAqyLAQpZ7u1hgQZtkkuGLLHyK4s=; b=K8862ay9JnhhUfFwhdzhILd77Gwh29ZBj0zt5FOOCT5esZR8T+Zbg1Q6ld7LDORh3b F+jtsl4me9bVvAxfZwGaIeFRDM8r0dCR00hsZCsgsdRbdS1CDrddLng4ZTgghKSZYxcH O7z6x9G3K7+RO3WQnrtMkIkDM12GGO2C2TW3Dq2DIRvo3sNY7+WsHQnkkzy11gkNXq02 Ld0gZgipNJBC6q8vfr162hLomONiParqBZ/46sNFmggxlWe913502zUzvDupZWWny/Yx gWnGyCGTwZsTKUJhwXDcaSDPrF8KJc71xa3yyvcaVsYkl2z2MrJ0+pxe/xOFuobXCViH +MsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BUb2NKu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si1503121ioo.36.2021.09.09.04.45.29; Thu, 09 Sep 2021 04:45:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BUb2NKu5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240445AbhIILpw (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:46150 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238789AbhIILns (ORCPT ); Thu, 9 Sep 2021 07:43:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 20DD761100; Thu, 9 Sep 2021 11:42:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187734; bh=uDKUJYqqIqQdZRhp/mjQ+sG7ZBn9+fzahbqiKun/kV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BUb2NKu5cgiJoO75FNgDqU9WtHUCLLPGcbw8wKXx4TsOIeNJaouw4AYIONfQictLq MYjbafevJzokRviSDKoJNP8fKqo9YSIDM8SWaP1xE+8DGO1jvFL0HXIN83j2qnJhxa FEI459ETxxsKidfVFYLfJPxyoTs/Ngkvzk84EShankcr0T3nfEuJxZPUUGpLz1hdTG csN3jJhGO0rtwTQvxL3If7dOCnPB8pQCn8vjGVXiaZa/EgzQ/oxImPBTQVfbDtnnVS s5a2JcH67R+OJ48A/LRMCtI0UGTCVaF4Yunh5Mk6ggR/ZwZdBMm4LSn3+SFf9IMeci 2jS+l9UsrAzEw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ezequiel Garcia , Nicolas Dufresne , Alex Bee , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [PATCH AUTOSEL 5.14 053/252] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Date: Thu, 9 Sep 2021 07:37:47 -0400 Message-Id: <20210909114106.141462-53-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ezequiel Garcia [ Upstream commit 6ad61a7847da09b6261824accb539d05bcdfef65 ] When the VP8 decoders can't find a reference frame, the driver falls back to the current output frame. This will probably produce some undesirable results, leading to frame corruption, but shouldn't cause noisy warnings. Signed-off-by: Ezequiel Garcia Acked-by: Nicolas Dufresne Tested-by: Alex Bee Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/hantro/hantro_g1_vp8_dec.c | 13 ++++++++++--- .../staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c | 13 ++++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c index 96622a7f8279..2afd5996d75f 100644 --- a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c +++ b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c @@ -376,12 +376,17 @@ static void cfg_ref(struct hantro_ctx *ctx, vb2_dst = hantro_get_dst_buf(ctx); ref = hantro_get_ref(ctx, hdr->last_frame_ts); - if (!ref) + if (!ref) { + vpu_debug(0, "failed to find last frame ts=%llu\n", + hdr->last_frame_ts); ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); + } vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0)); ref = hantro_get_ref(ctx, hdr->golden_frame_ts); - WARN_ON(!ref && hdr->golden_frame_ts); + if (!ref && hdr->golden_frame_ts) + vpu_debug(0, "failed to find golden frame ts=%llu\n", + hdr->golden_frame_ts); if (!ref) ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN) @@ -389,7 +394,9 @@ static void cfg_ref(struct hantro_ctx *ctx, vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(4)); ref = hantro_get_ref(ctx, hdr->alt_frame_ts); - WARN_ON(!ref && hdr->alt_frame_ts); + if (!ref && hdr->alt_frame_ts) + vpu_debug(0, "failed to find alt frame ts=%llu\n", + hdr->alt_frame_ts); if (!ref) ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT) diff --git a/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c b/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c index 951b55f58a61..704607511b57 100644 --- a/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c +++ b/drivers/staging/media/hantro/rockchip_vpu2_hw_vp8_dec.c @@ -453,12 +453,17 @@ static void cfg_ref(struct hantro_ctx *ctx, vb2_dst = hantro_get_dst_buf(ctx); ref = hantro_get_ref(ctx, hdr->last_frame_ts); - if (!ref) + if (!ref) { + vpu_debug(0, "failed to find last frame ts=%llu\n", + hdr->last_frame_ts); ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); + } vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF0); ref = hantro_get_ref(ctx, hdr->golden_frame_ts); - WARN_ON(!ref && hdr->golden_frame_ts); + if (!ref && hdr->golden_frame_ts) + vpu_debug(0, "failed to find golden frame ts=%llu\n", + hdr->golden_frame_ts); if (!ref) ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN) @@ -466,7 +471,9 @@ static void cfg_ref(struct hantro_ctx *ctx, vdpu_write_relaxed(vpu, ref, VDPU_REG_VP8_ADDR_REF2_5(2)); ref = hantro_get_ref(ctx, hdr->alt_frame_ts); - WARN_ON(!ref && hdr->alt_frame_ts); + if (!ref && hdr->alt_frame_ts) + vpu_debug(0, "failed to find alt frame ts=%llu\n", + hdr->alt_frame_ts); if (!ref) ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT) -- 2.30.2