From patchwork Tue Apr 24 12:44:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10359589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 839D5601D3 for ; Tue, 24 Apr 2018 12:53:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 740E028D00 for ; Tue, 24 Apr 2018 12:53:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 676E928DAE; Tue, 24 Apr 2018 12:53:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F13C328D00 for ; Tue, 24 Apr 2018 12:53:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932116AbeDXMxi (ORCPT ); Tue, 24 Apr 2018 08:53:38 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:43960 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757836AbeDXMpS (ORCPT ); Tue, 24 Apr 2018 08:45:18 -0400 Received: by mail-wr0-f195.google.com with SMTP id v15-v6so31693408wrm.10 for ; Tue, 24 Apr 2018 05:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=EN5C5MUiAsf12wpgRSJuAqBAg/xSjoRXB4WQ7pmSvngAYQTVFScI2JsfS9wVOXN+O8 /DLlcSSBUgVWrVUQg769dk3Wo6yodHVrltd44JZ8w6e1Ya76cD6LQ+lweWtpq+b261VM 7IuH1UE7o5hCpRKUDo8fwiIODJNdP7wedC/Eg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=nVYrS+X2HAkCVbzYfwyuOO97sBcEjs3pUd9YwukxRgInXoEnjMbFCCDCNjDGSOT57J zPc+MOxezG22zcn8r5iLnh1g4O4E3WRAY8wwEqW+ESCAiZ3Nr0ZRfrLeQ/xXVOGaFTe6 tn8X6R8xkf8akDl7eeh2RXIIVWqIaxgtFBcI2Pl6uPpLZeyc0mrWG+ta1O8T5ADs9or6 TDqfoRlF51jzWHXL7o9upBIMYSnc7Gq5u/JqNFONqcuTPEQxXSYchnNR7cD9+mAMsaC1 CtbNsqMIjNv2zh2rJMVsaXMGaCeF8bROM2aidUEXMc7aEP+xTyQUDndWla2ARiLTYN1P pI6Q== X-Gm-Message-State: ALQs6tACBOjhXOO/MGPDU3TtO/zoSbKKKXWznfE4kFJ3WdWfPqK2uSDQ An9co4Is8yaE0Xp4pQp2lfpzDw== X-Google-Smtp-Source: AIpwx4+aR/aM3H/BC+ZF8rUqLM6wzSPZ7E4hGyOL9kPOikfaVJvQtmsczUYW7WvZpdFCb84COQynGA== X-Received: by 2002:adf:e791:: with SMTP id n17-v6mr17280376wrm.225.1524573917747; Tue, 24 Apr 2018 05:45:17 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:17 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Stanimir Varbanov Subject: [PATCH 10/28] venus: vdec: call session_continue in insufficient event Date: Tue, 24 Apr 2018 15:44:18 +0300 Message-Id: <20180424124436.26955-11-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);