Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4007057imu; Mon, 12 Nov 2018 04:21:38 -0800 (PST) X-Google-Smtp-Source: AJdET5cEU+LlwyRT2sLs2IWLsD/ge/kbcL5TJb1p009T3AEcJ509nH+CtFhzmNMtzu15v5aE/Nbe X-Received: by 2002:a63:6150:: with SMTP id v77mr637849pgb.266.1542025298264; Mon, 12 Nov 2018 04:21:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542025298; cv=none; d=google.com; s=arc-20160816; b=oNjGsLp6txIPP1bPZsTXqw+OthPPEi0BwnzQ722CqJHdK7kAKixYv7szWbgdkhW0XL E6pLd8WnpqAp4gpz6zJJaAIFCsNDxR0/A79OjVWRRTrtVFmpPhxWMrQibKgoFnZJDShc /wHJVwxwVhdTECT5y3NyMXJ3vz0/c8avtLjtC4ZKVV2aZQx4BNdTaD5C22+uI3xERMaq JgzUlqcwVXu2CZm9v7FOTr3FHD/SwegnzG/IhVNB0Axe8UjKUoT4G0QKz5pu8BfwjhuA tOqBs8+IckN8iTSVCuW08+Yf9JVKgJocjFMr97k1e3R3+L+Qs1yMKK4pmRc5/nTLLtwY vCtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+q0sGtV6LYlVRfRRIFqKNF1KCgIaxkkEm5+nnapho7E=; b=W7f6HAL8ENfzTCyafK+8cOgHQnXUO0m3yUBh/KafdW0yj8cEvvujnxNYlc76IzfcJT e7BYIsFmB8FHToawcU+vp/H2PIzu/+tRm2o9iA8PhI1C5wwNaUr/8h4y7inPfTK1nO0s DsV6I1UFW94rwSE8zOBQKl/0DdxESEKuIOu5UBfDqFEOJaN2IC8/yaJZDqIjzlUAc/e1 Ax7qlcTQz4Euqef+hFRTxx5RSkNRPL5abXDgsaOA/SYdnfHR1YY15LG+CMlzjtmbljk/ R4PqFq4JhF/nmHDBeTAhvOVyVe5Gn8yp0subohgfyoupBlkRM6qygoxr/TcNeO1eqHM7 hLDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KcGbVuRt; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh4-v6si3293604plb.196.2018.11.12.04.21.21; Mon, 12 Nov 2018 04:21:38 -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=@linaro.org header.s=google header.b=KcGbVuRt; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729380AbeKLWN6 (ORCPT + 99 others); Mon, 12 Nov 2018 17:13:58 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:39307 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729166AbeKLWN5 (ORCPT ); Mon, 12 Nov 2018 17:13:57 -0500 Received: by mail-wm1-f66.google.com with SMTP id u13-v6so7933672wmc.4 for ; Mon, 12 Nov 2018 04:20:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=+q0sGtV6LYlVRfRRIFqKNF1KCgIaxkkEm5+nnapho7E=; b=KcGbVuRt6o92z/acf3WHuKJ56R9Qxd18GbSf/UHbJ2Reguu9biP9mOe5Th7LJ8pJVd skO13JCYQQDEhJNXKtecq1MPDfiPjolCgSs5SofYhR9FbHmkMjdxIIsM5rrfX0f/Zk1V qiEPqaoxS5FOm20oyxMuYE3fJ0IAQx8/10dcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+q0sGtV6LYlVRfRRIFqKNF1KCgIaxkkEm5+nnapho7E=; b=DVAfeuEmNVvtIFHza0el5a/tHOV0arXEHWl5ZQPEjHDJifLwpCpi3SKS/rBlrqhZ3S Yf0av8WW+JBSh8dtw0bkp91gYpVZSaS06pDvUr/CC8XxvyVpwjMiW5MleGJ+rxEgiB8d h7XIrDRCUXQJ2se8e3lJ82FUo9B/Q89SIWPKnWuTPY2ffJGl2uX+fIYUnIdHGM81HsKm vWfFokTosdTPjlfiUdfnPqZeLFesSgoU8eDMuHzzESMsDEBdT8HdJpyt1uT25+QcU+t7 XO+rxx5TiSlZFeMtGJh3HkHr6rUBpRubncc7zRcZRJQCsa8qs5L4OuLU8WEfYcSmIPIJ VfyQ== X-Gm-Message-State: AGRZ1gIeUdia/wDTNjchXMAageITgSK5+GREFNkMoin4EDhVsux0xH9h hZHEitRf33kzoCXpnYLxK4d/axe6JYY= X-Received: by 2002:a1c:d0c6:: with SMTP id h189-v6mr7552479wmg.43.1542025252802; Mon, 12 Nov 2018 04:20:52 -0800 (PST) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id x2-v6sm10197797wrw.42.2018.11.12.04.20.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 04:20:51 -0800 (PST) Subject: Re: [PATCH v1 5/5] media: venus: update number of bytes used field properly for EOS frames To: Alexandre Courbot , 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 References: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> <1538222432-25894-6-git-send-email-sgorle@codeaurora.org> From: Stanimir Varbanov Message-ID: <3097b9b9-e065-e42f-5b19-849313df38c2@linaro.org> Date: Mon, 12 Nov 2018 14:20:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > > 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. > >> >>> >>> 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; Is 'bytesused' != 0 in case of EoS ever? i.e. shouldn't this be vb->planes[0].bytesused = 0 ? >>> v4l2_event_queue_fh(&inst->fh, &ev); >>> } >>> } else { >>> >> >> -- >> regards, >> Stan -- regards, Stan