Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp552856imm; Wed, 10 Oct 2018 00:02:18 -0700 (PDT) X-Google-Smtp-Source: ACcGV61qIvvVCpWJyOtJcmvmUt8GA3kaadYnGv07ymCBteifmHABNO6Fbk19wIsG4h+4uMrtZ0Ro X-Received: by 2002:a63:e818:: with SMTP id s24-v6mr27590220pgh.90.1539154938340; Wed, 10 Oct 2018 00:02:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539154938; cv=none; d=google.com; s=arc-20160816; b=wFaRnWBuzD/jckfFETkqRSkoNMJZ0XN9hu+cs6NlNRtxo1KSqd+skqx9fyuVDaVZwD cxXhUFEbjrZIsNER4zqxrsj7iGmmwL/9T2P4Y8uYEA90/dMKaUTqdDJ7bm7DOu6Mmgz4 mTVWB59DhU9XRYhz9RaKXXHrZzS4vwZx9QsM6/p1p5/1V8bsEBMRxUKbMdJ0sI7el9oC VPyV18Z5O9vlOd5XBTlS2H0MQN1id06YWMnAJALftljdiKtYche5f+VVqN8sxHEsFXaI l5EU+qHt1zK3sSuciI3B9lUq4m8y9TwneX60HJU1Os9sQSaXpBW8+V2+iSbY2Uan58ay vouQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JjelkAhZUIa8JtIhWp5qbOXYTr7fijM7hOHufD5Ksp8=; b=TP7ih8VpOYxKrYnPY3tlQVapwHaN6LhhVd39zfqp9IJ0lG3FumWoA5Qlba5KC1Ra0s Y8DZ7R+aaj65lp5+nJ76lxEvaSYYJxHI44DFkby3bD1mTlKbw7QZRxZCy0VqDUKWTHkH 0kg87iwgss6amXrM8eHMZ3JOEcM+0tVpqy/7b5C/p0AnnLcEQejLKw5ZV3oueozO3iun LdR+QJbi9XEadmKn+u2CgZWdcIzDvFwB8S2REpd3JE8YFr9RKn4giyonDcIGMkQWmkNF /mKUYaEMRzGrEBYoeZw277Z5xh96gU0g+sDAaPwJc2ul6vH4OYjS2jKN8V2GrXoLT2Km tefg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W2dZiF8c; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v189-v6si21840143pgd.429.2018.10.10.00.02.03; Wed, 10 Oct 2018 00:02:18 -0700 (PDT) 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=@chromium.org header.s=google header.b=W2dZiF8c; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726616AbeJJOWX (ORCPT + 99 others); Wed, 10 Oct 2018 10:22:23 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:37299 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbeJJOWX (ORCPT ); Wed, 10 Oct 2018 10:22:23 -0400 Received: by mail-it1-f195.google.com with SMTP id e74-v6so6515450ita.2 for ; Wed, 10 Oct 2018 00:01:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JjelkAhZUIa8JtIhWp5qbOXYTr7fijM7hOHufD5Ksp8=; b=W2dZiF8cU9pxrSX8HQcpf7GMx3CaGcOB11lEPtcH+haCDIDGu8NCUlddNhJiTlWnBw +siU57Em652b+hGoqn18BKB7h/VPmY0PVtdO6QqiF/qf1UWwK3BmtvaRmRu93NUXmV64 W0/dH9FQnYfjNfMbPpmZKgeQx4v+WQD2tfxts= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JjelkAhZUIa8JtIhWp5qbOXYTr7fijM7hOHufD5Ksp8=; b=PPQ5xmo5WCGEyg8NJOwamijw1mEOKTdLtjYomnXMJgOd0Esqh3Lzigb/soCCla4pZ7 oBv8lF6FwC5Af+C/tOV+zQlp/3RYSI3u6d2PGiEooNfDHE7BcUF2KZP+kipCG+oJAQ+/ GnvHRAnbuguWY9MuuryAuNxNF3pPRluPfkN0X3lp8zuNw60FIF5zcfid2srOrRokwR0g GQKnIciUXPmnRTXNt0Q9Tj+0UuA66wzxImi7usjcXQkhKnJhVihAKP6Czmt7VyBK+SfC ObFDzPF4eXZwp8RR6azpC0z6ZXyNUWf4rqaALx7CE9gYvN3jGER6SSOeJbMCxpK3wRB8 wOyg== X-Gm-Message-State: ABuFfogFM6oFH+npafTvWg6H2+6h4+6TTHseETMLt8fAgviYu3oDPUOx SMLHrAnU3y9UtYE8WancK9rljF3NwnA= X-Received: by 2002:a05:660c:18d:: with SMTP id v13mr4360729itj.135.1539154897400; Wed, 10 Oct 2018 00:01:37 -0700 (PDT) Received: from mail-it1-f180.google.com (mail-it1-f180.google.com. [209.85.166.180]) by smtp.gmail.com with ESMTPSA id i129-v6sm7530507ite.18.2018.10.10.00.01.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 00:01:36 -0700 (PDT) Received: by mail-it1-f180.google.com with SMTP id l191-v6so6505153ita.4 for ; Wed, 10 Oct 2018 00:01:36 -0700 (PDT) X-Received: by 2002:a02:91c9:: with SMTP id s9-v6mr26489151jag.104.1539154896080; Wed, 10 Oct 2018 00:01:36 -0700 (PDT) MIME-Version: 1.0 References: <1538996944-15042-1-git-send-email-vgarodia@codeaurora.org> In-Reply-To: <1538996944-15042-1-git-send-email-vgarodia@codeaurora.org> From: Alexandre Courbot Date: Wed, 10 Oct 2018 16:01:24 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] venus: vdec: fix decoded data size To: vgarodia@codeaurora.org Cc: Stanimir Varbanov , Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , LKML , linux-arm-msm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 8, 2018 at 8:09 PM Vikash Garodia wrote: > > Existing code returns the max of the decoded size and buffer size. > It turns out that buffer size is always greater due to hardware > alignment requirement. As a result, payload size given to client > is incorrect. This change ensures that the bytesused is assigned > to actual payload size, when available. > > Signed-off-by: Vikash Garodia Tested-by: Alexandre Courbot