Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp1617395rwb; Fri, 28 Jul 2023 12:06:52 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1LdPcNLt0vJ5dMMX5uvqqwVidSUWmeNaWpAtaeFGJqd2CSYjPthvU92odxCLP3Gw8tGEI X-Received: by 2002:a17:902:be0b:b0:1b8:92fc:7429 with SMTP id r11-20020a170902be0b00b001b892fc7429mr2464441pls.53.1690571211954; Fri, 28 Jul 2023 12:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690571211; cv=none; d=google.com; s=arc-20160816; b=rmTQf/kEB0eh15vClPG1Jqdd8JYTE7ps9W1hKvmzkHLT+zJagaJkZXLu0AQCME/39q tMwvfptDe75SHM/l+7wYL8PebrJVPuwrbsyB9Tw1rqxWPrQpfU/hWmqmz/rI+U0TZT4p bNpV91YfOy6id7kpvnrHy6XdH7dH4FerRj1wz4XcReg4ZFTK8e8/Oj7x+I49cKUEuIGy XFxMq25sYTN9iYJG9JtXgzbifrkDkkhYtTkzNlRH9r82IZhF1c7rdFGFa/zFRlHxwr2y QNAJnMLMzEdjBWW/z9l8rcNuMrrK1w8r0iKJM5NvSusypvxMhvwl4+x3jdwgUGGFK8Qm jr1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=J50FXHBVMY76jU86gdZA2hOUW6PaI5nolOLYf+ebiaY=; fh=nxTtIXp+YeUW0dy9b6eCXd9HvCzACw07E51P+fRCTrE=; b=CsLNxWbRj4YBo9MV/NqXL+4tNfrrbd1ybSIIpTNbHH2UvC1HLWFxcN6xswL80NKwe1 suXes9cnAWIWMWs1VX99l65cPpSSYSwJ7CwP1j190IqFWVHNbkLA7HixiBKlBHJ5rIGt 5r1kirBYwQJdgjDA/ShiNqgeq549bb74jYPm6sULgxOWnHNOIRd/pis459F3FlwNSfZX /hxMUqQV8SSxoTQlECJH1DxV3FdUjE+Xel2AiEbaGduHlDNo7EtNPw4yQLRi8KHmE7S/ cp4H/1YpirjZgOlcFzKvXeaVTDBPISyO7Y7JKgduRR3+lX0WFY8BAwS8o/1yxpGp4KVb VLfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZdqr3Gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jc9-20020a17090325c900b001b8bab3d5dasi2786060plb.108.2023.07.28.12.06.38; Fri, 28 Jul 2023 12:06:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZdqr3Gq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231244AbjG1Rzp (ORCPT + 99 others); Fri, 28 Jul 2023 13:55:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231395AbjG1Rzi (ORCPT ); Fri, 28 Jul 2023 13:55:38 -0400 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC0B73C1F for ; Fri, 28 Jul 2023 10:55:36 -0700 (PDT) Received: by mail-lj1-x22a.google.com with SMTP id 38308e7fff4ca-2b95d5ee18dso37017431fa.1 for ; Fri, 28 Jul 2023 10:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690566935; x=1691171735; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=J50FXHBVMY76jU86gdZA2hOUW6PaI5nolOLYf+ebiaY=; b=hZdqr3GqH1hXtYipXXVyx+LyNKzCHTAMWViYak7U5KMHQPctf/TwIHCPkL7dpLPh+G As6ugvww8cLF2tv6y3hy6wODKLWIoHdrJWEAwbOOW3n5krErLhgcCshds8/Rco4UgjCr yP96bDZWp7V2CcmmciIYHyS+ZKZPZNUS2+Lz3Say9pMKVj8ai67H+JBQfqXwyo7udZWU dQfObvns/GPXNF1NDDmIWgABDLbe1BMW9r4U/ZjpPRCwS62TKxfiEiKo6ox5sw0Wk9T2 oz7tYeA9TagpPie1B6/yfiYmOFlBh84v7oWVeVgiGBqTh91vRfwm56HLahj7NVt6qKPR 8dTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690566935; x=1691171735; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J50FXHBVMY76jU86gdZA2hOUW6PaI5nolOLYf+ebiaY=; b=Kkxb/qmxHPrGKsBxkc1qooLDYl8XW1wSZC/HxG9CfWy0ZMVPtjOqFe9I9l7/Gdx23k 75oBVmKD5SGBMF0eSixbXS6VcflJi3T1SOUT8ITt2n8UWDZ0VeG+stnslPVktSOqRMIA 2pYildT3KnYi3wkMwj6BEXfaERv/Dn26IBimCQ5E/umiu81RoNfPcawtAkv6OTOgS12r zEy9EqRfeS1MHO+pBoVDn+yHv1CSX6oeDN/pHoYFJVGQ7wTFG91MdcawvLcvoCJoRmJg xUdSqR3X3AgCm3Z/HCbGgHCQoPObxm8hNOPyHY2KVySlH5zEBCyNW5sF87ROwhRcto9e zrwg== X-Gm-Message-State: ABy/qLbu0v4WqtV6kAAZ6+Caert/8mv6x1nrXU5M6xPtC+HEtBxS64zU +3huxlx4Eb/LA1g5nBI/g+D/iw== X-Received: by 2002:a2e:9b14:0:b0:2b4:7559:32b0 with SMTP id u20-20020a2e9b14000000b002b4755932b0mr2156492lji.19.1690566934940; Fri, 28 Jul 2023 10:55:34 -0700 (PDT) Received: from [192.168.1.101] (abyk53.neoplus.adsl.tpnet.pl. [83.9.30.53]) by smtp.gmail.com with ESMTPSA id v20-20020a2e9614000000b002b9af8422a8sm1054627ljh.130.2023.07.28.10.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 28 Jul 2023 10:55:34 -0700 (PDT) Message-ID: Date: Fri, 28 Jul 2023 19:55:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 16/33] iris: add helpers for media format Content-Language: en-US To: Vikash Garodia , stanimir.k.varbanov@gmail.com, agross@kernel.org, andersson@kernel.org, mchehab@kernel.org, hans.verkuil@cisco.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: quic_dikshita@quicinc.com References: <1690550624-14642-1-git-send-email-quic_vgarodia@quicinc.com> <1690550624-14642-17-git-send-email-quic_vgarodia@quicinc.com> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg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bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <1690550624-14642-17-git-send-email-quic_vgarodia@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.07.2023 15:23, Vikash Garodia wrote: > From: Dikshita Agarwal > > Add helpers to calculate stride, scanline, buffer size > etc. for different media formats. > > Signed-off-by: Dikshita Agarwal > Signed-off-by: Vikash Garodia > --- [...] > + > +#ifndef MSM_MEDIA_ALIGN > +#define MSM_MEDIA_ALIGN(__sz, __align) (((__align) & ((__align) - 1)) ?\ > + ((((__sz) + (__align) - 1) / (__align)) * (__align)) :\ > + (((__sz) + (__align) - 1) & (~((__align) - 1)))) ? > +#endif > + > +#ifndef MSM_MEDIA_ROUNDUP > +#define MSM_MEDIA_ROUNDUP(__sz, __r) (((__sz) + ((__r) - 1)) / (__r)) > +#endif > + > +/* > + * Function arguments: > + * @v4l2_fmt > + * @width > + * Progressive: width > + * Interlaced: width > + */ Kerneldoc would be cooler [...] > +static inline unsigned int video_rgb_stride_pix(unsigned int colorformat, > + unsigned int width) > +{ > + unsigned int bpp = 4; Always? Konrad