Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1534452pxb; Thu, 16 Sep 2021 09:24:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxW856SNw+bnokySe4jbIlu2g6bvhM7tj0xiIvd0u1LuhDFvlPkOvUmQl57Y/oJ3SWkWjmb X-Received: by 2002:a17:906:2bdb:: with SMTP id n27mr7387408ejg.86.1631809455403; Thu, 16 Sep 2021 09:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631809455; cv=none; d=google.com; s=arc-20160816; b=ePSywwVxEz9gRctqNQHW0oo9SCsl+uPfKMqdWDpFL8NUajIQWmC5YRVvEYxUTN/u/b fZY2gNVTGZYO9cARzcLL7qKg/3nTVK7IT1L1Gk5/xNhuyGQbTov97H/GzGv63HjpLd81 MlCoJKNsrwhBdHj2GiCiZ2yogBflnQcJVZmtvSR6ydP64F5rF5ePRBwf7u13dZOsBMOa gWyGH6fxh32L8InTTJpZ99T0WwbdVKv0pJHn236nfVDcXGfcGEmmMLI6BVN1XLgDQJZD seIF/jTOLeOnnXFnsLP6r4k+yWE9HnGaSxOtQXgNr1OmyZMmcIiR2lHXBPMqQML1+4xd 3ywQ== 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=gEML1t9jjcDHz9VxBifwlW9TdayRQYtPBPddbZJV4r0=; b=bIons/A8ykR0folbfcAFLF6HjNynVHleVS8f3dcAIYLJkMPzZCx80A55SStbtP9uaA cUpZn2gnr2tGf7n4fZsPxdN5siLst5g5wfwC70jV7kyY6kkw0ASDmerO/nzdkcT6NQ6y BlP6gjYscLg8Z1XL4i+fjMLxzq5w9e68IYJ88kDXMpD2xsCI4P3XeHAWhEb+9CuknVgZ 7onOHweEN5sdv++uxCoAANZQnh0yqTSeM3PKmbuiweGFTB4RijS087e0EG6LCcRSe5dQ u6jlnPxyNm++7v6+ojZdH6/7gAWjCKigoxNhgVy3O1q12ApzvjArs79Exg7wTrDTsPlo 1lzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y9ZOJ3Ge; 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 i14si3911578eje.121.2021.09.16.09.23.47; Thu, 16 Sep 2021 09:24:15 -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=Y9ZOJ3Ge; 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 S239740AbhIPQXI (ORCPT + 99 others); Thu, 16 Sep 2021 12:23:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:55108 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240909AbhIPQOh (ORCPT ); Thu, 16 Sep 2021 12:14:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4D8E61241; Thu, 16 Sep 2021 16:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631808645; bh=L0rHw5ZGotj/gnqKYNSK1Xc/T0+CJetbfYu7bTcQweI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y9ZOJ3Geb5ApOFcL83E0541eleChKTO6uyEEPlUzhGtAehNPHKTCj0CXsrdnNJEyG dGvO2gDIhPeU3ikG7l2MdwSUYkt7kh774dHaRYG1hbmsICdF/I9J9naMbtIfgsNziB eUsIISjZjkTI5FIMhCXlQ9FiqDm4Fl4esinjpQ8o= 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.10 142/306] media: hantro: vp8: Move noisy WARN_ON to vpu_debug Date: Thu, 16 Sep 2021 17:58:07 +0200 Message-Id: <20210916155758.894154485@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155753.903069397@linuxfoundation.org> References: <20210916155753.903069397@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 a5cdf150cd16..d30bdc678cc2 100644 --- a/drivers/staging/media/hantro/hantro_g1_vp8_dec.c +++ b/drivers/staging/media/hantro/hantro_g1_vp8_dec.c @@ -377,12 +377,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_HEADER_FLAG_SIGN_BIAS_GOLDEN) @@ -390,7 +395,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_HEADER_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 a4a792f00b11..5b8c8fc49cce 100644 --- a/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c +++ b/drivers/staging/media/hantro/rk3399_vpu_hw_vp8_dec.c @@ -454,12 +454,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_HEADER_FLAG_SIGN_BIAS_GOLDEN) @@ -467,7 +472,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_HEADER_FLAG_SIGN_BIAS_ALT) -- 2.30.2