From patchwork Thu Feb 18 17:16:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrey Konovalov X-Patchwork-Id: 384415 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp3887743jao; Thu, 18 Feb 2021 09:49:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzCbGy0MyOuVHiDJdD8HmlXCHAeobNiSmX0DHsui9QPRz9SgIbOCdZG57sEAd3TsG524Bq7 X-Received: by 2002:a50:c00b:: with SMTP id r11mr5260114edb.35.1613670539856; Thu, 18 Feb 2021 09:48:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613670539; cv=none; d=google.com; s=arc-20160816; b=U4lUVb9bX0YuxnzBiEF2/0lPsd7+Zye7NlsZzMuiwBpEEwmZb1j68DO0yHTgzR7LF4 FaXgv6dwM04C9iSfzi7NvovX04YYuw7iIZ+HYrkt4LYDmOR9ZYTbNcAk3UcM/8qh4mRK 7kontbQpTKk7Zb8KLG+baak1YbcK0QOxQq+e33f8OIH960IQ+c4wTau3FlM/vZMFcr5T YkZmvIM9QKiuVfN2CrcAJqX6Wynpr4LDXy2regb4MtF9i6bhq+hpphgJ/9cDAwYx16gg Xlb3QlaZ9CVBFaTQPu6fqLNPluPOrCfneKZRPDhmGHsSAhzRhoDizz/O1jgOVQsWXD38 N98w== 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=X79/FL7O601ZV52yVZ6z02kzQq2OSMITFkO3ohwlxz0=; b=VrY+ZM8mVxrqrBKCnoWG+C06mpiFv+XdXJQXm+XVvytohxI+6bawzkGSzrogeAHFx7 sSx3OjVnh6JKNOpeEdVBGb/GlGCVBR0LoePGXZluWZWaTBIozO2DyTGUfQq98WgaNJJA mAz5qv3h4V5rqgdnvEz5YK4Mzzbz2Yh7vbzQ6xO68xHsmZtPrXARt86NPApUdacuPr7Z vqcg6WE7QwLTawijONf1qvb3nJR2E2fNDoU2NQS7M8pP+i3ZQjTfh37aq921aDKLDkBq CYO9a2FLzN9ZI2eYOeBap7IvFzJl4H5uYd0TA5fSpgVXlm121P0EEFQlk18CkEYg64b+ 3xog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B3uIqaD2; 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 t22si4263288edd.360.2021.02.18.09.48.59; Thu, 18 Feb 2021 09:48:59 -0800 (PST) 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=B3uIqaD2; 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 S234704AbhBRRsL (ORCPT + 16 others); Thu, 18 Feb 2021 12:48:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233968AbhBRRR4 (ORCPT ); Thu, 18 Feb 2021 12:17:56 -0500 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5FE6AC061574 for ; Thu, 18 Feb 2021 09:17:03 -0800 (PST) Received: by mail-lj1-x232.google.com with SMTP id j6so6435847ljo.5 for ; Thu, 18 Feb 2021 09:17:03 -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=X79/FL7O601ZV52yVZ6z02kzQq2OSMITFkO3ohwlxz0=; b=B3uIqaD28vR4iHEhLwxCN3xwylIe+uY6SaHqX0Xdf8ay4gUV0Q+4H/RYxHe+zkVTRs bZGMD0afv+Hw8bnFjOMBVYwmPKZqAEoQLP2bx9VA0bYA7hbaO5jZ+Gjupt/6GIOV7ZTD LHWbKey4NLZu3qI2vFvUOUVa9oRrcPfFQmmfybgE5anEWhygFtOcPWTkM5haWTR3IavM /dQnMD9Z7YeJDMB0M7c1TilPx7AOOJlh3QPRetB69WvT6VpTs/76CgsHuzuDNimKVguk 4SfaiSDk27mvwW0RK7gicuEm6Br5LKlBeUn7u+v4CSk7KA97CDOmZHP2Cxgq3SnYsQy4 sEpQ== 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=X79/FL7O601ZV52yVZ6z02kzQq2OSMITFkO3ohwlxz0=; b=dNVv2x5C9ZpsPsN8E+Brn5LTtDK6UmX/luQ9DNPIPLOgLMtA1n3EtolYjKVclqsStW SwObICDX5V091RJPO64E1XLn4BMQDgrayCewvmCJRMtcFItQWkNPir4FoTJHtcQGRKws I+UfY5j6v+LW879m5o8PfOooemcmVJ9XeIYEX4G+GAh8E0+yjOU7hI+MJvctMbeIkQjY 4rXRNzKizibS7mSB7dpo7TLx7U3Q1E/0VLG0mlDMfunb+Z6Q1AT/Kgv01+TCaAQYPFmU rgnpM5EqENlR3XuQutodgOdzHDHhi3GBY9CrnmG2/JFOypC2zvO57N3zhEA1sT2ftJC8 HYuw== X-Gm-Message-State: AOAM531KZMpbTIbubyr1bdi857+3tAW6U7U9lC1qoiNF0cTOJM21cJS0 7ESLKtmRKKVPpJr6NjI+szOBVA== X-Received: by 2002:a05:6512:3607:: with SMTP id f7mr2813954lfs.245.1613668621899; Thu, 18 Feb 2021 09:17:01 -0800 (PST) Received: from localhost.localdomain ([85.249.43.69]) by smtp.googlemail.com with ESMTPSA id l19sm650670ljj.107.2021.02.18.09.17.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 09:17:01 -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, Andrey Konovalov Subject: [PATCH v2.1 1/3] v4l: common: v4l2_get_link_freq: add printing a warning Date: Thu, 18 Feb 2021 20:16:40 +0300 Message-Id: <20210218171640.18764-1-andrey.konovalov@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Print a warning if V4L2_CID_LINK_FREQ control is not implemented. Signed-off-by: Andrey Konovalov Reviewed-by: Jacopo Mondi --- drivers/media/v4l2-core/v4l2-common.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1 Reviewed-by: Laurent Pinchart diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c index 133d20e40f82..04af03285a20 100644 --- a/drivers/media/v4l2-core/v4l2-common.c +++ b/drivers/media/v4l2-core/v4l2-common.c @@ -469,6 +469,11 @@ s64 v4l2_get_link_freq(struct v4l2_ctrl_handler *handler, unsigned int mul, return -ENOENT; freq = div_u64(v4l2_ctrl_g_ctrl_int64(ctrl) * mul, div); + + pr_warn("%s: Link frequency estimated using pixel rate: result might be inaccurate\n", + __func__); + pr_warn("%s: Consider implementing support for V4L2_CID_LINK_FREQ in the transmitter driver\n", + __func__); } return freq > 0 ? freq : -EINVAL;