Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1068008pxb; Fri, 1 Oct 2021 02:47:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtOE6jmBXE95TT9JRO3Oj4m4G4dlsD2CfAiAvE73IxgdneBfIc6kSm+vzj0/9gII7tEh2V X-Received: by 2002:a50:e1cf:: with SMTP id m15mr12970667edl.181.1633081669224; Fri, 01 Oct 2021 02:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633081669; cv=none; d=google.com; s=arc-20160816; b=zBqNVm9DDqLMG28wdZVpomQ6gU4QLqEn3awvvIX2OXGdU+qsD+I506SdZmPIiQ5T53 A8LoCsfZtGoDrJpNZA/F/JvxeTfuGyuFTZp7DWwyVXjv5WWP0weX2xrRhDfqlRfMIj4G Ryj9rYLrY9sPNKfZLqv36jKWGV/QguqNLtlpMvAupeuQyXU2kUjoehBBml6qIise2j9J mCdudJ14QIBnDdQLT1L2RXn0sdz/SjMriKqhBAqRmZPenVOoVpaEFFyXngO9tJs4rEyE vgMcSl0O/qaUvINB7uMDPQcQxsdZwU4gQBgLaH4Eq5vIocj3BWO+cPHqf0mPEvDx1XII AySg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=hjlFyhgI/uUq6XqkEBOXhnQrE3udg/hHoXpyszaPGas=; b=U6v0dM1SJw4bXsm9oXnEq8r4Y8sx1fsHcHTg8SWTWe4yLJGotMRVl/SD8NrBx6LkZw mrw44hs/K5JnEc67IS/g7ZraNh2akO0mVGFTm8KM62xdQh7dqaweznLhF9k6nDkK7Njh oL6xRv7MQKXVPXZbeAhaYAoOXiNNXDMPw4UBjiQQdXN/6pnaLlbhaqLtKji3oZFLxD4U 7q3llW7RJMzlL/+B5z6JXcCFZk8tz3tINLvvtNJcqOLpOZoI7Ye/Nvkhoey70+REXQTy uiSguSl+pVOb6zWZgvtXL44PARf/SkCQ3iNZA+Js4m2T9AW/TQvpKaDOmxYf5ktFoZmy 4/EA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pv1si3154388ejb.187.2021.10.01.02.47.23; Fri, 01 Oct 2021 02:47:49 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353210AbhJAJo3 (ORCPT + 99 others); Fri, 1 Oct 2021 05:44:29 -0400 Received: from mga05.intel.com ([192.55.52.43]:60521 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353256AbhJAJoR (ORCPT ); Fri, 1 Oct 2021 05:44:17 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="310927039" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="310927039" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 02:42:30 -0700 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="618981713" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 02:42:28 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 81B782010B; Fri, 1 Oct 2021 12:42:26 +0300 (EEST) Date: Fri, 1 Oct 2021 12:42:26 +0300 From: Sakari Ailus To: Ricardo Ribalda Cc: Mauro Carvalho Chehab , Yong Zhi , Bingbu Cao , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Chiranjeevi Rapolu Subject: Re: [PATCH v2 2/7] media: ipu3-cio2: Set valid initial format Message-ID: References: <20211001093344.2812707-1-ribalda@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211001093344.2812707-1-ribalda@chromium.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 01, 2021 at 09:33:43AM +0000, Ricardo Ribalda wrote: > The initial format did not have a valid size. > > Fixes v4l2-compliance: > > fail: v4l2-test-formats.cpp(723): Video Output Multiplanar: > TRY_FMT(G_FMT) != G_FMT > test VIDIOC_TRY_FMT: FAIL > > Signed-off-by: Ricardo Ribalda > --- > v2: Suggested by Sakari Ailus > > Replace number with calculation based on width. > > drivers/staging/media/ipu3/ipu3-v4l2.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c > index 38a2407645096..19c4fcabce0db 100644 > --- a/drivers/staging/media/ipu3/ipu3-v4l2.c > +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c > @@ -1136,7 +1136,8 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe, > def_pix_fmt.height = def_bus_fmt.height; > def_pix_fmt.field = def_bus_fmt.field; > def_pix_fmt.num_planes = 1; > - def_pix_fmt.plane_fmt[0].bytesperline = def_pix_fmt.width * 2; > + def_pix_fmt.plane_fmt[0].bytesperline = > + DIV_ROUND_UP(def_bus_fmt.width, 50) * 64; cio2_bytesperline()? :-) -- Sakari Ailus