Received: by 10.192.165.148 with SMTP id m20csp279113imm; Tue, 1 May 2018 23:26:46 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphHVzpN/8QPN5AVMxxHM69paakasqfIhuVugVx/UJGV82vzjSGUEiYtHCnJPEapv9+cuoC X-Received: by 2002:a17:902:8b89:: with SMTP id ay9-v6mr18980887plb.100.1525242406292; Tue, 01 May 2018 23:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525242406; cv=none; d=google.com; s=arc-20160816; b=Xsq9CgVehwXqP6h7k/znRTOaN38bfTpuce61duQS5CrHoGqTArurSKpyf1gOE5mCFH JZ7CDfRVOthyuuyh3HpMD+th35K7ejgAjh75xo5SyhdAZiYQ1XSCWPnCvvIjNpY+eOXK I4rm0E+H6SPoEx01pQn/tV3JzFEjgkKvMPlauBPtICdyxr6LqVN11mqJeg/DT3x4RZwB CK4LPpuQ9dU3gVz3lbtdSEnC+7gIROWc8ntJ666ziBBDqGxNcAyLFDtuqdq4JNaePX6H Ja+JaaT+BrivREgpVaPHAqywc5F4KJbdo+uDBqhCH2yQzXkS57Jo8Ch9sd3md1/W+CpX 0cqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=N90dRAo+qSIm3Ak5PRRNzmkhpT8GCk8PMnKe2TFAVJ0=; b=I1K5v71xvKhgYWqqEkIsD2pwd0eaGbVs1n4b9bKXmrGj2ufTQEyTMW7eZTgMXd/6VQ 260AamDu93sv8nm9VNU680eG4Utkcl7tfxUgnye2Ioe5wYJs8xtn6QSW/9HGpI6MKC7V FqDNNtl3Jff5Zw+MUk8WHXcrRcGQkD6rs9+FQWjXENIj+Obdb/nHctn/LfWxZbhakqeX BKJ9K7r0QbFPg04mUpu1mhMtaD8B/UJPsC8/BjnG8Pb6xcQezEcvBDR0ey9kzyUMBrTv Gl2vcSgohPOu4oeROkYeDexv6uMHE8Gs/JIMYN330KHJd3UO2dO+2TaKoQfck2DjzRX1 itHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=P6woQdXm; dkim=pass header.i=@codeaurora.org header.s=default header.b=QoqIQXbm; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 44-v6si10757967pla.376.2018.05.01.23.26.31; Tue, 01 May 2018 23:26:46 -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=@codeaurora.org header.s=default header.b=P6woQdXm; dkim=pass header.i=@codeaurora.org header.s=default header.b=QoqIQXbm; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751216AbeEBG0Y (ORCPT + 99 others); Wed, 2 May 2018 02:26:24 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41978 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751025AbeEBG0U (ORCPT ); Wed, 2 May 2018 02:26:20 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 65D3760AD4; Wed, 2 May 2018 06:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525242380; bh=pvSp8K90bUSlItajIK6RcWPsnKZrlF9+nj+Dy9HotjA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=P6woQdXme+1ACndNsXYOcNGjuuLLaVNlrtVUGA7MQZZrGwHOSX2l+wfUjjWqpDLbp u0MwqKcKHNwxCBO65+tz69/UKQQFQDDqdfIiAu7N2GYGqJfDhqyJIq4DuAysmWEbMw 2Rf+Dhu9rJB5xOj4S0lFn4qFLNWTS7x9TmtGExgw= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C421A60585; Wed, 2 May 2018 06:26:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525242379; bh=pvSp8K90bUSlItajIK6RcWPsnKZrlF9+nj+Dy9HotjA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=QoqIQXbmQucg/Z2T+Dj6saL9PFmb/PoyDiWE8jb9g8YYprxw0ImTNpnRaNHszZWfw rjHWC8cp4FA3PQt1PFSoIR//ZXCbGUbCRDCcmQ1O1F5sjBebiDTjs0yplbNUlP969U pK58buA9J9Miv0iZ8udKGz/CocYlfSzNZyDKu0fY= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 02 May 2018 11:56:19 +0530 From: Vikash Garodia To: 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 Subject: Re: [PATCH 10/28] venus: vdec: call session_continue in insufficient event In-Reply-To: <20180424124436.26955-11-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> <20180424124436.26955-11-stanimir.varbanov@linaro.org> Message-ID: <85963ca3e12f4d71f2bc2db7d601d4b2@codeaurora.org> X-Sender: vgarodia@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. The driver should be sending the V4L2_EVENT_SOURCE_CHANGE to client instead of ignoring the event from firmware. Thanks, Vikash