Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1061749pxb; Fri, 1 Oct 2021 02:36:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOAoYEm/AgB58IoataLAH9biNG2taG9Ym03Df6qmo7Va3T8WJdJ6FFzvNkZ7m26SdMXa5I X-Received: by 2002:a17:902:d345:b0:13e:27a5:58b5 with SMTP id l5-20020a170902d34500b0013e27a558b5mr8565961plk.79.1633081007760; Fri, 01 Oct 2021 02:36:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633081007; cv=none; d=google.com; s=arc-20160816; b=sKaFSZFBrylyLgSXAN1YibmiE358KX4FOpNJPx51cIffnGwLTdy1IgZlYAubT1D69F cmOLZmxdlSdmeR9NaSUIVmhAv03QHVoQcfyoVPRSNMU0XpQWT9h1/lPYykUtMaeA+THB MRBMOmsqlShUf7u0EEF3COxYPCM2H9MmodXUuh2Obw6A/PlUI1NpyW9TlkT2Z9tGY1kM o7mh0qvgu6JqgvtJD+o/qzdpDE9BE5k2hOhCfReokC/5CpNuIpW6TX1OSjWdQUg8K7ut MHmtGEh6r+OQYhChq8betlu+RSwS0SW6M4ZvLu/s9+Z0Szgry+h3h1l+S3RCTWenhZ9Y XdIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=W+UVQc398g+a9GL4OPwcV1qUDjZQzTXTU04h2fCYKmI=; b=l0H7yVm1AVm53MxGd+LyEuN+f3B+H0sPNFOYzlaiOp1OeYRatiLUZLf3ong58iYAhP flbHD4cuC3u0tw6zRADWu0g6uFHaz3Lo5qfCA6AD0HTGR7f652vh3zwD0UKG/CwcLPfM K8HprLi+dRJagA4+HSTZriEPBkDJmDB3jm93VVX8FOCOIT+uQ1e+D9ISaXz7Y3ThD4OG kLJLSr1QlkaRQtZo8WaMIFWKG+un5xflGCybV0GXOl9FobDS7E9Qb5UEfVv9HRNB87K9 stiAxQzQWabfvDMyWr8eAiMzMFs6T+5qpmBTdU1bgHPpTtMB53bC+qo5JhSTgyxhe0g9 bP6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=TfQb1KkQ; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y1si7434922plr.379.2021.10.01.02.36.34; Fri, 01 Oct 2021 02:36:47 -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; dkim=pass header.i=@chromium.org header.s=google header.b=TfQb1KkQ; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352997AbhJAJfd (ORCPT + 99 others); Fri, 1 Oct 2021 05:35:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352978AbhJAJfb (ORCPT ); Fri, 1 Oct 2021 05:35:31 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B58EBC06177B for ; Fri, 1 Oct 2021 02:33:47 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id u18so14479263wrg.5 for ; Fri, 01 Oct 2021 02:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=W+UVQc398g+a9GL4OPwcV1qUDjZQzTXTU04h2fCYKmI=; b=TfQb1KkQf8PS+pMpXOe1NiBpU1gmAKjlAdnTBwLgV2KSChRbX7b0OKQ3bV2I+YJ2J8 Xdiy/QfJ7lqw4GIz52qQERC38GFLbxDGd53eWmFSK7EdueFTMgU2EawhyBrDSZEf1AVZ y4wkff0JwzSNMgCwRueO5uOqRN23Pt8lG+5rM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=W+UVQc398g+a9GL4OPwcV1qUDjZQzTXTU04h2fCYKmI=; b=pY9lqLWT2hvVGQkmoah/5q7UR0K2vhYtedZb5+fJwmkViT4GmbR3MQCm3WZ5d7E7jl JsA+qMjEfj0pdrJK+0uRM3rlR+gtJnJmUJO4qlhxCtJ2p20WQ6/trEFb9LUeeoGNf70e yow2eF6wydSRvHm6OVCiOAnvyXny/4WzNQMH7YM5S5G2mtzKVNgynXD1HRJUYkXRlKUY E5wPjYdOm6RG9cGwEXftF11/C9IFRbprZMiyCr8QN4hoKr11IuYnYKVPBzG8dIkg9uU1 w7KbDVXjtPlyUwYMA6+GWQnlm75DFZc5NrsCFlIHhbXqAaR6IrE9hjm5P3Bm0jYmhYLK F2FQ== X-Gm-Message-State: AOAM532jItQ5beHqeF+2BMeUomd4hgqlbdifjze1LTPL/qlZ/F5Cn4g+ 2gzIool5823uKAhkloZCmDSoMQ== X-Received: by 2002:a5d:59a4:: with SMTP id p4mr10665705wrr.332.1633080826314; Fri, 01 Oct 2021 02:33:46 -0700 (PDT) Received: from beni.c.googlers.com.com (216.131.76.34.bc.googleusercontent.com. [34.76.131.216]) by smtp.gmail.com with ESMTPSA id a3sm4486549wrt.6.2021.10.01.02.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 02:33:46 -0700 (PDT) From: Ricardo Ribalda To: Sakari Ailus , Mauro Carvalho Chehab , Yong Zhi , Bingbu Cao , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Chiranjeevi Rapolu Cc: Ricardo Ribalda Subject: [PATCH v2 2/7] media: ipu3-cio2: Set valid initial format Date: Fri, 1 Oct 2021 09:33:43 +0000 Message-Id: <20211001093344.2812707-1-ribalda@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; def_pix_fmt.plane_fmt[0].sizeimage = def_pix_fmt.height * def_pix_fmt.plane_fmt[0].bytesperline; def_pix_fmt.flags = 0; -- 2.33.0.800.g4c38ced690-goog