Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4019921imu; Mon, 12 Nov 2018 04:35:14 -0800 (PST) X-Google-Smtp-Source: AJdET5df1Iiyp5XQGiVukC8GoqS5FoASL5iTqmjsKsg4g4dBEd6F4RL3W1oHbE54X1MQlHY9jbv2 X-Received: by 2002:a63:ef47:: with SMTP id c7mr678623pgk.386.1542026114631; Mon, 12 Nov 2018 04:35:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542026114; cv=none; d=google.com; s=arc-20160816; b=WgQdOb7MNYxCQLvVt5B9BdGyqEP2qCMfzCqzgzMbxvzrgo+VaaXW1/+Y0R9o1TDqA6 8XfCVFpY0EFbU7w9uLFJEc/OFcknQHLfWo0/unCVvO48roYc+JJvwTTm+JOuVr+Ioxqi 0TNQwf9p+iUdiQL7lreNwCVuSUCdEyeqcoIc2ZuhWRVl2+At+D/7A8+zMKpHo4YaygQQ RLt01E24FkbhhmvtePmECCjn+y9g5k9tGmlAPYWXmsPMmN+KNNzmYk3AkZdGPJBUt8Rk TLjaU5YHuL/Eh07CMzW9+9qLSafKfYLSGVnqh7f24tp7H3V5RDPy3D9ng7jYkmOCuMlV AUug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:dkim-signature; bh=G6IYBDhDYr+yEklxiFHBq+8KxoF6Te+KzWk97fTNd/k=; b=fOUw+eeEpivJUvHiknk0Eq5GQgD0U5UUAW6fwP3YJ7CU0/HuX5kAU7Ew/WSLGgCJRe uKzBQ93h3wqxyWTgWGbikTJaWv5kZ9hGvd2dxDO3g5b3sVDqRWfeYE2zDvqSR59q4O4R /9ydoEz+uzmw4+GSEd/frFqr6WtB5Ms2Puu0w+jqe5/KHNa3qBA+ZVJWxf4j+9XpwbFR i2DuAZs/obISieQcdlPRqr+PyTJekBPu3W7ClqVRrzfH8OZzLgDtPoebqO2xfl8eVAol RicjkQXYO/ZgUPW23iVweNXBARP8J/lqW8R3GMOAMhbSnZaRGdX6i6eKh67SyimvnwOq pPoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hr3gSfrq; 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 h34-v6si18249205pld.358.2018.11.12.04.34.58; Mon, 12 Nov 2018 04:35:14 -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=hr3gSfrq; 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 S1729505AbeKLW1T (ORCPT + 99 others); Mon, 12 Nov 2018 17:27:19 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:54756 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729133AbeKLW1S (ORCPT ); Mon, 12 Nov 2018 17:27:18 -0500 Received: by mail-wm1-f68.google.com with SMTP id r63-v6so8354457wma.4 for ; Mon, 12 Nov 2018 04:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=G6IYBDhDYr+yEklxiFHBq+8KxoF6Te+KzWk97fTNd/k=; b=hr3gSfrqK8oJJQUFFycr2XiQA6gFxIvsevIFvClw37Lz/NxsSdKQ+S2oIQ3d8b3oij VusJJG8sWhIWsRf2excdo/oniEOAdabCk9DhnDGYrbSY33sbMV+fql2dfSAzNc7ctwja kPmRkHryEOYSEjkR/Qm2vxY021+86wiuNN8tg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=G6IYBDhDYr+yEklxiFHBq+8KxoF6Te+KzWk97fTNd/k=; b=k/pKIcV0h88Akf3LfCeFSTqjcVXHMtEkcOU4ZOeLpicyLHTFZOdiizab4KrU5qPFoQ asbwzefFcxojl6hLpQvdeJXpuN8XqU6tlvUbOOj4pQYa3RZ5dk/qjKLMBypni/vdfx93 rcqFNxz13i0gG40HewLjcbGbxM/DvSVfZ0b6vICQ/rw7EIWXBlUPH4AzaZBhsgCETY8d 96pOfE13AzZiLguN17zAVmcinIJGYdo1bRe1cZh8R3JEFjvCUWMfAez2ZyhG1SgK/Tj5 76Xn53CPbVKMHpUUHdZSzqMy+BP78uSN0Xh+yDl5rKBlu8npLPA7Ry8XBl1qM07i7M6A 1wdg== X-Gm-Message-State: AGRZ1gLF36PAYqMfRChkHy8nQxFdEafb7tlHf3jCCk5Ju9S3SWwJW5md /ZfsaZV7PACsJ8UQ5zwANSci4A== X-Received: by 2002:a1c:eed3:: with SMTP id j80mr1348535wmi.58.1542026051693; Mon, 12 Nov 2018 04:34:11 -0800 (PST) Received: from [192.168.27.209] ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id z8-v6sm22072836wrr.94.2018.11.12.04.34.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Nov 2018 04:34:10 -0800 (PST) From: Stanimir Varbanov Subject: Re: [PATCH] media: venus: amend buffer size for bitstream plane To: Tomasz Figa , mgottam@codeaurora.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , Linux Kernel Mailing List , linux-arm-msm , Alexandre Courbot , vgarodia@codeaurora.org References: <1539071530-1441-1-git-send-email-mgottam@codeaurora.org> Message-ID: <8fe1d205-c5e7-01a0-9569-d3268911cddd@linaro.org> Date: Mon, 12 Nov 2018 14:34:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tomasz, On 10/23/2018 05:50 AM, Tomasz Figa wrote: > Hi Malathi, > > On Tue, Oct 9, 2018 at 4:58 PM Malathi Gottam wrote: >> >> For lower resolutions, incase of encoder, the compressed >> frame size is more than half of the corresponding input >> YUV. Keep the size as same as YUV considering worst case. >> >> Signed-off-by: Malathi Gottam >> --- >> drivers/media/platform/qcom/venus/helpers.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c >> index 2679adb..05c5423 100644 >> --- a/drivers/media/platform/qcom/venus/helpers.c >> +++ b/drivers/media/platform/qcom/venus/helpers.c >> @@ -649,7 +649,7 @@ u32 venus_helper_get_framesz(u32 v4l2_fmt, u32 width, u32 height) >> } >> >> if (compressed) { >> - sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2 / 2; >> + sz = ALIGN(height, 32) * ALIGN(width, 32) * 3 / 2; >> return ALIGN(sz, SZ_4K); >> } > > Note that the driver should not enforce one particular buffer size for > bitstream buffers unless it's a workaround for broken firmware or > hardware. The userspace should be able to select the desired size. Good point! Yes, we have to extend set_fmt to allow bigger sizeimage for the compressed buffers (not only for encoder). -- regards, Stan