Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3800598imu; Mon, 12 Nov 2018 00:13:06 -0800 (PST) X-Google-Smtp-Source: AJdET5e2rjJvdunY4/OlxgFqZV94BUUlvwRrXRAZaP0kMpWKMQKszL+Ao8kSmjkm9OjrsFgTxmtK X-Received: by 2002:a63:66c1:: with SMTP id a184-v6mr13067pgc.26.1542010386480; Mon, 12 Nov 2018 00:13:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542010386; cv=none; d=google.com; s=arc-20160816; b=hSDKWle4PEFJRbLym+8Hqor0gRhCJmKGv5FLoK8kVVhrcBy/LUp1qj0eE4kEh8upvd k8wwqEojT0WUaUEol7WRdDt1Qi5oJ/gBwGX/qG2UQU8B2XOpTlUzRCEY6QA+23X7tefd 6VRMTr7OqtNhWQ5vFkixwJ6JaOd/VOOvkrv9iSUw0sYmjZ5KvJRr3iIFPwmwUnxKZj7/ 5QjqVnabqHObvJY9s5A2wlJ3Mo0bVZwyk4kR2u65XRrFBTBTcL/5OcqyXuowv+t2OrJD umZVAUqDLC/aWWfmJYaK4wfECYNn7mYd0xg1EVP10xc1Q5HgL507bvvJ3KiwXyahxGuI h7mQ== 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=nzbsk/bOFk8/i7j3o7JZPo8TdZ/5fbTkMiMFdETMO5Q=; b=Lyh+MMiEwJO4WiU2WgmC24hLGWbK5jw4iPkha7KvzNgAmQs3wr6em7NSJebZKj9PyO ioZHCC//YCd4Qi1qaOdmZWq1j+WHTAzN3+rA05h5x/A/vRLkM4xiGTnTJuwVpR6KqOyS xyOkm3nEFC0OKlzY88IAd3CUwjI2aiKWj/TIs0KjzBcfJyuYvmCiqqY7uL+MtNUHfNEn dn886aN0j5CmQKsE9B9/BDdSygYPQ8yh895kplN0YaLOBtmNECVPl6WzYqVwhtK7gjGy vC8fJvMbcge396Jd7lteZhkZVCfmNcBVTe8bytxdenqjwu1lT8WSNyLPzr/fVqEFLOLf 0zJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=lZkOfhga; 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 d3si3340599pgu.437.2018.11.12.00.12.51; Mon, 12 Nov 2018 00:13:06 -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=lZkOfhga; 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 S1728554AbeKLSE0 (ORCPT + 99 others); Mon, 12 Nov 2018 13:04:26 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:45876 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727996AbeKLSEZ (ORCPT ); Mon, 12 Nov 2018 13:04:25 -0500 Received: by mail-oi1-f196.google.com with SMTP id p144-v6so6436030oic.12 for ; Mon, 12 Nov 2018 00:12:20 -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=nzbsk/bOFk8/i7j3o7JZPo8TdZ/5fbTkMiMFdETMO5Q=; b=lZkOfhgal5Y/eHaqtLQLq0ocXIebiubf3vMGLRwVELlJbe0/IKSHSSu+HqYINMBhyx NntHfuhsbMxtX5K0XPfdPSQafi3ZAH38zM57snuSpq76q7RKTrQPE5jS+DO1dbt7i5nd xu0JA7tqgxwukNowhbzJ0abQXS4N9WekU0az4= 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=nzbsk/bOFk8/i7j3o7JZPo8TdZ/5fbTkMiMFdETMO5Q=; b=hmREygh+JPe7IPEzUD6/c4mTVyTkAoXGiiG4JFp9TBh/jTufKvSIggYgb92mWWAOtj yV6NDh73/H7tHBCCs0Wi33HNZkbVz2lfErJB2NuUnYItPGaKy1kzFDc39M5lTkL5sxp7 H0dKqvOa2w4JAjAVXy3it12beyYcYeLk16XrqLx9a2WJwxH129vadMTDIsxS+09ZU1fY 6TYDrP+L22TA8xx4onZq5V++GKvdGu7hlFPfrh25UmRc9jAlAPVD8q7p/oDqMOg7X2BY X3dHRsjuaQZ6Gd8PLENzN6RKD8dYebFcblr9gUvqtGQuyOZWfuw30Xlk++eL6vMjKRWZ 6OQA== X-Gm-Message-State: AGRZ1gJBocQv6+WsW1vMkHsLU3ySvJefInNyYtRTcxc4299emJyTuXvs dLcb6M0xO/6Eo0Q3UFg7yx1csEEcG+G+1g== X-Received: by 2002:aca:4a10:: with SMTP id x16-v6mr9906814oia.11.1542010340047; Mon, 12 Nov 2018 00:12:20 -0800 (PST) Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com. [209.85.167.180]) by smtp.gmail.com with ESMTPSA id j197-v6sm6605209oih.22.2018.11.12.00.12.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 00:12:18 -0800 (PST) Received: by mail-oi1-f180.google.com with SMTP id v198-v6so6475092oif.2 for ; Mon, 12 Nov 2018 00:12:18 -0800 (PST) X-Received: by 2002:aca:6ad3:: with SMTP id f202-v6mr4092oic.50.1542010338068; Mon, 12 Nov 2018 00:12:18 -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> In-Reply-To: From: Alexandre Courbot Date: Mon, 12 Nov 2018 17:12:06 +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 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. 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? > > > > > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c > > index 311f209..a48eed1 100644 > > --- a/drivers/media/platform/qcom/venus/vdec.c > > +++ b/drivers/media/platform/qcom/venus/vdec.c > > @@ -978,7 +978,7 @@ static void vdec_buf_done(struct venus_inst *inst, unsigned int buf_type, > > > > if (vbuf->flags & V4L2_BUF_FLAG_LAST) { > > const struct v4l2_event ev = { .type = V4L2_EVENT_EOS }; > > - > > + vb->planes[0].bytesused = bytesused; > > v4l2_event_queue_fh(&inst->fh, &ev); > > } > > } else { > > > > -- > regards, > Stan