Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2549468rdh; Wed, 27 Sep 2023 06:09:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHttnDMxSpvSZjoJ0Z/ee/hE3fcy3Qt3sbsNSJI1TtGi2p+IKyjgEALvgv6D0Rm+gdhxom1 X-Received: by 2002:a17:902:c20a:b0:1c6:349e:fa43 with SMTP id 10-20020a170902c20a00b001c6349efa43mr1377245pll.67.1695820194416; Wed, 27 Sep 2023 06:09:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695820194; cv=none; d=google.com; s=arc-20160816; b=RJjZlM62tRWUv2Rh+JhZMCRrUHCxsN+SHGbBUTNMFZCjVeL3QNvr4TS+aKgNhCjrN7 Q6kqO8ierLfebdDuXd4f/ZslQSA952O4b8r2Qe9onFWe+gJrSRus9X7j/Z0zRzs+QyW6 FvE2Q9E1fxXgmtYUNizn2D5SsCz0eEFU3iQIN3Mqaf52tAIptXd+ix++/QH20qgMzf5K h/EqPuKDda0XFkSIOYKuI+rGQz/cY6iYaBHuHZvPY4fg7Cm5u8zEJuhYgA8b1DNaPl2V O31r/EDLiHAigwx1A5s4LRVGKaQJ3LKekifDxCJlaQBI9sE9pTx3bq9WXtcchgcUqHuC OK5Q== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Jijfer/7eCNz5d5BIo7I4Bl8wL2YGtLqRbhXkOSybRs=; fh=cDUqnXXgk6BZYnrfyZi44NfVp3py2QYTEyoqa+6R26U=; b=b1Hlwo4qrT57RFRc4+gzscTKV4boHpakuAvk0tW84KEthYHg75kzRpYsfm4EHD2i/s kmqxHm/m4Fh0bEVMqFYdCeW2DyDQ5gvRBFXxuFGhSpvbrsrH8E0Ocsb1vaQkooGlXcvS g5tijHPta6lmtLjysIvLzpB0F1o7YW3+zEOqpjcMXBMMwERORafJeTQUP6qQKBl0Dxaw tMBPlItgATHmlikpzhfZm1ztUOWN47xgwxtOyv/U/YLYHfVB2sq/ZmKMewjiGx47OF6k ls7tq4t2VHV9u+B8cgOiHlQh8d9vgI9H9b654QhIweK/iHBXahcwwKQldt1P/AD0LIqv delg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PNGruEm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u7-20020a17090341c700b001c6240dec42si6822740ple.647.2023.09.27.06.09.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 06:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PNGruEm1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id ED08581E1B60; Wed, 27 Sep 2023 05:04:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231528AbjI0MDy (ORCPT + 99 others); Wed, 27 Sep 2023 08:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbjI0MDv (ORCPT ); Wed, 27 Sep 2023 08:03:51 -0400 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91412FC for ; Wed, 27 Sep 2023 05:03:49 -0700 (PDT) Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-32003aae100so8156374f8f.0 for ; Wed, 27 Sep 2023 05:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695816228; x=1696421028; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jijfer/7eCNz5d5BIo7I4Bl8wL2YGtLqRbhXkOSybRs=; b=PNGruEm1Wn5LDKELZWLrKId9OxS7CLwWMBOVfVFJHm9K1DPcUKpFEJNKR2cnDCCd9P P1Td0KsL2d68SPbdDy9MGs4sx1qOY2gsD352UwNOlez/MMLNLjDma1jMmEzafUDoEwka thAJfZjcA/vPHAbH7sPx7p35FiJEWGnVFygj5wTmMh448ozYMr0ccC/NQTg/ytFbuLN5 /jFs0/mgbI25s9GZAYSydiaPgRhXFnIGZIVxZWohXm7fmSEmGuBjup9DiRw3C3qO325u 0nSX502dr7y4gf/hVALsiFSe0MCEHwpp9eXMhrglYZ15OK14oMgiW3Ahi0YcBfzIwNiL hPjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695816228; x=1696421028; h=content-transfer-encoding:in-reply-to: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=Jijfer/7eCNz5d5BIo7I4Bl8wL2YGtLqRbhXkOSybRs=; b=cR67R8D7h0itEjO5rrPU1Jgdxye5p733GrelPnFN9dS2dp7O/rc55pU4NQn86d5sU9 KPtLLyUWqzXbNqFkenCxc4mXJ/kEkECF282yZXy9Xjdxs7qTK6nKsQz9Cp0aUq0w3hwt BxDo4xLAD15qcTEiMFsEDErpIpHmu4uqXuWDXuxPnZNUGxFQVm80lqp98h0RnZnuDa1P JhjK3czbZizEeGc463PCWuy2dBjqmDgsuqdE9VZK89pYnqOoQWMfa6eKu7DsqqKioVOx c4a1Y0IJhG7kGiEVVMiUyhtOljp3E4o4ZyzdXVL5xX+NBeUVoNiSoPjMcCwQib2i1z00 Il6g== X-Gm-Message-State: AOJu0YxaoH1KdqRzBJ13ATyIDTK/NHJPJyYYp7FSGeb5OZoXXJnqFtlk Y+b7c3hkaLwnQstRfW3pdQkk6g== X-Received: by 2002:a5d:5903:0:b0:31f:afeb:4e7d with SMTP id v3-20020a5d5903000000b0031fafeb4e7dmr1727898wrd.18.1695816227977; Wed, 27 Sep 2023 05:03:47 -0700 (PDT) Received: from [192.168.0.162] (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id m16-20020a056000025000b0032330232802sm6149752wrz.4.2023.09.27.05.03.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 05:03:47 -0700 (PDT) Message-ID: Date: Wed, 27 Sep 2023 13:03:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RESEND PATCH v6 17/17] media: qcom: camss: Comment CSID dt_id field Content-Language: en-US To: Hans Verkuil , linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, rfoss@kernel.org, todor.too@gmail.com, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mchehab@kernel.org, sakari.ailus@linux.intel.com, andrey.konovalov@linaro.org Cc: linux-kernel@vger.kernel.org References: <20230925154707.837542-1-bryan.odonoghue@linaro.org> <20230925154707.837542-18-bryan.odonoghue@linaro.org> From: Bryan O'Donoghue In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 05:04:10 -0700 (PDT) On 27/09/2023 12:42, Hans Verkuil wrote: >> + /* >> + * DT_ID is a two bit bitfield that is concatenated with >> + * the four least significant bits of the six bit VC >> + * bitfield to generate an internal CID value. >> + * >> + * CSID_RDI_CFG0(vc) >> + * DT_ID : 28:27 >> + * VC : 26:22 > This is 5 bits, not 6 bits as the comment above says. Which is right? Yes you're right I had "DT" which is six bits in my head when I wrote this. The VC bitfield is five. > >> + * DT : 21:16 >> + * >> + * CID : VC 3:0 << 2 | DT_ID 1:0 >> + */ >> u8 dt_id = vc; > So if dt_id is 2 bits, and vc can be more than 2 bits in the future, > shouldn't this read "vc & 3"? Hmm... val |= dt_id << RDI_CFG0_DT_ID; yes that would overrun otherwise. --- bod