From patchwork Thu Jan 17 16:19:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 155836 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2158522jaa; Thu, 17 Jan 2019 08:21:00 -0800 (PST) X-Google-Smtp-Source: ALg8bN5E8tKzlmi+/L4ZN5yXFsc7B7focFNpVYATBR6T3T97/1FblLE2RlmwytsX3THsuug1IzQI X-Received: by 2002:a63:151f:: with SMTP id v31mr13834689pgl.34.1547742060555; Thu, 17 Jan 2019 08:21:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547742060; cv=none; d=google.com; s=arc-20160816; b=TRTICnh2QVVL78dpatYegUekhM6ElSasgx4YXyEVrfSVCly8woipYBb8Z7v3EzjA14 JBlBpNNvJtAAIVf69crVca6jsvgRfFo++jZ24qL+G0W/k912aEDRj4hE78scDddh8AYt UTE9IZUzwIbPoKFH7dULiP0maaKYoGkMuCtDobtkrVmxLLj8aqVb5RCmvzLGViMA+fjN trdPoALitwWQbeD6C1wp20jJLQ/scntlo7Oi/Ra1BcISzaUhLdcbxCAzp5W86jc8qH3H d4qJZTNFPQpgkWAfQNxFx1tTO4LWyqRlpzh/euVYnfSH87zw/H+z9SyVBtWPsZwObGkf idTg== 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=9LHQSJz9yfm2u88JHchLKxFsQP5Hy6RpXXBTLyTSlsQ=; b=vQuPWXDnfEg2tvFRFDwz+LkTpyut7P5Y7BJ5L+n6WT2J0L7lLle4M1oGoZNHfI6aIF CjghkUeTHZhg7saOzHxS1lfL/DMNodcS3qh6Vqchj7hA7owVpfGxaJKw7ZX4NIJJcv5X 7JuEHWyb8CK9qRQAhrmNuXfgN8SFMqzEKgV4DjhAKsAO2zgncE0lL6VwaCbUcsKr4yAG iaOF/Rt6PbQpANRbEXRGDuex3dBvW9GUOSVs6Ozk3fuRx4v+M0j3FC/bTpn+i8yaKejG m5xAiA6f8TmWqfARXR7FGVwHsnz2rsgzJMm12eL/AnX35uKd+wCOAYSddj4WplzwGl+7 APcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GAfi0Q0x; 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.00; Thu, 17 Jan 2019 08:21:00 -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=GAfi0Q0x; 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 S1728877AbfAQQU7 (ORCPT + 15 others); Thu, 17 Jan 2019 11:20:59 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50921 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728598AbfAQQU7 (ORCPT ); Thu, 17 Jan 2019 11:20:59 -0500 Received: by mail-wm1-f65.google.com with SMTP id n190so1705962wmd.0 for ; Thu, 17 Jan 2019 08:20:58 -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=9LHQSJz9yfm2u88JHchLKxFsQP5Hy6RpXXBTLyTSlsQ=; b=GAfi0Q0xLT9Y0mWNKm1D4glkoqPg5bZm4Z08rk/zGccHSCsfK3Tiatu56JPM4mm3vU c539EMBy6xIOFXcrJ/Ntwi67vqw5MyZbawW/WZWpFniqdiJa84fRzftKsZePvlx0sC2M CI6lBRmVMtNWSOUNGEy2uxkhYuHL1YjcAFnVI= 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=9LHQSJz9yfm2u88JHchLKxFsQP5Hy6RpXXBTLyTSlsQ=; b=s6zP84ITRvqv57fSma5e5cE4f6cUisHZZdtaWqJx3GQchWapjvu73QjhRe/hDD3lr2 Sb+VoBl0pwot2DN4u1ok1T/qQ6drmyYm1YfibsV9eI9oj/zBpbcB4/Am5Cn+jYo6GTo0 n9vFUbK8SFqCn2pb3SimAVNh7jeUGjZUT/At4xwlvAFywYYOH4IRhe5WFDgTyIJoAxND 1L8eB/UVauo8RANx4XTL1pvb5CNKNDn8F/9QBTKiCbtH3Y4yd4qVtarWQB+gADW4i0l3 10W1dPuKgkLh35yGliYyfhozrb3rhRirzqx9mGhzLXCdflglX934ejjyBnJhXxH6IOTA WBfQ== X-Gm-Message-State: AJcUukdUyIooUMNQ8TNuF6F4Pp8ciUQllSsTQn3sycWZEH7/fgnzEXJI Fneu4B5m9AchWt0yaFsHeByM2g== X-Received: by 2002:a7b:c5d1:: with SMTP id n17mr12436864wmk.152.1547742057917; Thu, 17 Jan 2019 08:20:57 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.20.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:20:57 -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 01/10] venus: hfi_cmds: add more not-implemented properties Date: Thu, 17 Jan 2019 18:19:59 +0200 Message-Id: <20190117162008.25217-2-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 Add two more not-implemented properties for Venus v4. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 87a441488e15..faf1ca0d0db4 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -1214,6 +1214,8 @@ pkt_session_set_property_4xx(struct hfi_session_set_property_pkt *pkt, break; } case HFI_PROPERTY_CONFIG_VENC_MAX_BITRATE: + case HFI_PROPERTY_CONFIG_VDEC_POST_LOOP_DEBLOCKER: + case HFI_PROPERTY_PARAM_BUFFER_ALLOC_MODE: /* not implemented on Venus 4xx */ return -ENOTSUPP; default: 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; From patchwork Thu Jan 17 16:20:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 155838 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2158696jaa; Thu, 17 Jan 2019 08:21:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN4dSjGUpDA430pkeCP751rJ2L6alonKlxpXJ8DH/O4GO5La8vUI/3mDCWFVA96mLuau77/9 X-Received: by 2002:a17:902:22f:: with SMTP id 44mr15450850plc.137.1547742069421; Thu, 17 Jan 2019 08:21:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547742069; cv=none; d=google.com; s=arc-20160816; b=nR1CL8PpnLymLHe82hDAy9e+JTOV7QYxa7q9GbxnP4Eec5+puXyrkNZqJe96ECSkci SbDkLYww3seQlXY1I4k2cvZktYGvN2Pzd5px394Hzz/ZcMCWdBBV0uTxl9yXLOLv/Pmx PclfPkHJp7BXIbaHzi4vCJ1zhMwl9v1YGaZ9/CXfx0Y7UOTg61hEUWzCwSxYNQOWgmjy EQ7BMY2uNHvqUfzxL+phdEI20VIvYNS1TaXcERgO8J0gw3szVcZjh6br4lUxIA1CwkZd hIgBxtJyhmWNGiJ/SBQjG5zwsABUdzOYkZ6Q791BF/3Ekhxx+D8nXmSrDlgUQbg9igOn Rtrg== 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=aXeep5x7ETGFolIIRZohdiZMVYaJ9v3T7r4d/NZltdg=; b=hQHm6MoC9W70CWvOeQ8BOI6Eh6oB3pmH4p/GFjM7TZO1aMGtN4CRMbMQfgAoLrSWmz EU7KI8zb0LDsJL4KO89vqVXcSIRFXV8Sz6kjHcf8RWjzUahIK8JhiB9esql9ek4etnJ1 j0nNAkygh1GO3zv/QZM+kP8a8aAKsn3+TbvJ4ip9BKRsdhhp1fxznW7N3hSQFVrmpD/G iKRLoGMczDYjZmqrSCNaJwS1ztzAJXfz/mndCZMbaX1mFuXBTDl80XrgdAxoWzWR/eOY 1DcwXw5/fthU+qKpH19tNxPBmbojpskPdjSmHiSc+DJ+PUZAFe/T4fKGrHkJQ84LGkpa rAHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PRBmAB49; 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 c132si1916117pga.597.2019.01.17.08.21.09; Thu, 17 Jan 2019 08:21:09 -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=PRBmAB49; 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 S1729092AbfAQQVI (ORCPT + 15 others); Thu, 17 Jan 2019 11:21:08 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34116 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728675AbfAQQVG (ORCPT ); Thu, 17 Jan 2019 11:21:06 -0500 Received: by mail-wr1-f66.google.com with SMTP id j2so11749551wrw.1 for ; Thu, 17 Jan 2019 08:21:05 -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=aXeep5x7ETGFolIIRZohdiZMVYaJ9v3T7r4d/NZltdg=; b=PRBmAB49jSZAIg8mh24ykmR15+Iu/5sXiCDMYeUHOmk2GcLg8nlTpSwB1rA6YuJJxI epFkq42/j9nuo4wCqb5xVXToUmzoHuYqDdxWUAdnjYdcc6XVdS05wO8R/D0gGE/2ONoy y08UUdCde950E4kHPln95jtM7A5tntQFNA+BE= 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=aXeep5x7ETGFolIIRZohdiZMVYaJ9v3T7r4d/NZltdg=; b=reDb8s7H2xDqJQg3Dw9vVeoXdwzUvunSWmllhQoclao+Nd7l27YIe9KoSQH+8UZ3MZ wR92fWXfoY7D6zq3Gm6COf5RnUOXPSfY9THJe3vBnN1U6kOMCKCgvaAqhzf6uGK25Nff VHLxaChKkw//lALH/+Bj5zm0uIIO8vNuyifanZA6NWkT6fj4cDvMzn0aMUhR8QwZbO5z 2dLH/S1dBSou9VM6invvuacFBMtsJMAI3Pf421oXRx391qNfkuECNni06rjgjCL7UJbp YFhEND0Km0gZW3pZmD9r6afLmOEFPrSoM3NdG9bpTuGwrR7f4XaZtF0Q1V51/H47J3vC 4WTA== X-Gm-Message-State: AJcUukcA+gu6NnUagfFdDDqe7hpSv5PlxXaFIC1fyu4dbTgy8Manu7ev DuCRPNMwyx1a02KN3YsTCthNNQ== X-Received: by 2002:a5d:4d46:: with SMTP id a6mr12929529wru.28.1547742064717; Thu, 17 Jan 2019 08:21:04 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.21.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:21:04 -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 04/10] venus: hfi: add type argument to hfi flush function Date: Thu, 17 Jan 2019 18:20:02 +0200 Message-Id: <20190117162008.25217-5-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 Make hfi_flush function to receive an argument for the type of flush. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 4 ++-- drivers/media/platform/qcom/venus/hfi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index 24207829982f..0b3c4a2328e4 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -384,14 +384,14 @@ int hfi_session_unload_res(struct venus_inst *inst) return 0; } -int hfi_session_flush(struct venus_inst *inst) +int hfi_session_flush(struct venus_inst *inst, u32 type) { const struct hfi_ops *ops = inst->core->ops; int ret; reinit_completion(&inst->done); - ret = ops->session_flush(inst, HFI_FLUSH_ALL); + ret = ops->session_flush(inst, type); if (ret) return ret; diff --git a/drivers/media/platform/qcom/venus/hfi.h b/drivers/media/platform/qcom/venus/hfi.h index 6038d8e0ab22..a216914f88bf 100644 --- a/drivers/media/platform/qcom/venus/hfi.h +++ b/drivers/media/platform/qcom/venus/hfi.h @@ -170,7 +170,7 @@ int hfi_session_continue(struct venus_inst *inst); int hfi_session_abort(struct venus_inst *inst); int hfi_session_load_res(struct venus_inst *inst); int hfi_session_unload_res(struct venus_inst *inst); -int hfi_session_flush(struct venus_inst *inst); +int hfi_session_flush(struct venus_inst *inst, u32 type); int hfi_session_set_buffers(struct venus_inst *inst, struct hfi_buffer_desc *bd); int hfi_session_unset_buffers(struct venus_inst *inst, From patchwork Thu Jan 17 16:20:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 155845 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2159201jaa; Thu, 17 Jan 2019 08:21:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Sze8+dGUPcUNd03c3UiYXKnA0doGg5MM18X/68tj7C9mtx3NQiYEXXe9hFu5B0yn8w4wN X-Received: by 2002:a63:e516:: with SMTP id r22mr14219717pgh.256.1547742095596; Thu, 17 Jan 2019 08:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547742095; cv=none; d=google.com; s=arc-20160816; b=gRzTks3wujQm+imp/1G5We4ssUJsYhou8R31J1HrIZkx/NvfUvIeTs0hfTa6Y8j0Wl e4B9s8rA7cT4f+VIR95zu0IWn1Jdn4QlMi20Oaz6/94uSVKCBpN/6HLey7DV715hQCbz jJxGGrfkxmuUI9F5E5F+mSyONAD3+OjdX8ub8V2/O3HtoDjqNnlrw6HforS38BBP01p/ KklPt34Idp18EaaEhEZXzmFR70WNpUzJT2yJudL/d5bJxPwAesEe8DNINFm1uyU4qyLa CI5MVBdry3k+YME9MUHMqHVoPtcuRaecGfbl+mgt4OAPPq0ptn7lNWCcb0u2VcK+GTu8 GwQQ== 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=p9SShCCE56zaFl3EA7SWgswRXOkmYSJfgEKA8EbEbto=; b=cMTdEq5CzG5sYo3GMmEXw5USZ03WOpH02PfwlAFu3Vf9tNOqSu+6XfSjWFBAX0ZUJ/ txKNOk79Z8dD7MNG4G9F4Y+MdXz4j5WxAJRaDH2VRBUA3NxU5Xb0TKXaKioHLOVUUIGC 2qFC8icubCg+aJ5j0cJ+E2uxyQO5MHrncZhp3PZOsAaKVp48spfD23TyfcmNmt3LPEuR IeMgyDPhWZwjdKHFaTccnnAwHOcNvn7lh8p1rdF96t1TSijPI+3Ra1evaJTAX/kYYKAt DPvj+EgGNMjDCFd4I5rxEY6aUMg/0ALd6lW5h9r9UXEROrTmXkMvW9DRM14iEyVZg98r PbCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gb1xWu6l; 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 w27si1598547pge.182.2019.01.17.08.21.35; Thu, 17 Jan 2019 08:21:35 -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=gb1xWu6l; 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 S1729095AbfAQQVI (ORCPT + 15 others); Thu, 17 Jan 2019 11:21:08 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:35021 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729068AbfAQQVI (ORCPT ); Thu, 17 Jan 2019 11:21:08 -0500 Received: by mail-wm1-f65.google.com with SMTP id t200so1713312wmt.0 for ; Thu, 17 Jan 2019 08:21:06 -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=p9SShCCE56zaFl3EA7SWgswRXOkmYSJfgEKA8EbEbto=; b=gb1xWu6lUVHgGdfEFXpVfd+bzgNpcmapkF0kR/BtDDosirkCS38A6rKagnxFPSa1Cm SbeHBfJG5r7jhdYIBOu3iCPTJYBl82NoJt+oOMOEB1kCDBF9Uaq4euAlt7jEagDf94/1 L1I3/XeeTVG+WlgsyfK9YPryHzkGrpaH9/Kyc= 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=p9SShCCE56zaFl3EA7SWgswRXOkmYSJfgEKA8EbEbto=; b=NXaejEPQXZnpwgFxi12WCvCG/PJDLt+btyObDUZCFBoC3RJFF/8YP7uBWQ4l1EW/8z PIk1rUbOrEPBpSiQ/Y8DQHWPp+RTVny7mPPjREKY+DJkgY8lTKjk8DoVk+7LNU0uI+LA Blz1CyMtqZLfagZm7n3o+WuQivl7yCoT8hsainxguzW2PX6/ssIbOVfy8DoB1v3x4qVs y2BICkYCzCWDM3ixvDwK4FWnuOqkAppRJHA/nBc89cKY2Jdsg/vJhroGAX+Ufb5AVO6T mJyFBVFYldlrVL7LKFL+ReOyCx4xpQc0jX1QYio69uNqni5ojpDhlFoCieYJSKUwgXCG EmTA== X-Gm-Message-State: AJcUukceDMnqxG6uepCNExS5jBNDG5/fWhqVs5EYf06DDwgbWuvDDBeQ Vfx+YqwGqzJSdgDHEirKp6Lw6Q== X-Received: by 2002:a1c:864f:: with SMTP id i76mr12143347wmd.83.1547742066369; Thu, 17 Jan 2019 08:21:06 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.21.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:21:05 -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 05/10] venus: hfi: export few HFI functions Date: Thu, 17 Jan 2019 18:20:03 +0200 Message-Id: <20190117162008.25217-6-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 Export few HFI functions to use them from decoder to implement more granular control needed for stateful Codec API compliance. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index 0b3c4a2328e4..eaa82af9ec09 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -285,6 +285,7 @@ int hfi_session_start(struct venus_inst *inst) return 0; } +EXPORT_SYMBOL_GPL(hfi_session_start); int hfi_session_stop(struct venus_inst *inst) { @@ -308,6 +309,7 @@ int hfi_session_stop(struct venus_inst *inst) return 0; } +EXPORT_SYMBOL_GPL(hfi_session_stop); int hfi_session_continue(struct venus_inst *inst) { @@ -337,6 +339,7 @@ int hfi_session_abort(struct venus_inst *inst) return 0; } +EXPORT_SYMBOL_GPL(hfi_session_abort); int hfi_session_load_res(struct venus_inst *inst) { @@ -383,6 +386,7 @@ int hfi_session_unload_res(struct venus_inst *inst) return 0; } +EXPORT_SYMBOL_GPL(hfi_session_unload_res); int hfi_session_flush(struct venus_inst *inst, u32 type) { From patchwork Thu Jan 17 16:20:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 155842 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp2158863jaa; Thu, 17 Jan 2019 08:21:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN6zQsxMvvcbHq3MH4sfUK+9qJ2SsXJAg2LrKnUi6k9djCt1OzFOlOzRJ6gzvDFoEFKJEowU X-Received: by 2002:a17:902:ba8b:: with SMTP id k11mr15546271pls.177.1547742077598; Thu, 17 Jan 2019 08:21:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547742077; cv=none; d=google.com; s=arc-20160816; b=FWCAzslTzRC5Rn1SmlnwVZKfe0EPBmk/rC8WrG2zzLks1VEPZWOjYmwf7dOLJbZFts 7qjAhKPlzPk0MBYhoOJVIcx70BlW0KohnTmKJez4ErkTtW60mif5HQkQE2upT58xd72o FdMbVEx8wHYWrH2MwxmibKfTCAjQNdduNxZWDFk7Z4zsPJL7f+CatyhGfI0nuhTxpEHr bCH0two4Fyh06M1MrQ9EJ61t/WxhMNOaJjdlvVO703rpCAdfEFhmLZiYWziAg2OmVHne ZBZFn/TamyFBZgtMWGJCUI/05gGLj23oYvilsAOt6/kL5VQWkAlUIXXTsgCNh+N/+v5x Eb7A== 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=aHseR03KuZFgXQcyp39rH2RiSTCI0A/sA8/HyCR9OmI=; b=UMAKIUIIaqY8JtdMYfFPweK6a7khM4xU1LO2D+kidfyomWdYkG9+jmWnr7SVTWRvTg Q+IIS7D5/d17WSZ71XqcD7ZrLcyPSx/2r3G+dHzksH+rMAL/ylwGyUgqhUQK0Lx7GAqj /KywC2QqJW1IwUOwRDAlYy2o99zUVhiB8xlFDkAS6Vl0O4X4NI2GxPXWTzt/CJ93Gu/z f4mjTYiHLXiBW663hj4tDEkc4cfcvp8QMKUyT+vojo167H2bQgZs5Jlw6Fefx9GIBcLS p9bdCGQGAoHp6/JBXJ9qNHNhqJZqF+ImdpIyi6xk+6u5pXq/p/hzCcbnZhrtWhqOzkAx wanw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WhA+Lag5; 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 r17si1958855pls.380.2019.01.17.08.21.17; Thu, 17 Jan 2019 08:21:17 -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=WhA+Lag5; 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 S1729106AbfAQQVQ (ORCPT + 15 others); Thu, 17 Jan 2019 11:21:16 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:40914 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729194AbfAQQVO (ORCPT ); Thu, 17 Jan 2019 11:21:14 -0500 Received: by mail-wr1-f68.google.com with SMTP id p4so11676640wrt.7 for ; Thu, 17 Jan 2019 08:21:13 -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=aHseR03KuZFgXQcyp39rH2RiSTCI0A/sA8/HyCR9OmI=; b=WhA+Lag5SvO8FC2NrNMNujQMvxsP/XMPh4Yk/EVfTWU43kPdqeiCKqO9AuoEEsBrFK 3klZNo4hmA1AOlQvWfJ5MPj16vTdN/5KnAFQUu1LQEfJ/gk+79My0JClZ6JUYOTeV/RB /RX4vcslQoZYddkz8Ghpf1Edrq4b47zi582V4= 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=aHseR03KuZFgXQcyp39rH2RiSTCI0A/sA8/HyCR9OmI=; b=Ktw2lkJEKKabdio7ugZl1T4e0/8Z6HjH2etFcouhge8dM2lKngaH9N3j7wy8+sdpiq j2gNDexPkbMFim4lBNctQJ0pfh/lJyU0vdf4X31yveoTiyrZPY24caw/yGHnRLyKLerM FfqjfxM6S3yXBFxVmf5a5LzWiooP0UbjSEC/XsBIfeGJmAEdY/P3+Qr4Fm/F+LP9u7bb njuRkt6nrZEw3T3OtXe85YgflsQBLcCMxH0GhjA6kJFALH2l/ze+lL972b+XXo8D3o4O uOZ39M4lhxCa3yMQ3rVgRjuM0bc9N1F1qyV3OyafhM/yS+gVRngwI6Hn8AxtKcPfgbz2 hlIA== X-Gm-Message-State: AJcUukfIJ1MILIQAsiaX3egT95pLaQTN/KbHZO3C4mTUB0kNk+uZORvO 1EcrYNBKqhMBk9YUlstP/hbwkg== X-Received: by 2002:adf:9d08:: with SMTP id k8mr13422897wre.203.1547742072995; Thu, 17 Jan 2019 08:21:12 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.21.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:21:12 -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 09/10] venus: vdec: allow bigger sizeimage set by clients Date: Thu, 17 Jan 2019 18:20:07 +0200 Message-Id: <20190117162008.25217-10-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 In most of the cases the client will know better what could be the maximum size for compressed data buffers. Change the driver to permit the user to set bigger size for the compressed buffer but make reasonable sanitation. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 282de21cf2e1..7a9370df7515 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -142,6 +142,7 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp; struct v4l2_plane_pix_format *pfmt = pixmp->plane_fmt; const struct venus_format *fmt; + u32 szimage; memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved)); memset(pixmp->reserved, 0, sizeof(pixmp->reserved)); @@ -170,14 +171,18 @@ vdec_try_fmt_common(struct venus_inst *inst, struct v4l2_format *f) pixmp->num_planes = fmt->num_planes; pixmp->flags = 0; - pfmt[0].sizeimage = venus_helper_get_framesz(pixmp->pixelformat, - pixmp->width, - pixmp->height); + szimage = venus_helper_get_framesz(pixmp->pixelformat, pixmp->width, + pixmp->height); - if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) + if (f->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { + pfmt[0].sizeimage = szimage; pfmt[0].bytesperline = ALIGN(pixmp->width, 128); - else + } else { + pfmt[0].sizeimage = clamp_t(u32, pfmt[0].sizeimage, 0, SZ_4M); + if (szimage > pfmt[0].sizeimage) + pfmt[0].sizeimage = szimage; pfmt[0].bytesperline = 0; + } return fmt; } @@ -275,6 +280,7 @@ static int vdec_s_fmt(struct file *file, void *fh, struct v4l2_format *f) inst->ycbcr_enc = pixmp->ycbcr_enc; inst->quantization = pixmp->quantization; inst->xfer_func = pixmp->xfer_func; + inst->input_buf_size = pixmp->plane_fmt[0].sizeimage; } memset(&format, 0, sizeof(format)); @@ -737,6 +743,8 @@ static int vdec_queue_setup(struct vb2_queue *q, sizes[0] = venus_helper_get_framesz(inst->fmt_out->pixfmt, inst->out_width, inst->out_height); + if (inst->input_buf_size > sizes[0]) + sizes[0] = inst->input_buf_size; inst->input_buf_size = sizes[0]; *num_buffers = max(*num_buffers, in_num); inst->num_input_bufs = *num_buffers;