Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1810314pxb; Thu, 16 Sep 2021 16:34:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo6xCxal0eZHQL5axfgFdRSX7Pygh/CLhwhb0Q4LFiHsfi8FKEzdIAbaJILx4o//t/eFT2 X-Received: by 2002:a02:a46:: with SMTP id 67mr6281687jaw.142.1631835260008; Thu, 16 Sep 2021 16:34:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631835260; cv=none; d=google.com; s=arc-20160816; b=zt3zBgldr8r1t1LRI3AAmkkG5zBvDYDVrimYcDktxfPQP9mm80xfReSzLV6qskiMZR tOb6gOHnl5qsaY4J1PAjEMjzEi5AlfJihN4dQySBb329G3Ygwr6wZLhEITIAinsX3q9g A3hLBv9/evxDu3wA5T7B2N6sp9v1pxEuWoyGbBJnhuGz/FbsNuh5icrUpDoJwzFftEQE fjUdsCCtD8xqOdkwflukWjgoGQE5QcvvNjakcoBA87zMlGWw8RUqY7wSmjNOkEoIsffy P1rI+2CLT6YeyIUA989hLdWjDjKqB7qqOZ4qxJtsQe+lgSjqoE088pYAf9B30vokyft1 NDrA== 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=4gDJz//013VVaG6PmpH/8/VIdURnrcJDmG6vKpXvW74=; b=yR1/hR6irQqvVYsuBu0gRhypmUc3dOk9jcGt1YOfTEagZITKwLLsexzkiLobmhaaPR xfXVk2QxpwwzreYofi37oROUPPTMQe5RTBsE0JQlZ78g14UlHnkGaN5+EtaUKqkD1Zo8 m2WL2xYrKXrpQJxC9MhHk9OjxHLvgn4RzNFsYx3O1rLlygPWUROgjOFe0zTUaFoYRa4b dPPL+Eq5p/fdibbEdSDHy0/Wf5+7y7JToAvB1XsPX0D4A0wpovswU1czUQ8TvG2b5U+l M6wD8Sr9cDMnrGTyEh/aSlQudk07FeX2u0mIY0qgUxhhevnG/TeoPzo3fNzyN3CxFyRo kI4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qxgoQ2+f; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w16si4855595iol.0.2021.09.16.16.34.05; Thu, 16 Sep 2021 16:34:19 -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=@linuxfoundation.org header.s=korg header.b=qxgoQ2+f; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239193AbhIPQvX (ORCPT + 99 others); Thu, 16 Sep 2021 12:51:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:57628 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245458AbhIPQqu (ORCPT ); Thu, 16 Sep 2021 12:46:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 392D760FC0; Thu, 16 Sep 2021 16:26:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631809604; bh=Y9yifLqTMAhtK6J/aU0Oho44D67037QoREffN/4CvcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qxgoQ2+fyqV+8DJ0E837ZV0gWjm1VLBxfp5MqC+Ha0P/x9KusXaM3s3nklwMdGGd/ TkskEnE0liZ5U+rgquzRs2npWvzUaKKwKET5LiMrQVwbSm+Rxy3l7hppofZvmjjqP1 XO6Bo88nFZnR+X0iXq8e9j2qeyy9m1otqtqpSeXU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ezequiel Garcia , Nicolas Dufresne , Alex Bee , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.13 183/380] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Date: Thu, 16 Sep 2021 17:59:00 +0200 Message-Id: <20210916155810.299383942@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155803.966362085@linuxfoundation.org> References: <20210916155803.966362085@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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/rk3399_vpu_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 57002ba70176..3cd90637ac63 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/rk3399_vpu_hw_vp8_dec.c b/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c index 8661a3cc1e6b..361619201605 100644 --- a/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c +++ b/drivers/staging/media/hantro/rk3399_vpu_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