Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2177903imu; Thu, 17 Jan 2019 09:36:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN4AmeEWc1xt7vMWqDXyENhw6rcEKBk2M0QUyxwMMfa70vWW5VkYWWE3ENvp3rScsUENFqQW X-Received: by 2002:a17:902:b943:: with SMTP id h3mr16058998pls.12.1547746617315; Thu, 17 Jan 2019 09:36:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547746617; cv=none; d=google.com; s=arc-20160816; b=y1SmovDF3ksNjY1RARw7V1IQVBPi7zTu3m57qBoscmPi65GhuLF95ZHMxnHtUsMdmf GIOL4PibrjLAiJuAbUdqGLS/heqe5tku++D0voKDlVeg4KIdlBGCwzl3zsKJQNBZEr/i AuR127r5ZIjrPq+f8fgjvVYZLWGWw5E/5rvV5jhP6/ti7Ck+PGI3M7aQju2UQYlIaDjJ uFFtgR4wTYvkS/3EWr6Pg05zIFwngkeEQtp3GZON4vAjvhFEHz/8EI9EAh2oeSaLJpoh TAIRvCimihkVUIh+HVM7ds3xu7Rphx5yjQD2YMLfMKtnLiW7jyAIrFtRhOJjw5ISHi4X c7oA== 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; bh=v0Va4+csQgOcJN11lZwiOhMnmUqAzLAsAekjb//cub4=; b=DpvsBHmTNvtosV2roi9waaDvr0ZQdNVdhiR85knq/Luc5mP/ZgaS8gziXL/V84Vx/A MDX7xj0koPSGIGojPOLk41fV0ei66ZKWvf4t53fqGKuj63q1omZdsvKvzTsTFkC+INbn ejnQmzRt41sefFtNwWfQ3v2QUW7Q4FSJ1WjqYIv51UDvYOcaMQjlzXlNPjI0LF7HWMnC FdhaAuUyqWjEDbZnFBwZJOtvBAB35qmblTrVZiqM2dDU9Y5MC9dyyCV4aNTd7xNmhvmf R5KaLyF4GurZnWZAknngOhByBTtgssbELg1VY+rAJpnDBcYuDStK2v/3t19w0esEHJT7 5wFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YesyfPrz; 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 f38si2128582pgf.206.2019.01.17.09.36.33; Thu, 17 Jan 2019 09:36:57 -0800 (PST) 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=YesyfPrz; 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 S1729002AbfAQQVD (ORCPT + 99 others); Thu, 17 Jan 2019 11:21:03 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33250 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728675AbfAQQVB (ORCPT ); Thu, 17 Jan 2019 11:21:01 -0500 Received: by mail-wr1-f67.google.com with SMTP id c14so11740443wrr.0 for ; Thu, 17 Jan 2019 08:21:01 -0800 (PST) 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=v0Va4+csQgOcJN11lZwiOhMnmUqAzLAsAekjb//cub4=; b=YesyfPrzEk7o0a3C0a5hYtBknydFXoNHH7l797s0zsZh9dnasvRDWkUDeBjG7fhtj5 bG9SKOO3X5a7/UPjx28JbO9VvuGwnBp9sTI1YPYcwPw/CvH7dyXf37tAbuW2jc8WhJJH RSSi6HUxfKym5vxixl2DxxADjatnCgIcNqISA= 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=v0Va4+csQgOcJN11lZwiOhMnmUqAzLAsAekjb//cub4=; b=F2/ZSPHDoG0f2TTIM5HEdOwt3Kr47JTHwny85t+84TQysqHFelbC+z7QeMXexUtONi 5IWOZf81ah8N74v6gffFzRnqHPsrglrwSWSwpC8L7Jdlvj/xNGgipTuD0Gf54TBlVpyp ++SceFVcm8MkFIoqpExSr/+f+LiCkCwAaqa2VMX7mGnhSDFpUsbakCO5WMUdrIKnvvUS rLQj0QdzFzl2HTkQo1Okg0RLYVph0/vLZ2KPQ0GZvb5cTWSX+6Iyj0imAtLwJ5RnCT/6 utrRAvWRdof7E8P2iP1mJAY/9RFWmieIazYK8BGGLnU2i16+cv7xojX16jMGJwo4Lydb 1GwA== X-Gm-Message-State: AJcUukdR2eT26gVdsP5MwfmErMSnobBeWK4BRh1/AhV0hO/mMKOgaerk /7Q/a1rgltKhCOrtJ7DqzpcZTg== X-Received: by 2002:adf:aa9c:: with SMTP id h28mr12481135wrc.216.1547742060418; Thu, 17 Jan 2019 08:21:00 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.20.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:20:59 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Malathi Gottam , Stanimir Varbanov Subject: [PATCH 02/10] venus: helpers: fix dynamic buffer mode for v4 Date: Thu, 17 Jan 2019 18:20:00 +0200 Message-Id: <20190117162008.25217-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190117162008.25217-1-stanimir.varbanov@linaro.org> References: <20190117162008.25217-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Venus v4 doesn't send ALLOC_MODE property and thus parser doesn't recognize it as dynamic buffer (for OUTPUT/OUTPUT2 type of buffers) make it obvious in the helper function. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 5cad601d4c57..86105de81af2 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -467,6 +467,13 @@ static bool is_dynamic_bufmode(struct venus_inst *inst) struct venus_core *core = inst->core; struct venus_caps *caps; + /* + * v4 doesn't send BUFFER_ALLOC_MODE_SUPPORTED property and supports + * dynamic buffer mode by default for HFI_BUFFER_OUTPUT/OUTPUT2. + */ + if (IS_V4(core)) + return true; + caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type); if (!caps) return false; -- 2.17.1