Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3916658rwe; Mon, 17 Apr 2023 05:37:57 -0700 (PDT) X-Google-Smtp-Source: AKy350YoItL2RHv9Kw5L/1Sn/kOyKGokZHErN0EDfQKi+lcf9BOSMiy7WOGWbEaEOmOUMrloq1AL X-Received: by 2002:a17:90a:6305:b0:246:f710:4f01 with SMTP id e5-20020a17090a630500b00246f7104f01mr14880033pjj.35.1681735077143; Mon, 17 Apr 2023 05:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681735077; cv=none; d=google.com; s=arc-20160816; b=NizcIpFZ6PTEsX15jWgEQw3pDK78ArrD0pzOuCB6M2qrjVrz3BcVuMqxc6mmoPgHXf gPC2N83hJVteXUCqj0Bjqkg1ePaugCm8mYn4wc7G9S1yoQMwu9TOYh33sRaf35HXymXa C9neKs8Vycxq3dt5MepAwKeFKydchr+LuOEQXPV/Zx6IZS661VPJFolStcuh/6dzbXc9 bkK4qIpFjtsJk6Th22KUiljfO3AKzJKr3NpFVxStqsIDI2nZI77HAfelvmnjeuXJ5gBK PvN8zswu4zlLc78wKeXC3I9CwbK5mZ8bSAE7MHYZEK3co5IP260zdTB0jQbT/HICt5/B aHrg== 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=ukMhkWCtDmJZ8yQDuI3rk4bT+xNS34ebWhAr3X45tw8=; b=DhtD4KuqWJZ3emfGHTKsGorkBiiy+rhAiUDG6sDlJry4eBZykG2MvoosuUOX6yVIjw FmitPs2ib/FR/g8hV7sw42fEDvRS6/vbmwL20c+yvf3hpB+J7vUu6MRdoAyGp1ApKGOy A+09eavIF+lk46P+9/wBw5yVc/PXuHBEh7Gmc3ceDzDLgekLHgg+/9/IjV5I3MptVEIc vCCxLGorLj+Sa45cRc9udorQZGguvuWVnxKClSP/YnRIV0ii3YW3ltWvi+QO5FpD3HZ3 qTAssJ5ymUb2H6lF9ooCG6+vgR5D7r+WreUwtqhJUbnhm0qd6KE4Q8ubvMsX4sBMHVrT 7Q+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=QGN63SJk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e1-20020a17090ada0100b0024719ce80e7si10976583pjv.105.2023.04.17.05.37.44; Mon, 17 Apr 2023 05:37:57 -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=@mediatek.com header.s=dk header.b=QGN63SJk; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbjDQMcU (ORCPT + 99 others); Mon, 17 Apr 2023 08:32:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230006AbjDQMcP (ORCPT ); Mon, 17 Apr 2023 08:32:15 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20C9110FA; Mon, 17 Apr 2023 05:32:01 -0700 (PDT) X-UUID: 527cd156dd1911edb6b9f13eb10bd0fe-20230417 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=ukMhkWCtDmJZ8yQDuI3rk4bT+xNS34ebWhAr3X45tw8=; b=QGN63SJkme9cWBaUi/ytMETic1qAquvdcfToh99H4ddd16VccDelD+Qhki5pE8nrZ8//9+96PhicGQ7Hp6JLFhwgek9gT3iam6DhQpthCK6Sp08bDES+K2moWsOQQqqFh/xLujn8KPnyyNk2m1KzREP19jFUsyM8hcJfgd7jphg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:ce134d57-11a5-4d78-98e8-d7abe53b2384,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:120426c,CLOUDID:d3223ceb-db6f-41fe-8b83-13fe7ed1ef52,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-CID-BAS: 0,_,0,_ X-UUID: 527cd156dd1911edb6b9f13eb10bd0fe-20230417 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 278086588; Mon, 17 Apr 2023 20:13:54 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n1.mediatek.inc (172.21.101.193) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Mon, 17 Apr 2023 20:13:53 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Mon, 17 Apr 2023 20:13:52 +0800 From: Yunfei Dong To: Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , =?UTF-8?q?N=C3=ADcolas=20F=20=2E=20R=20=2E=20A=20=2E=20Prado?= CC: Matthias Brugger , Yunfei Dong , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH v2,1/4] media: mediatek: vcodec: Avoid unneeded error logging Date: Mon, 17 Apr 2023 20:13:47 +0800 Message-ID: <20230417121350.32186-2-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230417121350.32186-1-yunfei.dong@mediatek.com> References: <20230417121350.32186-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY 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 Since the LAT decoder works faster than its CORE, getting the trans buffer may be done only after CORE finishes processing: avoid printing an error if the decode function returns -EAGAIN, as this means that the buffer from CORE is not yet available, but will be at a later time. Also change the log level for calls to vdec_msg_queue_dqbuf() in H264 and VP9 LAT decoder drivers to avoid excessive logging. Signed-off-by: Yunfei Dong --- .../media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c | 2 +- .../platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c | 2 +- .../media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c index 3000db975e5f..0c2ef1686397 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_stateless.c @@ -240,7 +240,7 @@ static void mtk_vdec_worker(struct work_struct *work) mtk_v4l2_err("vb2 buffer media request is NULL"); ret = vdec_if_decode(ctx, bs_src, NULL, &res_chg); - if (ret) { + if (ret && ret != -EAGAIN) { mtk_v4l2_err(" <===[%d], src_buf[%d] sz=0x%zx pts=%llu vdec_if_decode() ret=%d res_chg=%d===>", ctx->id, vb2_src->index, bs_src->size, vb2_src->timestamp, ret, res_chg); diff --git a/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c b/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c index 999ce7ee5fdc..181cc52e0847 100644 --- a/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c +++ b/drivers/media/platform/mediatek/vcodec/vdec/vdec_h264_req_multi_if.c @@ -596,7 +596,7 @@ static int vdec_h264_slice_lat_decode(void *h_vdec, struct mtk_vcodec_mem *bs, lat_buf = vdec_msg_queue_dqbuf(&inst->ctx->msg_queue.lat_ctx); if (!lat_buf) { - mtk_vcodec_err(inst, "failed to get lat buffer"); + mtk_vcodec_debug(inst, "failed to get lat buffer"); return -EAGAIN; } share_info = lat_buf->private_data; diff --git a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c index cf16cf2807f0..6d981d7341d2 100644 --- a/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c +++ b/drivers/media/platform/mediatek/vcodec/vdec/vdec_vp9_req_lat_if.c @@ -2069,7 +2069,7 @@ static int vdec_vp9_slice_lat_decode(void *h_vdec, struct mtk_vcodec_mem *bs, lat_buf = vdec_msg_queue_dqbuf(&instance->ctx->msg_queue.lat_ctx); if (!lat_buf) { - mtk_vcodec_err(instance, "Failed to get VP9 lat buf\n"); + mtk_vcodec_debug(instance, "Failed to get VP9 lat buf\n"); return -EAGAIN; } pfc = (struct vdec_vp9_slice_pfc *)lat_buf->private_data; -- 2.18.0