Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6533847imu; Wed, 14 Nov 2018 03:06:45 -0800 (PST) X-Google-Smtp-Source: AJdET5dMQ4d+l2NKIYrhauk2Odrz1ND0eVRbPp2SPmCMLV4n5PtDK+2KI6K9stAk2gyFKHEWO214 X-Received: by 2002:a63:200e:: with SMTP id g14mr1301244pgg.235.1542193605596; Wed, 14 Nov 2018 03:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542193605; cv=none; d=google.com; s=arc-20160816; b=Y3+GEQkM+9gtnOVdDJwHd96s0Syonovq7Mv3uAlG1SYDm9KToCjEp+EmT256iO3qA9 h2WG/IvlnXqP4C3HH6VQNgo24pMm5Mhysh+UM7pJoqv0WZzJKMSzHKrrlunriILUu262 Tm50g3931GUVYO2eHXtqrTWTftHjf/hAYBqgyxZWdZT4OKXOonHZLcku+lGMXzUDB2B2 lBo5fgKfptk6buF2YAnz/hQktpKWRzRIFPgzRrIacTG5IZqxVNKN1Fl/vEljQKF8Mva7 wHZdoUW8mN5Q3sN0cHyGyZVeJ/AzIJrYB+YCfVzA8oZUIfkK1PiC4kshf6rLMCasVgzB 13dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ObB1349MhO7WgYz0jjTpgllH1WKgKaJUnIU9Z/a0EU8=; b=Vr7QHLGG+vfEMCGVb7FdIMhNCrstld2NoBGAjO1YfiS1eIzPtHgerpKYB4o+BDQR/p 7UTRQSldbQdE08pOt52JoagNmQjk9iHT9xfbJclT9PRcqTrr0Uy1hzuJRElAjNsAKO0B 9mllIEdl/HCij0t77U+MbkHeY+dt/sf+hONLMIDtx/tW5Uz3qas6W5zISEpz98ix6vhG V+kGogjAEdOO+o7CjlIIETHxxCf4DVxzqLWBdiEmxNvQdVZtptHWNs3czP3pSPYmng7O WCL/SlB+6m3vzH19Jn4VDqoQCII6ucBbH9SejXd3w0SSCCpzUEmgRWLhulI8XGjUMFp0 hSQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W196miNm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d17si23052378pgl.484.2018.11.14.03.06.22; Wed, 14 Nov 2018 03:06:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W196miNm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732575AbeKNVHw (ORCPT + 99 others); Wed, 14 Nov 2018 16:07:52 -0500 Received: from mail-yb1-f195.google.com ([209.85.219.195]:39066 "EHLO mail-yb1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732525AbeKNVHv (ORCPT ); Wed, 14 Nov 2018 16:07:51 -0500 Received: by mail-yb1-f195.google.com with SMTP id w17-v6so6710718ybl.6 for ; Wed, 14 Nov 2018 03:05:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ObB1349MhO7WgYz0jjTpgllH1WKgKaJUnIU9Z/a0EU8=; b=W196miNmmTpNWJUs2hg+Fh5uBb/88aTLqzM9wZ0/F1FYbqOmsxesLcJdS/ldAdd1NS E9ZRUdxjQBvstKfbTzdnJp5X6aGMwdVJY6eTycA4PCgSMhzRz6iTp2z6KZ+Tg9gMru8a bolKMT6NbLk8fPwYgrHsSTVdqd0v5pvJxqgHk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ObB1349MhO7WgYz0jjTpgllH1WKgKaJUnIU9Z/a0EU8=; b=mainESxZibJ9IsxUiQbTVVwyDcQiL0TTcUgulxp98iNzZZZ7qkMKMbk2Nq//0GBUAx cUugcNHSNMTn+qFO2Zjj1jr93l8BzEimMTiCSGmQurJBI3iQzcTBAtRZrOo2j4qDFOQh tejhAFxAAhoZ1oCZFdtFJ7/+qz2WuDnWkwd9loKAKwafWK/scBWRmPVAKFNVplIxN0av EDj5Q4362vxFm8kANq99ZD05Z3vCbMkobT/jNo9antJcH/M8hBVV3Xk133K7LU1ux5Ta FEBpe1B3dzRiaRq9cLRKVuyxKwM9CSAkskDC0KoCwjcxIFmwwhdXZGI7YiKgRhcO/MIE 6qhA== X-Gm-Message-State: AGRZ1gLcyZsmIr+6JgDJBc11mNgnOFD4JfrC2++9a76ZY/GtHUOzDo36 7GMkLLRsAr9m7o+mJ8znQTU6MrK7C+U= X-Received: by 2002:a25:c781:: with SMTP id w123-v6mr957975ybe.135.1542193503377; Wed, 14 Nov 2018 03:05:03 -0800 (PST) Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com. [209.85.219.172]) by smtp.gmail.com with ESMTPSA id 10-v6sm6071992ywt.47.2018.11.14.03.05.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 03:05:01 -0800 (PST) Received: by mail-yb1-f172.google.com with SMTP id i17-v6so6688095ybp.13 for ; Wed, 14 Nov 2018 03:05:01 -0800 (PST) X-Received: by 2002:a25:7ec4:: with SMTP id z187-v6mr984676ybc.373.1542193500830; Wed, 14 Nov 2018 03:05:00 -0800 (PST) MIME-Version: 1.0 References: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> <1538222432-25894-5-git-send-email-sgorle@codeaurora.org> In-Reply-To: <1538222432-25894-5-git-send-email-sgorle@codeaurora.org> From: Tomasz Figa Date: Wed, 14 Nov 2018 20:04:48 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 4/5] media: venus: video decoder drop frames handling To: sgorle@codeaurora.org Cc: Stanimir Varbanov , Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , Linux Kernel Mailing List , linux-arm-msm , Alexandre Courbot , vgarodia@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 29, 2018 at 9:01 PM Srinu Gorle wrote: > > - when drop frame flag received from venus h/w, reset buffer > parameters and update v4l2 buffer flags as error buffer. > > Signed-off-by: Srinu Gorle > --- > drivers/media/platform/qcom/venus/vdec.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c > index 0035cf2..311f209 100644 > --- a/drivers/media/platform/qcom/venus/vdec.c > +++ b/drivers/media/platform/qcom/venus/vdec.c > @@ -991,6 +991,12 @@ static void vdec_buf_done(struct venus_inst *inst, unsigned int buf_type, > if (hfi_flags & HFI_BUFFERFLAG_DATACORRUPT) > state = VB2_BUF_STATE_ERROR; > > + if (hfi_flags & HFI_BUFFERFLAG_DROP_FRAME) { > + vb->planes[0].bytesused = 0; > + vb->timestamp = 0; > + state = VB2_BUF_STATE_ERROR; > + } What does this HFI_BUFFERFLAG_DROP_FRAME flag mean? When would it happen? I assume it applies only to CAPTURE buffers, since for OUTPUT buffers you must not set the bytesuses/timestamp yourself, right? Is the buffer guaranteed to have no decoded frame inside or the frame could be there, but incomplete/corrupted? Best regards, Tomasz