From patchwork Tue Oct 5 08:10:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 515239 Delivered-To: patch@linaro.org Received: by 2002:ac0:890a:0:0:0:0:0 with SMTP id 10csp1794213imy; Tue, 5 Oct 2021 01:11:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+1IYvJC/uh0GX22X0p0eHPCArLhMhd5mBr/WNzcpfRFppr7j0X/cgp2CbY26r+x9WmUNL X-Received: by 2002:a17:906:681:: with SMTP id u1mr22724667ejb.499.1633421489027; Tue, 05 Oct 2021 01:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633421489; cv=none; d=google.com; s=arc-20160816; b=o3ATqeDIu02DwzgQlv4/2GEj35dgxm/h21zT8EdWWdqCN0qOHZuB1ObXyYF/a12K6L cyWIz+lREv9wPmc4YTsejIlpoMBaodyKJu7VmZHnjEYFDnqCisLAG7pavIdfAtCfC+ap CqdGt0llrWMHYg3nWZjOu3k9662LUmorJ5csBefbpmd/FJeWphgwkAnctqH17IEE+Trn zwjzloR5iPBacOymn2MUDmyp21LlqqAoyy9k0GAcprvCR2gE+LQa3i6QD3L5kV3rb6hu +kGhgMltzwb+tbX/EepwHVRj5sj0dpFnFxrdodDbEgWcSglfuAAFQkXdudsQBIC0z1Oa +Z2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NmNy3i7s7hkAq0MWmGrwqRoyEBYaUhWJOlMgIBRIabE=; b=Q1hzc4XW7zaUKq8cwSV97tuOO8F7+zNhh3RvHeupGmojj85Isb4oGcWG1uWF7XoWZg Cglku30m+umMjzCWxOhDBHw3lUkFNOwGdhYXcsjGrSrj8lRyc48wLqA7qiinmWuHk6xu DqnUfapv8yRvh5pGW7nVZ/zZySP8XL1Secv8DLBTLXjONPxbAp7OF/ZgG190cCvRly9K GFqiFkf+8bAmJW58iePyJ4qPf7O9EnZ43ehEXyn2LVnPhO/3KAUkbx9a1SF0Yf/+0ssj VUnRLSBTrszrmQKRMgiVlYiWO+unj4Q39EFV6Fl63iBrSSC5q4ZSgdXJ6FNd1JAOpSEu ihAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fRACUKHw; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ce16si24791463edb.634.2021.10.05.01.11.28; Tue, 05 Oct 2021 01:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fRACUKHw; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 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 S232511AbhJEINP (ORCPT + 17 others); Tue, 5 Oct 2021 04:13:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233321AbhJEIND (ORCPT ); Tue, 5 Oct 2021 04:13:03 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAADEC061745 for ; Tue, 5 Oct 2021 01:11:12 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id g8so75300951edt.7 for ; Tue, 05 Oct 2021 01:11:12 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=NmNy3i7s7hkAq0MWmGrwqRoyEBYaUhWJOlMgIBRIabE=; b=fRACUKHw5J6LBEjmv2sBLsFdyXBxC1V9ozedco1OMNDzAl2bKFx6eb3sF3bDF+dtZu nefergbhHmFMtaYDeK1LUm0ZOe1kISlmPKer5r1mhbds1hc6AnWhuM/296wWt0aK/zeS mQ0Y6owfsq534Ab2sc527Da0KqLgGKvY8tQTtxe5fAhtpkNuYr/YeTd0MtrOL1h7UZWb h8vNuf99nhynEXtUls0jIx3MADIdVXZ3R2AtGDuBAz26X+tYnT8RI9M0I9+keBJrQFju faPnfz9mW7zhXmyNeIt/l7V3jA7nc6m53qPaeXagQJKbkcKfTVlxWyhTtu2qSTkomP9B lZkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NmNy3i7s7hkAq0MWmGrwqRoyEBYaUhWJOlMgIBRIabE=; b=7gfF77hxXpGbvVtsmQsofUfw6wWOb/7AWdTxj3tRLfTXDsId4y963997O0aWkk/EFI qfrvcrNm+tFrPFQb2Oz72rUYX2PHNbb5IAVuD+0nKs3BbvpQkdSyUwCqjDM/H03Yz2aB pYmjdfk0IOCRhQlwzd4RB2eWzAdeG+69bVcAcZ6lnJdNkF/B6NFFt4o1iI2LgPCH2HCb KS2x4HYTgpOqIVN8L/UPvge2NDBFGQ0BNpx+VJ9LWD+Zrn6MHsKugUxx68KMlzgCwSpy fz/I3NYJak9MHJNAjeJd2MTQWyZ02Ai2Csfl5BlEypZIikMoLTz4llqBY9OJOZWAAx84 WIAg== X-Gm-Message-State: AOAM530fn/1WRe0mtrnYq201Y8JIubpOCw0ISSplZfHmnLKIq3IST/Hx vT3dF6t4vR5hhpw/EZeUxQDTLQ== X-Received: by 2002:a17:906:8e0c:: with SMTP id rx12mr23105415ejc.423.1633421471283; Tue, 05 Oct 2021 01:11:11 -0700 (PDT) Received: from localhost.localdomain ([84.238.208.199]) by smtp.gmail.com with ESMTPSA id f1sm3096258edz.47.2021.10.05.01.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 01:11:11 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, vgarodia@codeaurora.org, Dikshita Agarwal , Mansur Alisha Shaik , Stanimir Varbanov Subject: [PATCH v5 6/7] media: venus: helpers: update NUM_MBS macro calculation Date: Tue, 5 Oct 2021 11:10:47 +0300 Message-Id: <20211005081048.3095252-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211005081048.3095252-1-stanimir.varbanov@linaro.org> References: <20211005081048.3095252-1-stanimir.varbanov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Consider alignment while calculating NUM_MBS. Co-developed-by: Mansur Alisha Shaik Signed-off-by: Mansur Alisha Shaik Signed-off-by: Dikshita Agarwal Signed-off-by: Stanimir Varbanov --- Dropped changes in the patch which are not related to it drivers/media/platform/qcom/venus/helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.25.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 1f46a6f4456a..196a24892176 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -18,8 +18,8 @@ #include "hfi_platform.h" #include "hfi_parser.h" -#define NUM_MBS_720P (((1280 + 15) >> 4) * ((720 + 15) >> 4)) -#define NUM_MBS_4K (((4096 + 15) >> 4) * ((2304 + 15) >> 4)) +#define NUM_MBS_720P (((ALIGN(1280, 16)) >> 4) * ((ALIGN(736, 16)) >> 4)) +#define NUM_MBS_4K (((ALIGN(4096, 16)) >> 4) * ((ALIGN(2304, 16)) >> 4)) struct intbuf { struct list_head list;