Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6819852pxb; Wed, 17 Feb 2021 14:34:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4q4UHXtpDY/yQLuzW8sX/j7VhaD+vthJSvgOYzbiNhWBvtLZH14b3IVTYywWwCCombcyK X-Received: by 2002:a17:906:5846:: with SMTP id h6mr1039868ejs.521.1613601264359; Wed, 17 Feb 2021 14:34:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613601264; cv=none; d=google.com; s=arc-20160816; b=qwtTpte4yamHVNBQMMvc69A8LwqkFUR0uZnGTWrPD2zjV3xTFgLJDf1/GF9AvBc6lw FgCPnwB977ksszwQe78BTtJ7NmjrGGH1BN1qez7IuSgRnVsgKt21TqKrxjpbG9TDauzc 24IvM+MQNZtxWr+nhGsjzHI4M8afXaTG1uxEpgjvEQqrVkUhAWISEFJ6iqjlgd/hsKmk UH8J9BKz7J+xrupMd1rDZr44xGgsgJyZZFC5HJLPpK4cECHeZcrQTG1qUTwU8s3x0fFk 6EeIQb7CGV2Ef7p+qYk7vOl08Rl4ZZDQkiH4iVPlpCH0YPM0Z1jgzJV9ij4qcV4gWTe7 m/Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=WuwKDyyuRXWc7fqRJdkJjYCH0T2gnlyQjQvkLbody1M=; b=pU95ccTOR4+jdJrWl3JyHo91rXLlNYyGXprlev9L43MBp66mr+s76KcgwjALPVRzPU BIUzr9EPjqsSccY3wYhJKe6LGKR6MA/SSR5lZprWzs4LNIRvIjUT2dYC3zgpfQtLxAwp 3d7PGKuSkrX3cNgZ+FTmKUOgUmsXueC0joZfajnc5qKsZqEPue5urcgGqgl35aCEQ4Nc 7eipY1GofOxGhLRrQmhW1letm7dN+srxUQ7OoIg6jMOyWcKraCugVLVCgypgOJ2/LwEC 7LyOc1yrvLCLtY7WYBwt2Hv4DGDC7r7OSo/V+WWHNv4lK5WWKDh3FT9LQQeNTXOkGpga uizQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BXdFct9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c22si2421732edn.157.2021.02.17.14.33.53; Wed, 17 Feb 2021 14:34:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=BXdFct9I; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S232263AbhBQWMw (ORCPT + 99 others); Wed, 17 Feb 2021 17:12:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232779AbhBQWMv (ORCPT ); Wed, 17 Feb 2021 17:12:51 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7DEEC061756 for ; Wed, 17 Feb 2021 14:12:10 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id v30so378359lfq.6 for ; Wed, 17 Feb 2021 14:12:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WuwKDyyuRXWc7fqRJdkJjYCH0T2gnlyQjQvkLbody1M=; b=BXdFct9Ium+6cfGRin5RAJLPxE6vTrSXIzaqUdNu4F8+vJeuRchkghvrcNPVao3Oig ftGbZG6MALSjuYrcOVZ+VJ3+A8eK/HfpccCkq4JlrH9ovu2zGgiAC6VuH78NphxJRqnu 82gkfIo2G/Q5Qd2OQ+bERMoYxVEuHhxHzHq0aG0K+s1hAXIHbeVedecCdiOAYHVkjGE9 qSld7/vkHgEoFjrSvTslJLf3WWie7wpf41ul9eT/6lMKrmX1j4IvMh8+rdrJl4ZS5zAW lqzmIZm0oJ99ZlOeXi5CMCkpCPdBIbjQXtCr65wcs99ATPwbSY8hNGOrlbbG3t+lsfq5 fAzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WuwKDyyuRXWc7fqRJdkJjYCH0T2gnlyQjQvkLbody1M=; b=XvvDBcVtqs2d9cQEI0B3Yza5GnTpn0ItRv4nW7yzFWtylFINkuD0dcFJdCq/LZx+cO iCfMRKYdmyxOh4dqROZgxqY5GhCmW4M7kJNqIwl7DHU0nnd71zIHLBYXC2mYEgZPjteF 2VAM1YMrXqX+601U9VSPRNpIoBKAn35r7i+tlG6/P+2kt4ahIipI+4fpJEUxBnoj6HnU GxNfQTzxjKf58QD0jv7JN6XG4X6QB6qUNIFRNFTz9xhUuDLcRwwd67yKGjm4m6YO7Fjr wi83CS18RLWGRs9JXpX3CzL86R1i2U16pIOGfemxjEXy3NYC/0O+EbNk9ZHuNp3wt8Im nXSw== X-Gm-Message-State: AOAM532NiyXmo1WU8j4C/IllwAhJxVB2J9PFTuW0QoYOXEWPFMKMLzny e1jKPHUVpPBTghX1NmePDtmgiw== X-Received: by 2002:a05:6512:3cc:: with SMTP id w12mr559442lfp.650.1613599928830; Wed, 17 Feb 2021 14:12:08 -0800 (PST) Received: from localhost.localdomain ([85.249.43.69]) by smtp.googlemail.com with ESMTPSA id b7sm382926ljk.52.2021.02.17.14.12.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 14:12:07 -0800 (PST) From: Andrey Konovalov To: junak.pub@gmail.com, robert.foss@linaro.org, sakari.ailus@linux.intel.com Cc: todor.too@gmail.com, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, laurent.pinchart@ideasonboard.com, jacopo@jmondi.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/3] media: qcom: camss: V4L2_CID_PIXEL_RATE/LINK_FREQ fixes Date: Thu, 18 Feb 2021 01:11:31 +0300 Message-Id: <20210217221134.2606-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The first patch adds printing a warning in v4l2_get_link_freq() if V4L2_CID_LINK_FREQ isn't implemented (this is a mandatory control for CSI-2 transmitter drivers [1], but many sensor drivers don't have it currently). The second patch is the start of the work discussed in the "[RFC] Repurpose V4L2_CID_PIXEL_RATE for the sampling rate in the pixel array" thread [2]. I plan to send a few other similar patches for other CSI receiver drivers, and if the current patchset needs to wait for those before it can be merged, that's fine for me. The reason I decided to post the camss patch first is the patch [3] by Vladimir Lypak. The third patch in this series is the Vladimir's patch rebased onto the changes done by the second patch. By replacing getting the pixel clock with v4l2_get_link_freq() the second patch also fixes the integer overflow which Vladimir's patch addresses. So the third patch only needs to fix drivers/media/platform/qcom/camss/camss-vfe.c which the second patch doesn't touch. The resulting patchset is free from the "undefined reference to `__udivdi3'" issue [4] as the u64 value is only divided by a power of 2, which doesn't need do_div(). [1] https://linuxtv.org/downloads/v4l-dvb-apis-new/driver-api/csi2.html [2] https://www.spinics.net/lists/linux-media/msg183183.html [3] https://www.spinics.net/lists/linux-media/msg186875.html [4] https://www.spinics.net/lists/linux-media/msg186918.html Changes in v2: * Added [PATCH 1/3] v4l: common: v4l2_get_link_freq: add printing a warning * camss_get_link_freq() changed to take the actual number of lanes as the third arg vs the number of lanes multiplied by 2 in the first version * Fixed checkpatch warnings and bad indentation