Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C169AC433E0 for ; Mon, 15 Feb 2021 11:27:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87A206023C for ; Mon, 15 Feb 2021 11:27:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhBOL0x (ORCPT ); Mon, 15 Feb 2021 06:26:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbhBOL0x (ORCPT ); Mon, 15 Feb 2021 06:26:53 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF9C5C0613D6 for ; Mon, 15 Feb 2021 03:26:12 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8729C743; Mon, 15 Feb 2021 12:26:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613388370; bh=YerzmgVECSMksLa8JiaGf1YDOfr3U7CiiJeGQl5JAlc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GPJDozEWFVwSt7prZY32kYB7fJsZcd35nhb+VoAbAkf+LbbN+Pb5MkguvLfuRx8oZ 7MjMSdAtTHlclJUQ2f4x1VbRW05w5lPG53KVF8/UwosnQeaiZJfClrKToo+dmq+4eO Z6EtdIeLmtgH3rterSuJGHesR/5caiRXf1de4Pt4= Date: Mon, 15 Feb 2021 13:25:45 +0200 From: Laurent Pinchart To: Sakari Ailus Cc: linux-media@vger.kernel.org, bingbu.cao@intel.com Subject: Re: [PATCH 1/1] ipu3-cio2: Fix pixel-rate derived link frequency Message-ID: References: <20210215075742.12434-1-sakari.ailus@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210215075742.12434-1-sakari.ailus@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi Sakari, Thank you for the patch. On Mon, Feb 15, 2021 at 09:57:42AM +0200, Sakari Ailus wrote: > The driver uses v4l2_get_link_freq() helper to obtain the link frequency > using the LINK_FREQ but also the PIXEL_RATE control. The divisor for the > pixel rate derived link frequency was wrong, missing the bus uses double > data rate. Fix this. > > Reported-by: Laurent Pinchart > Fixes: 4b6c129e87a3 ("media: ipu3-cio2: Use v4l2_get_link_freq helper") > Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart > --- > drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c > index 6e8c0c230e11..fecef85bd62e 100644 > --- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c > +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c > @@ -302,7 +302,7 @@ static int cio2_csi2_calc_timing(struct cio2_device *cio2, struct cio2_queue *q, > if (!q->sensor) > return -ENODEV; > > - freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes); > + freq = v4l2_get_link_freq(q->sensor->ctrl_handler, bpp, lanes * 2); > if (freq < 0) { > dev_err(dev, "error %lld, invalid link_freq\n", freq); > return freq; -- Regards, Laurent Pinchart