Received: by 10.192.165.148 with SMTP id m20csp5224961imm; Wed, 9 May 2018 01:16:54 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpscxTfaOn+ds0Zgol4wjnaGks8PZ30yaJBDjHY8iAxJmWNFS2a1FJYb3Od6PrGVTd3HGS1 X-Received: by 10.98.228.8 with SMTP id r8mr43281491pfh.172.1525853813974; Wed, 09 May 2018 01:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525853813; cv=none; d=google.com; s=arc-20160816; b=SeF0+Jf84XL8m9yd+SFJAjprwpGcBxpUK1rnml2X4G+h2F97Z4GqIXB5p4r6L9KFV0 MKuTuto/8Q+HA0dFlxq6Mx/xZVh59pjgSTkYkfGj8qfhAB5WemBQrBQt5oK/OXXr1sJl 5dpg1tevY/FuFz8N/ZJ/PkpYnZ6MyYar5sm+ZKkdJIq78Y5SlfregICrjmyTH2uhmoFa cTMOuA4fGd1mQakrSq2S0YEqXV9eg5PEzWtQXDuPz1ffual7TF7sZfPj2UdsSY/0BPD7 Qjj/JxI890pWAYYTwcyP6siPx7C3pCB2kZ4OvsqoMRdbgZhd7oO+jpnwwL4PrscKNjei 8Thw== 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 :arc-authentication-results; bh=r4xQJCnWSvmWrIy+aw4QLfh7Oe5sezcMp3BZG6F7rJM=; b=dlab1tai40FNUX98ft03d+TOgF+D6uiHyUY8FGNevBueaMHgtJtkLH+6Oi2MKgHbKn ke2upPffHC1Rvvv3rXhlWsq2m+Dx+MpI+gHpRn76d3hKxRQ+yQNFE71IMVgv0VgbxM55 kzvPuA3Mt6LtT3dFrNcQhYSLPlTSVaCICvBK1jgXOEV3zHsQG5f/p9tSEt3KeqR/SU5Y OV/iMP2YuU5ZwJgLQXM8LucEgyGnCVBrURWtSeFN7p3pQAbPqWdppdLpildWQZlrkx7z mRSvsmukNLAKnJsQAHcfRbWkIvjK2WURvieLbHOYQ9iEMfdFQsePYwUzZvJfRQBWjuQD DBRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ASZSalGZ; 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 a13si23522884pfd.338.2018.05.09.01.16.39; Wed, 09 May 2018 01:16:53 -0700 (PDT) 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=ASZSalGZ; 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 S933952AbeEIIPc (ORCPT + 99 others); Wed, 9 May 2018 04:15:32 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:53187 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933860AbeEIIP2 (ORCPT ); Wed, 9 May 2018 04:15:28 -0400 Received: by mail-wm0-f48.google.com with SMTP id w194so22856431wmf.2 for ; Wed, 09 May 2018 01:15:27 -0700 (PDT) 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=r4xQJCnWSvmWrIy+aw4QLfh7Oe5sezcMp3BZG6F7rJM=; b=ASZSalGZ5ver/Dek189ecxW3Xn5bxloZ/hBM4mmJIjfXR0NKNgUYFdz8jr3viL9eBg n02lgBmDp5twYnBQEoQDshJX/Dy20PUq3qOrmjkil3nD/AtlZ8+KCj+H5sHiFes4E0XD y8iiu+sCnRRl/Elm0JASbUy7V5/hhrU4Kw+NI= 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=r4xQJCnWSvmWrIy+aw4QLfh7Oe5sezcMp3BZG6F7rJM=; b=lmWfo1pgvJpqOyWJqYGMcwaxxmoUt+gGL26GLXmUqJ+Gq1GMnwxc3QzGP9VKOwFPMf NAOzQGsKKv58wxCssWVlZUaQZSz05JRvYO9IXnsy8TJq0s6VOagAOUEGRHMJ7cZ0AK0P MMDWRNbhcaatiiLQ4vQKd5dxoWXpRWY0kaiLUNEDGKUnhlyczqjXKTpO7vocI/3O2sq6 Z81tbmFezduqgT2qgCy7u1U3RC6zMkCAHONt7R93nCXl/nE3ZCOgQ3stC1AD8YBe5qdO oPGC75Gs8jxnStF8LcJndsqARZXv9MZ5UigEIAUEgL0LdHBwUgFjjLRS00nIdNuyGUTB EhkA== X-Gm-Message-State: ALQs6tB5tYgpL3+/IX9YmqXfQcI4nbkk71Z10hm7p8ieA6ghm9Xlh16P xuX/WYFA3DRxX+mRaoAvIcaqzQ== X-Received: by 2002:a50:926e:: with SMTP id j43-v6mr58587368eda.134.1525853726992; Wed, 09 May 2018 01:15:26 -0700 (PDT) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id i22-v6sm13429480eds.28.2018.05.09.01.15.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 May 2018 01:15:25 -0700 (PDT) Subject: Re: [PATCH 10/28] venus: vdec: call session_continue in insufficient event To: Vikash Garodia , Stanimir Varbanov Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-media-owner@vger.kernel.org References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> <20180424124436.26955-11-stanimir.varbanov@linaro.org> <85963ca3e12f4d71f2bc2db7d601d4b2@codeaurora.org> <5cfb0fc9e54763712799e9adf5770dac@codeaurora.org> From: Stanimir Varbanov Message-ID: <4c66fc5c-87fb-3c0e-06c1-6e5c23bc138c@linaro.org> Date: Wed, 9 May 2018 11:15:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <5cfb0fc9e54763712799e9adf5770dac@codeaurora.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vikash, On 05/04/2018 02:09 PM, Vikash Garodia wrote: > Hi Stanimir, > > On 2018-05-03 17:06, Stanimir Varbanov wrote: >> Hi Vikash, >> >> Thanks for the comments! >> >> On  2.05.2018 09:26, Vikash Garodia wrote: >>> Hello Stanimir, >>> >>> On 2018-04-24 18:14, Stanimir Varbanov wrote: >>>> Call session_continue for Venus 4xx version even when the event >>>> says that the buffer resources are not sufficient. Leaving a >>>> comment with more information about the workaround. >>>> >>>> Signed-off-by: Stanimir Varbanov >>>> --- >>>>  drivers/media/platform/qcom/venus/vdec.c | 8 ++++++++ >>>>  1 file changed, 8 insertions(+) >>>> >>>> diff --git a/drivers/media/platform/qcom/venus/vdec.c >>>> b/drivers/media/platform/qcom/venus/vdec.c >>>> index c45452634e7e..91c7384ff9c8 100644 >>>> --- a/drivers/media/platform/qcom/venus/vdec.c >>>> +++ b/drivers/media/platform/qcom/venus/vdec.c >>>> @@ -873,6 +873,14 @@ static void vdec_event_notify(struct venus_inst >>>> *inst, u32 event, >>>> >>>>              dev_dbg(dev, "event not sufficient resources (%ux%u)\n", >>>>                  data->width, data->height); >>>> +            /* >>>> +             * Workaround: Even that the firmware send and event for >>>> +             * insufficient buffer resources it is safe to call >>>> +             * session_continue because actually the event says that >>>> +             * the number of capture buffers is lower. >>>> +             */ >>>> +            if (IS_V4(core)) >>>> +                hfi_session_continue(inst); >>>>              break; >>>>          case HFI_EVENT_RELEASE_BUFFER_REFERENCE: >>>>              venus_helper_release_buf_ref(inst, data->tag); >>> >>> Insufficient event from video firmware could be sent either, >>> 1. due to insufficient buffer resources >>> 2. due to lower capture buffers >>> >>> It cannot be assumed that the event received by the host is due to >>> lower capture >>> buffers. Incase the buffer resource is insufficient, let say there is >>> a bitstream >>> resolution switch from 720p to 1080p, capture buffers needs to be >>> reallocated. >> >> I agree with you. I will rework this part and call session_continue >> only for case #2. > > Even if the capture buffers are lower, driver should consider > reallocation of capture > buffers with required higher count. Without this, it may happen that for > a given video > frame, the decoded output will not be generated. Thanks for the comments, I realized that this workaround is not needed anymore, so I will drop the patch. -- regards, Stan