Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1137694pxb; Fri, 1 Oct 2021 04:28:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwF/CN7dCFXxQnBDRDy1YPEIyPFfhDpM61QSPRO/WcMQC5jI58j+SBfUlZ28Py//eo2YQlg X-Received: by 2002:a17:90b:3b84:: with SMTP id pc4mr12597300pjb.220.1633087690768; Fri, 01 Oct 2021 04:28:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633087690; cv=none; d=google.com; s=arc-20160816; b=URojPTp4GlaVSFyW7dySDf/pHm7XqdokqCtcOrIxlV3YdXxzU6c1JGeY2yOvc0PYUa x7qOsB5MDLzAq2AJQAFJUuAUiNiS/pK7rESqyE7mgLSQpthIqioLIgD5a9AxYZU9fV4f 6Kwpf267+EMnpMp5Uv2+byH4BEwKl5qNFnUM/s9JmBwz9kwHA7CgHB9QSfkIGtv/BVHp JLJaHq2aJ/XRb4LGM63SsRm5YWocaVVJUTG7/+Ez4+AsvrDlKdubH9E/2EFWMA30ZHuy 6bKf9TYDgQvCXv9TE6n5GhkKYnbscNXWx0vpZuDU6cXTu4slOeWE3RXBtrw/wDqFqcGG m9jw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CsIDAReufILY9VHFSQPnSoVNtKesEQVhGHmS/ZGk6bY=; b=zOX4Qg2a7noKE+u2Izb3fW8a4geB5fuB71cWBxhvkn1SP6AiEnccc++jGQ7+qX4nlD ViJgWQigIrN2RPiB/5FU6vLJE6WMerSPkzJ0JQtetTZqikyYpO0RqasCwoq9+s0hSXJA B+ZEnBjFJUEjz5O5m0+oKh4EFbGc52uF5APQJHr6b/o1zvoBjpeIpHuyjgVdVp3yHJd3 crHC4Yjsp+hcF5f7/RG9C8w1sZaBg7NQLC8FpcUGnHD4IMfkoiePDqhCnTnoFED0lsoL +Xjhr0nkwei6QDR1MsQ/6FZhZmvFxXObZMzGzFyk85C4F8sM+Xvbu9TTlo91fxgi64e1 k1hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=m92E2iai; 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 e17si3155799plh.454.2021.10.01.04.27.57; Fri, 01 Oct 2021 04:28:10 -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=m92E2iai; 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 S1353873AbhJAL1Z (ORCPT + 99 others); Fri, 1 Oct 2021 07:27:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353767AbhJAL1L (ORCPT ); Fri, 1 Oct 2021 07:27:11 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6585C06177C for ; Fri, 1 Oct 2021 04:25:27 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id w29so14948010wra.8 for ; Fri, 01 Oct 2021 04:25:27 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=CsIDAReufILY9VHFSQPnSoVNtKesEQVhGHmS/ZGk6bY=; b=m92E2iaieXtNEzgumVB8qGx9lnexFJr6/tTdH01cdjZe4OAJNypKDGGvk5oi+zPkLT Qhkqhp31Y5/eciGuA8fGat/X8YZURnJYGkWgbQcoD/fJNchmygovG6XMtQKOn01hAscQ 2U+k5J9p6eGmmfeLOnYpfTEkPGpm0gqFcYcXI= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=CsIDAReufILY9VHFSQPnSoVNtKesEQVhGHmS/ZGk6bY=; b=i+y5bMZLWa87Q31fWYS4TFD8blNdE3P4K3JMikKSNtREq68tLhKJrHkI1bBooMSpS/ 15TkE3ZhpUxH1NegnkyT/5U2WZtf6sonZlVsKMQIVp6BPOM3D75RRtMdbET25t0tknqC D0ED0zuk4VXBzuhow2Dv3i6pokUMLfDjp9AGxWgcaBTydJIF3g5M+woADGn6W9+bhUFM aUyCckwW+Kp7naQBghc/n5s7iXv2F6YzwXJKVxPzHQuFmtEGkz7XOHpKXYGZYjmQ028e xCMLzAQw+D9f5IHkpp6P+ruUEYQjdCZErIVZQykdi52C9883a2Y+xWUpHNyDD2zNNsAb 0kCQ== X-Gm-Message-State: AOAM531PvESmjBtX3V+ztdvOsKKercEiNkfwmpuXL2NH/onByH2BxEeN /lpAlKpsdmMPX5nGXUV2X3MMMQ== X-Received: by 2002:a5d:6847:: with SMTP id o7mr11761494wrw.213.1633087526228; Fri, 01 Oct 2021 04:25:26 -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 x17sm5530958wrc.51.2021.10.01.04.25.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 04:25:25 -0700 (PDT) From: Ricardo Ribalda To: Mauro Carvalho Chehab , Yong Zhi , Bingbu Cao , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Chiranjeevi Rapolu , Sakari Ailus Cc: Ricardo Ribalda Subject: [PATCH v3 3/8] media: ipu3-imgu: Set valid initial format Date: Fri, 1 Oct 2021 11:25:17 +0000 Message-Id: <20211001112522.2839602-4-ribalda@chromium.org> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog In-Reply-To: <20211001112522.2839602-1-ribalda@chromium.org> References: <20211001112522.2839602-1-ribalda@chromium.org> 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 --- drivers/staging/media/ipu3/ipu3-v4l2.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index 38a2407645096..1813bb29e362b 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -1136,7 +1136,9 @@ 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 = + imgu_bytesperline(def_pix_fmt.width, + IMGU_ABI_FRAME_FORMAT_RAW_PACKED); 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