From patchwork Thu Jan 17 16:20:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 155837 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2158585jaa; Thu, 17 Jan 2019 08:21:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN7OZqXLGg5qMPACkGkuCMdiBgHikGJKmWgTHbVNe23PeaUVidcgUieYDOlGKrU96GGmBmiA X-Received: by 2002:a17:902:b406:: with SMTP id x6mr14937097plr.329.1547742064004; Thu, 17 Jan 2019 08:21:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547742063; cv=none; d=google.com; s=arc-20160816; b=QE5HNcMjMsAdX+JWKqJf6ZuZoK1fivNvOAJvGdG/IpXEu5UlvsVYqjq8OpZXvCaT2X PP90QLBOJICW8PYSPGQbEdxgtbmSy56DPARLaw4Lh3l68dqIeeajuYHNTP4sGvJN0s37 1ueMjbgwAwgIOqgKaZM46BkuPFGHb/K6VbXPx76WjPm0/ne3ZNqNQskIYO9KXazN8kyb vz0kMwdSDkAalbl0kzXZg1mUVCTfk4xxPF1wqCb1+bS/LS4wO1yPm2Hou8HfxoB/ocIC QknQ82xu92bmH1vGNxqpmYYk3WZQXbq7WlMdQT5kNHfkAqm/E7N8ttpnUz4FusO0tpKQ kcHw== 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=nyWh6nT4wCyERmp6zwoRuPwPyzJf3GbWhUv8AjcLZZLA3DksoQVCKviwbKtDBz2rSY QwIGku8Gyc1/IRv27njdrhdEFSNnVR/t2ITnzVp2kkTnnuTdWQhZnKaSmkkSfZhF4rqE 4R6OBbY/hCpple4yGgkKoSWazarb6c0iqZqmGLeUzxtvTG6WjdbxUdc5PzMGqvvlYFLz MFlACm55AmgF3RgWGC/yX4IVeI1SGt7f+J82RXM5nda/GI/t1hWwZWS7lCNhPDPXR+gb 9sDI5DgepB+kp2/7Sldpa/MTQOvjjECFjgWdc9PEx7Oam5OSDx2jpW/baDYbclCh4xdv Rpkg== 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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 l7si2107652pfb.31.2019.01.17.08.21.03; Thu, 17 Jan 2019 08:21:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1728953AbfAQQVD (ORCPT + 15 others); Thu, 17 Jan 2019 11:21:03 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40892 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728943AbfAQQVC (ORCPT ); Thu, 17 Jan 2019 11:21:02 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so11675781wrt.7 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=FBt5qiATIOuIa8W5O9ytZe3j+toiGMYLRtE4QSX4x/mKRrbg3pV8zy2C35h4FqAMRb 2rNWeKLdccuv5GHRg7MffFWG6lrGCESyhqEYE/QDEpaAgNXE/xcbHWBThb6OTj+yyHT+ 6jeh7MRrz3MiBbITRbPIVAB7aWw3WgOvQZw50ME6lQZoJjKjJNqNdYMpp5ky4Yg+/h6x TTgfKA3CUdQE3xbncheLZXBFoucEdjRQ1NxdmdvKhn1VbSk6DEMOUE3vi2CQ+5AurWe8 frqgswFsp1P5ER55IHMsoJUrT0JqWeLbatjI0SAAE4Tbb1F+8WS8jPEJOyQzODjlyW3R xoiA== X-Gm-Message-State: AJcUukeX2nuQw9rdTghkBaDsKwJUoby0PdZx71DeH4Vln1T6rhkz96kL mOAISIRN1oxvZrlHS1qwPI4oog== 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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(+) -- 2.17.1 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;