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: 134099 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2198726lji; Tue, 24 Apr 2018 05:53:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx49yUk2vYGDqDsHZkP3EWYIBcQNyiHo6VoVgpXmVxJdAst7NKIJw5nzRJ7ki1ktDLknJ7gSx X-Received: by 10.101.96.205 with SMTP id r13mr8729671pgv.22.1524574420172; Tue, 24 Apr 2018 05:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524574420; cv=none; d=google.com; s=arc-20160816; b=KP6gbFC0FK1s0zwxQYVyU+d/eUF/mYwO8fD3FzKHcccc9Bn7TtD6CFWcRcNaGlZR4L YN77hhR+Q5jRt3FnKfFNu7TzVun/vNiZhT71acoAlGp7SOhq3wv7iyonPGHedl8EZVB1 Ct2fPgQgqhN72QdHziLSsjfJKgHvpJjByadBLUn7iZsjSFy3sD3M7/vBZK1S3E91V+HP WSpHn0Rhym/dUj+OXLI7FdPLEb7hR22DWZ2FEcGDKbexpCwcnO2giZ4wwx/a1k4FvKSf EGLQYgUI4HSLYqMGOVs0EO1Arhzx0Y2O9ibjC+Zu3/9zx5IEI1wZFGFYh6Gzeyb66lYX nRHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=qk30vsxFXw8OaVI7ewrkRlKK5nRwGCA970OKKcpSOck=; b=GWmu2CgdBTqdKDM50tOYjylMcb7oQCC/wDLCqUpHVt8az5ClQMOKjDX9gGf29/59TO iU3KnJbCwJUSAgUrlrO0byUoI3SB7fWI7RLzJl6X6NGcOcpy6l3A94i+gcKxhzn3/l0/ m5qrVy/dOS6xtbxODdb0Fs7m9o5onVMboCy2DXhc/ceOkj0P+c0t8BabHO7W0hI0gxJN RT/DU4HhqnmaoY9Y9E6YGg1FPnbXKhSmHV8X0CEWvmwDdT1A2V1fCZinxeP3HuqiOfpP v3a+SyllJMKpzju19HPphdW7GyynAjjl/aidWeL/pJFlHXMpXHTH/DROZq4gnr3x2Uqj tYzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EN5C5MUi; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 d16-v6si2278649pli.176.2018.04.24.05.53.39; Tue, 24 Apr 2018 05:53:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=EN5C5MUi; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-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 S932116AbeDXMxi (ORCPT + 5 others); 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-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 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(+) -- 2.14.1 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);