Received: by 10.192.165.148 with SMTP id m20csp1730421imm; Thu, 3 May 2018 04:37:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqaIJHVLI1DFl7PdhyJx4tVP7gp2Iw8ciFgmqhiMtLQQjA5JPm0X6mYgWFtwGrJebIsh/8Z X-Received: by 2002:a17:902:8c91:: with SMTP id t17-v6mr23984800plo.182.1525347457408; Thu, 03 May 2018 04:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525347457; cv=none; d=google.com; s=arc-20160816; b=hCAfzfhCA+IQOq0SpTF7rt2u2juh+atLAQtLXXK79TSPvCuBiYfus1dedcwiT+gDgi Wk+kTumFKRpAuuQ1Hu7QEWBrDSBxBm/J5DKL5A1ADtFJv1nhDt40znJl3ycxeZHeToYq kOlzR2F1J1gjs5Hw5WMzJmJeAUj1FtWRJ82P3micleeqcwhdEFeoNENj1ZN1MFI/Ag4b bxXlaTcMMMFkm31iXyL+4D5MQiO0Mvw/EluBnAzJnJEK0hSSHTOZ2F5KeSLUCsa90hjJ /nDiaOYlxG9b9s40fXkfu4YvFgkNXR578MNij42Kp2nv4EQOTm4LzHBEeS1ZgO6dIhNA 1DCw== 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:references:cc:to:subject:from:dkim-signature :arc-authentication-results; bh=ISsLIppa6xC1dfBY940ChXYakLF68jhijXrJgiAPiqY=; b=R3iw8FxyJNSLEXOCbJj1OwHYUxRkZNeuHqLfPrIWLllwDHE8vyI9nLoBBMoX26jQVO S73FqxkK15Je+GiOMnYPXLLZ4S3UDmpCumyfj8esKrEt2xKfbzfnISzSc1o6ohTTQDPz GKJEeEdiwidy3FBrES4VnWUApsRBAc1t8ePFrJY0dgp+vy33tXTS52gv7zDbb+EiQI+v j8f80tOPntrhMoCD3wC2AjQpcT/r9jNYzfI9zGv79NRdRV5IgHtIBIKw8BaGZmPx29wN ObbXkHnP+O9tE5c0XbNVeg78mchFq2jllvQewG1XgIlGUM7DqKYje3ysO791GZQh8tdB Rf5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XhZX4zPh; 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 q4-v6si13751484pll.10.2018.05.03.04.37.22; Thu, 03 May 2018 04:37:37 -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=XhZX4zPh; 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 S1751439AbeECLhC (ORCPT + 99 others); Thu, 3 May 2018 07:37:02 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50704 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751145AbeECLg5 (ORCPT ); Thu, 3 May 2018 07:36:57 -0400 Received: by mail-wm0-f66.google.com with SMTP id t11so27824612wmt.0 for ; Thu, 03 May 2018 04:36:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ISsLIppa6xC1dfBY940ChXYakLF68jhijXrJgiAPiqY=; b=XhZX4zPh/aRi8UeqRQND3B4jzuguYkoDyojY7oEi4SPyvRRrsks7UFSKrPHAvpT1ZH JaTjy44KDnGsjkeu9p3Zm8hPvxddU1Qi2NgB4tEF+IJKYMuP/SqotroQWdf2XY8F79Sg Vlphp7rHZF2fKNtGlKvGV2PozGv5QaUd3iM0k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ISsLIppa6xC1dfBY940ChXYakLF68jhijXrJgiAPiqY=; b=mnrvP5VGvzpiyU5DdidWfoGkadZYQk4qnnLb8n3G+U63ftL7zdFoDgWY9JQXwkVkXf xEvqeM70ApZgJT6TIs8pPiiOq7mlN4N8wYIOd82xm16MFSpdmQuPUJqCvwTDmbAHUjSb omJXTUH0RHug256XgeKhTvtSPhdDN6Vtufjpt/nu1bBXAI5DC9UsbXNCpyBM4p81Ar0R s8v9hlWGV5IdLI3uZ+VL3FNFszx7uT1HWElyfvao+fp6ZJmEgQc7kaJbjkyRzKzvrqjh h+82h6uTnWIB/XYXjbfuIelkhBENW6JjgnZ3qfEdScXN0sYi6k6TYTF2KUx3nhgmFyfx PkRQ== X-Gm-Message-State: ALQs6tDSudj2xcaYLpVOFub/WoIp3g8kDBrboJnIjcHi8cLzMTBdFk3n KIJTmZFzh2VxOkFd6dcZKy3w1A== X-Received: by 10.28.13.202 with SMTP id 193mr13965992wmn.36.1525347416548; Thu, 03 May 2018 04:36:56 -0700 (PDT) Received: from [192.168.43.218] (212-39-89-93.ip.btc-net.bg. [212.39.89.93]) by smtp.googlemail.com with ESMTPSA id 39-v6sm22352180wry.89.2018.05.03.04.36.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 May 2018 04:36:55 -0700 (PDT) From: Stanimir Varbanov Subject: Re: [PATCH 10/28] venus: vdec: call session_continue in insufficient event To: Vikash Garodia 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> Message-ID: Date: Thu, 3 May 2018 14:36:54 +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: <85963ca3e12f4d71f2bc2db7d601d4b2@codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed 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, 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. > > The driver should be sending the V4L2_EVENT_SOURCE_CHANGE to client > instead of ignoring > the event from firmware. The v4l2 event is sent always to v4l clients. regards, Stan