Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5134462imu; Tue, 13 Nov 2018 01:32:57 -0800 (PST) X-Google-Smtp-Source: AJdET5eyhShlfvOt4x6zAZfBLQQn9OSbpWLoyApQnukGN3N4SWOsRoohCF4rXFPDf7Hys9no+xtK X-Received: by 2002:a17:902:1123:: with SMTP id d32-v6mr4327376pla.62.1542101577862; Tue, 13 Nov 2018 01:32:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542101577; cv=none; d=google.com; s=arc-20160816; b=LsW8PH+4PoEjdA481Gyv4zDZm1+6X3RlmqNI3blbb4iFDuPUraJW3txwO4no5SkCp4 IRlylZJBzLnJkssbbW/eWL4C3GJYDl9SK5tGowZDyH/C+DK37VXgZ5LqXxRIxnMmRSS7 U9zi064oGRpXmtfQMKw2wtBzZ5yue+TEq8pksKlHfEaHrYkb1jF91NYd9+oHjJnAijc2 cSXuAO8ecQG89tSFQe6CloJAwxdQLwfg0+u3Fmrod0yCaJlCSd7bwLJbO50lGAcCY73E hr1DE4tBJ3ls5PC9KSfNjB6BI7bMAUq9z9ayN/YlI4rQ81ia9DAezPFIWKxiiwp21s98 YkuA== 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=KcuopUe8+golCkSVu4l0ldOgD6hHzm9csnMSHD/yrNs=; b=FkH+2VcAOuM4SaN5RMrZEcXKA+KhdoPAJjTBR7BepGD11b9FFwmEB9JlMhkAEmYB1a 6NqAVSgUyq9Ff9FDhZwdqpkyGy9xOAoQ/mLKMB61t3zN/zZ8QUDHA4XWNvb6cBiWBsBa XEzhyWjbBHDvKqHyUi5v445zT5+P5D8pTKbkzEQViuyr5k4H0+arXByKTGnDdRLb0HyE 8LAg7PSk2UBy9pDeFbjIf94NLgvg3/EBbDaw9ipxyBL2lPtTAuPwVC+s8lls2nnUKnRJ bKFDYkDOHkB7VvzenZSUxy7+3VQQOE2h4DFXr5vDwHsvdJPvKoFFPizzoYgjkhCL5Q7S Btng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XTjQzpe1; 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 l26-v6si22642926pfe.21.2018.11.13.01.32.42; Tue, 13 Nov 2018 01:32:57 -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=XTjQzpe1; 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 S1731645AbeKMT30 (ORCPT + 99 others); Tue, 13 Nov 2018 14:29:26 -0500 Received: from mail-ot1-f65.google.com ([209.85.210.65]:39450 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731271AbeKMT30 (ORCPT ); Tue, 13 Nov 2018 14:29:26 -0500 Received: by mail-ot1-f65.google.com with SMTP id g27so10700674oth.6 for ; Tue, 13 Nov 2018 01:32:12 -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=KcuopUe8+golCkSVu4l0ldOgD6hHzm9csnMSHD/yrNs=; b=XTjQzpe1LLyxOvaodojWLesEEgtS/JYJHBkKfIM1MUvZOAqBtRlKrKvql6YG8D7ZDC QHnIcwnPvJBu+qlKwcdyCOrNLbjbIqP5IO5FTCsskli7PCPMvw2lBvLes7xppRC4P1Mp YjZIZgpWLEnldnoPOR0RLzg/E76IkPbfFCEJE= 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=KcuopUe8+golCkSVu4l0ldOgD6hHzm9csnMSHD/yrNs=; b=VQiua6enEl2Ak8iL3Zn6aAegvJqpQ90wNwqZTMzEMIi4qcxBDPY2d2AkNlrbu6Irgi RwdCokfEMvfvXdb2s97j6gh4KDSfkH5zmqNnjMklalaalurhug/O5OBT87u85v7ADCzf xwWEekL9hyDpe+lwbsuETB0gMlgItgA9kf+OVHUF7PBWyUBc0T5fH1AskNeDnULGV/ge 8CCW3vX4M7wZQFaYY1ZuuYyEj6MFG4vZ/o9/BZIUopgA3oq0YEYBm83FE83vVWu2ouoA tMtyFgfhr1wZ5TNrmiLLhGXxeeUvZMVbWTu92Dx8qSyMJMR6mPcnUYX7Fo/4+owHi0T+ prCg== X-Gm-Message-State: AGRZ1gJh9g+iQPllJNcqhKyZdahaWZwCT5bbCq/qgA9qs+dmwT8c56KK xmBQw1EakxJvonyerCiG2kzbNPAc5U2GUg== X-Received: by 2002:a9d:76c8:: with SMTP id p8mr2489161otl.113.1542101531614; Tue, 13 Nov 2018 01:32:11 -0800 (PST) Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com. [209.85.210.43]) by smtp.gmail.com with ESMTPSA id z16sm6796659otc.22.2018.11.13.01.32.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 01:32:10 -0800 (PST) Received: by mail-ot1-f43.google.com with SMTP id z33so10685354otz.11 for ; Tue, 13 Nov 2018 01:32:10 -0800 (PST) X-Received: by 2002:a9d:1715:: with SMTP id i21mr2552850ota.149.1542101530126; Tue, 13 Nov 2018 01:32:10 -0800 (PST) MIME-Version: 1.0 References: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> <1538222432-25894-6-git-send-email-sgorle@codeaurora.org> <3097b9b9-e065-e42f-5b19-849313df38c2@linaro.org> In-Reply-To: <3097b9b9-e065-e42f-5b19-849313df38c2@linaro.org> From: Alexandre Courbot Date: Tue, 13 Nov 2018 18:31:58 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 5/5] media: venus: update number of bytes used field properly for EOS frames To: Stanimir Varbanov Cc: sgorle@codeaurora.org, Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , LKML , linux-arm-msm@vger.kernel.org, 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 Mon, Nov 12, 2018 at 9:20 PM Stanimir Varbanov wrote: > > Hi Alex, > > On 11/12/18 10:12 AM, Alexandre Courbot wrote: > > Hi Stan, > > > > On Thu, Nov 8, 2018 at 7:16 PM Stanimir Varbanov > > wrote: > >> > >> Hi, > >> > >> On 9/29/18 3:00 PM, Srinu Gorle wrote: > >>> - In video decoder session, update number of bytes used for > >>> yuv buffers appropriately for EOS buffers. > >>> > >>> Signed-off-by: Srinu Gorle > >>> --- > >>> drivers/media/platform/qcom/venus/vdec.c | 2 +- > >>> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> NACK, that was already discussed see: > >> > >> https://patchwork.kernel.org/patch/10630411/ > > > > I believe you are referring to this discussion? > > > > https://lkml.org/lkml/2018/10/2/302 > > > > In this case, with https://patchwork.kernel.org/patch/10630411/ > > applied, I am seeing the troublesome case of having the last (empty) > > buffer being returned with a payload of obs_sz, which I believe is > > incorrect. The present patch seems to restore the correct behavior. > > Sorry, I thought that this solution was suggested (and tested on Venus > v4) by you, right? That's correct. >_< Looks like I overlooked this case. > > > > > An alternative would be to set the payload as follows: > > > > vb2_set_plane_payload(vb, 0, bytesused); > > > > This works for SDM845, but IIRC we weren't sure that this would > > display the correct behavior with all firmware versions? > > OK if you are still seeing issues I think we can switch to > vb2_set_plane_payload(vb, 0, bytesused); for all buffers? I.e. not only > for buffers with flag V4L2_BUF_FLAG_LAST set. That's the fix I am currently using in my source tree and it indeed seems to be ok. I also agree it is better than special-casing EOS buffers. I have sent a patch for this. Thanks and sorry for the confusion.