Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1586569pxb; Thu, 4 Nov 2021 05:08:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyh74ctAQjiijy6g9vtCwo2mRG65M4dLdgG4hHrEhaxdpZw6KNV+FQLSDUn0lZuMvj8dAfC X-Received: by 2002:a05:6402:42c8:: with SMTP id i8mr281157edc.373.1636027713079; Thu, 04 Nov 2021 05:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636027713; cv=none; d=google.com; s=arc-20160816; b=Whmnt5Hwud3S3KKTsY07rZUbZbHFzENbJkIJRKcvTeb297tBKdv6MTlSLL3Sla2DBY v0On4euVgrYq9ntEeM0IMqqUFM+FHEcfo4atfm/xtkDvQLFpwFsFm/11/FcWr931id4Y nqqtlB4u/JZGt10K0OxteLIbK+Oldzqhi/NzCqblqVRHdAjfIM2SQW8auyHJ5+t9gVcK QCaEBfXvzGtGKZKpcLKXTEBS+7dSan7kndYKiWvdZvkYQepFpg/EpZxfLKbf3Ozvq+rJ gvOXgtsiHkGWjPLe2284DLcJiGw6rwiHsDej5ydz+1GHXst6H3QhKo1i1uM9HJTcO6KD g/Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=7t9C//hSE7KQcFodG5WB3uArzeWSItA9o5tooZ7tDko=; b=xT2uEFmkRbZZhxsC1AcOW1nCFSqD8O31+jt/qp8b3LZCfcb0Q8vTWmAWHB/NBd/3k6 BscogxcORoBkXSnk7sMPXpbOYhLrSfzYYqlr2fluBdqMyU8pmDNbaFInEU0RQ3tSbic7 xkHkLZdcbgQwzbSiUY0PNvm84C8VseWhxbWzAM1St85b8DB84xvN+P48a8rTcoGZI80h sEAZ4USycC9oUHYpW7uI3oSQunxpieXy3dAYnmHHlyWQTCNocpjxkG0P7U1y3XsRYOwi DKfnxg8c7Y8hnlPa/9k0zoaOrILZ8DwJtDJncTBbV9Fto/cQRb7vU+4s5RywX3gSbSTb iwYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=F7PgpKEy; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 11si7525247edx.477.2021.11.04.05.08.08; Thu, 04 Nov 2021 05:08:33 -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=fail header.i=@kernel.org header.s=k20201202 header.b=F7PgpKEy; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231558AbhKDMIp (ORCPT + 99 others); Thu, 4 Nov 2021 08:08:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:37104 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbhKDMIi (ORCPT ); Thu, 4 Nov 2021 08:08:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92F8661205; Thu, 4 Nov 2021 12:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636027560; bh=zKYFDeJdHKeabqGOf8jmwAC943X5J5YwD8rVjIfscQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F7PgpKEy+UMz4cDYjY3KLLDHSpq8r7AXvriKwsZt3evbRMGkw0J9tGJnGbgBJ+DJk V2x1evx6jrl6V3undp8zzaU0RLH83sW642RJ0jSFhw0wMnBr/LFV8Sn59qqpH3TqwO uge3yikL3/g6vStULK+rM/k29cdN/wuDCNDJ+C4MFO/krtOyKgZD0a15Qzzkqg2M31 Pc7xdmp2Ptpu7I8EZDRm3S7BVbtwKky51M0zmPdvDRu5crVyqZso0tWwhgMRAYAK28 ZHfdoU0mu8X+dRhXwVcIg+sM/E+fCPbWCKF0Qz3fCWIl4h4wvGi7ra0yaip9LH56np +3wLkj6GEw6AA== Received: by mail.kernel.org with local (Exim 4.94.2) (envelope-from ) id 1mibVG-005nHn-6o; Thu, 04 Nov 2021 12:05:58 +0000 From: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , Andy Shevchenko , Dan Carpenter , Greg Kroah-Hartman , Kaixu Xia , Mauro Carvalho Chehab , Peter Zijlstra , Sakari Ailus , Thomas Gleixner , Tsuchiya Yuto , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev Subject: [PATCH 4/7] media: atomisp: fix enum_fmt logic Date: Thu, 4 Nov 2021 12:05:53 +0000 Message-Id: <9f379a26b8651b7ed22be1da1ab9885fb1d1cfa1.1636026959.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Mauro Carvalho Chehab To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, the enum lists the sensor's native format as a supported format. However, trying to setup a pipeline using it doesn't work. So, exclude such formats from the enum. Signed-off-by: Mauro Carvalho Chehab --- To mailbombing on a large number of people, only mailing lists were C/C on the cover. See [PATCH 0/7] at: https://lore.kernel.org/all/cover.1636026959.git.mchehab+huawei@kernel.org/ drivers/staging/media/atomisp/pci/atomisp_ioctl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c index 8df052f6190d..30483a84ed80 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c +++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c @@ -775,6 +775,7 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh, struct v4l2_subdev_mbus_code_enum code = { .which = V4L2_SUBDEV_FORMAT_ACTIVE, }; + const struct atomisp_format_bridge *format; struct v4l2_subdev *camera; unsigned int i, fi = 0; int rval; @@ -806,15 +807,15 @@ static int atomisp_enum_fmt_cap(struct file *file, void *fh, return rval; for (i = 0; i < ARRAY_SIZE(atomisp_output_fmts); i++) { - const struct atomisp_format_bridge *format = - &atomisp_output_fmts[i]; + format = &atomisp_output_fmts[i]; /* * Is the atomisp-supported format is valid for the * sensor (configuration)? If not, skip it. + * + * FIXME: fix the pipeline to allow sensor format too. */ - if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW - && format->mbus_code != code.code) + if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW) continue; /* Found a match. Now let's pick f->index'th one. */ -- 2.31.1