Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3540455rwe; Sun, 16 Apr 2023 22:49:08 -0700 (PDT) X-Google-Smtp-Source: AKy350Ykkgxjl5yi252QWi54Cdjq4xvIcENesXqvjvvRMdtgkfHTnHnIbwbrKb4Su8EQ9RqN0Z7m X-Received: by 2002:a05:6a20:3d0d:b0:ef:70b:4305 with SMTP id y13-20020a056a203d0d00b000ef070b4305mr7136259pzi.36.1681710548670; Sun, 16 Apr 2023 22:49:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681710548; cv=none; d=google.com; s=arc-20160816; b=FCDVlc2Vow7AzOfJQ2GHfNlatm0ivVRNlnq2VF+s8kXOrG4gddaTfcNGXhFw1DGhMc eRq2supTADPv8yKOR6TvIg+LhpnNrDUCf3OpUDihrFjgv3E2j8DT8vrE2VCGLSBI3SPY 6k8XzaQTc6ZBs+nCENkZ3Va3dQQpCv/14LBzjpY3ZbJfj7BLRGVEarTHmdBZainMCeyW EwLl3L5EtDlH2c/s3cz9bpJ/zo88T5Czsxmhy8bFJF4LL/UdrLBlQxBrYMkY6HuL4JWO 8yG7m5Fmz47VwhmiIiy9x03bUCr1C6yH9rYHrD3PumrWZlO9vzRvQJfKOvwKmSTNe5Ea O0oQ== 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=dz5KD9pleKRD8+8uxodYHNXtDrSx+VuaPbU6bwBJs+Q=; b=yboWTApwyJjJ6vIL0wxsny+fGgDRxZStYjqJ9dcFz6J4A1r/Xg8swnJxyUytdcicXx TfvASOg5HPJ2YiGp42o2zKIOdNGs1vf+LYfPu2yqbFCFZKKRyN7RGIeYHZjiDw00nIWF PQuMoAPHT2R8fkwLq2o8VWNrB9P32Adx8JzpxIoLovV7f1yDWM8NtUM9+7DgKfOTe00o nyLfRF6Bf2b6mC/kbmJ9OeNPlVLpLA1ukB3B6t46kTiWhe1gefJH0BAk+yBCSWdXd4+j F1hj1hTQ+2sNNnYIwUG/S26b0WGKAyF7kfHcpvo0jzDs/RBl0km6INQfDvoFxDHwSJ2Z DwtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=FwwRBk6T; 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 x24-20020aa79578000000b0063b8b7dd46asi2762997pfq.34.2023.04.16.22.48.58; Sun, 16 Apr 2023 22:49:08 -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=FwwRBk6T; 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 S229631AbjDQFsd (ORCPT + 99 others); Mon, 17 Apr 2023 01:48:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjDQFsb (ORCPT ); Mon, 17 Apr 2023 01:48:31 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DBFD213C; Sun, 16 Apr 2023 22:48:26 -0700 (PDT) X-UUID: 75290facdce311eda9a90f0bb45854f4-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=dz5KD9pleKRD8+8uxodYHNXtDrSx+VuaPbU6bwBJs+Q=; b=FwwRBk6T7zhJMdzDYmrvRUk+0Bcs/OsY2wWCizABhExnc8ufBsi+PyZjYQxsG+xuBpphGdEjAEd9Co3qt5yYIM1FHzpNRWPUhbz9ei9pR9yMmxawkP1DClXWsgQkHoU4q0Wwj7G5Rh8USlmIjx0n6n1jMaFvbAitgWM5MvIw6JY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:ddd25ffc-760c-4043-82f3-f2ddd9614145,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:f7ba2eeb-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,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: 75290facdce311eda9a90f0bb45854f4-20230417 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 553489156; Mon, 17 Apr 2023 13:48:19 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) 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 13:48:19 +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 13:48:18 +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?= , Yunfei Dong CC: Matthias Brugger , Hsin-Yi Wang , Fritz Koenig , Daniel Vetter , Steve Cho , , , , , , Subject: [PATCH 1/6] media: mediatek: vcodec: can`t regard getting lat buffer fail as error Date: Mon, 17 Apr 2023 13:48:11 +0800 Message-ID: <20230417054816.17097-2-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230417054816.17097-1-yunfei.dong@mediatek.com> References: <20230417054816.17097-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, T_SCC_BODY_TEXT_LINE,T_SPF_TEMPERROR,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 The speed of lat decoder is much faster than core, need to get trans buffer again when lat fail to get trans buffer. 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