Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2434887rdg; Mon, 16 Oct 2023 04:41:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCzMuNRk1LPRp4eGzdyX19LWXWFucul5u7krTFqUlxqw3SuiN7hvF2RCd6g3/+a/VXenri X-Received: by 2002:a05:6a00:1941:b0:692:b429:390 with SMTP id s1-20020a056a00194100b00692b4290390mr36220086pfk.29.1697456479928; Mon, 16 Oct 2023 04:41:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697456479; cv=none; d=google.com; s=arc-20160816; b=npz8rl9Eol2FQBV6TOmQ6GXQMRNIDKaVZM/zbP+JFIHiKQWRXUmUZLBtKEz26bYncX TNDsSt1kLIvoqjJzroB2QzgLoajGcOIBmQWVtE41uU2RkvfEqBSqN3HVsjdTAGKbsKcD mzngzOh9MkcAz5SLCDCYtaVh6zBn5m8pBYdxhf5BYWjQu4klGf48pOeSRSV8A2j5f16p Lpyf8+Y1yKekDz0/LIJ621SWPD2HmVRrmsA+7EDrqVmtWEDMsXa+iMUg01UAxIwAMbsG WVPDvwHje/AMZnbq2ldHniHg6dkLZ8eqdoH3jn62vlvRb1sx2ordWPR3FwfsA3FvjcUB CO4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=cQ3QEJbOIy8jNd6aaixKUo0t9Hgxg01xJR8PDB2i6sM=; fh=xgQPTrgLZQHuZj3y2k2Oo1btQSWdIEXXpp2hdMBXZPA=; b=JYlUqGf3lAGBOq23tSVeslfgc5+0aIx/jWeSVc8wXncaj760n4lcKJSPmSjaW3/0YK +D0ETC+XE8TYtsxqVW+O3vFFjZp7U3nlW9l0Y/z+x3eKSzei4Q9fdu1gp7vCDczb75Mn lyzu+rFzTUr8C6jQ/nM8k8OHcugzvieeiTXens5aBJnjF1D521kiJWbxsMYchWhrlCnV YrTVNYsqLt4B0C8jEIXCsOOvGM5zzN4DNJ7eHkf8yx5THQ/MxnisDXNo+AwgyMbgLI9K 0NcF1m4pq6oG5vLVQcS6K4eAR9qGITNWc0N/EI/MBWdBZ3+cNyRr24zVhHdySVlW2Taf d3bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id l62-20020a633e41000000b005b11e5a69f8si5424875pga.531.2023.10.16.04.41.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 04:41:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 418EF8051176; Mon, 16 Oct 2023 04:41:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbjJPLk7 (ORCPT + 99 others); Mon, 16 Oct 2023 07:40:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231484AbjJPLk6 (ORCPT ); Mon, 16 Oct 2023 07:40:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99AD4DC; Mon, 16 Oct 2023 04:40:55 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57B50C433C8; Mon, 16 Oct 2023 11:40:52 +0000 (UTC) Message-ID: <98297bfc-ab81-4bb5-acc3-619fdf879276@xs4all.nl> Date: Mon, 16 Oct 2023 13:40:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v10 0/8] Add StarFive Camera Subsystem driver Content-Language: en-US, nl To: Jack Zhu , Mauro Carvalho Chehab , Robert Foss , Todor Tomov , bryan.odonoghue@linaro.org, Rob Herring , Krzysztof Kozlowski , Conor Dooley , Greg Kroah-Hartman , Philipp Zabel , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-staging@lists.linux.dev, changhuang.liang@starfivetech.com References: <20231008085154.6757-1-jack.zhu@starfivetech.com> From: Hans Verkuil In-Reply-To: <20231008085154.6757-1-jack.zhu@starfivetech.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 16 Oct 2023 04:41:16 -0700 (PDT) Hi Jack, On 08/10/2023 10:51, Jack Zhu wrote: > Hi, > > This series is the v10 series that attempts to support the Camera Subsystem > found on StarFive JH7110 SoC. > > This series is based on top of the master branch of media_stage repository, > which is tested with a v4l2-compliance compiled from the git repo > (git://linuxtv.org/v4l-utils.git). I get one smatch warning: drivers/staging/media/starfive/camss/stf-isp.c:122 isp_enum_mbus_code() warn: unsigned 'code->index' is never less than zero. And I also notice that there is no TODO file: staging drivers should have a TODO file explaining what needs to be done to get them out of staging. I'm curious to know that as well :-) It looks like there is a lot of additional development that can be done, since most of the ISP parameters appear to be hardcoded. I also notice something weird in the compliance test output for v4l-subdev0 vs v4l-subdev1: > Compliance test for starfive-camss device /dev/v4l-subdev0: > > Driver Info: > Driver version : 6.6.0 > Capabilities : 0x00000000 > Media Driver Info: > Driver name : starfive-camss > Model : Starfive Camera Subsystem > Serial : > Bus info : platform:19840000.camss > Media version : 6.6.0 > Hardware revision: 0x00000000 (0) > Driver version : 6.6.0 > Interface Info: > ID : 0x0300001c > Type : V4L Sub-Device > Entity Info: > ID : 0x00000001 (1) > Name : stf_isp > Function : Image Signal Processor > Pad 0x01000002 : 0: Sink > Link 0x02000014: from remote pad 0x1000010 of entity 'cdns_csi2rx.19800000.csi-bridge' (Video Interface Bridge): Data, Enabled > Pad 0x01000003 : 1: Source > Link 0x0200000c: to remote pad 0x1000009 of entity 'capture_yuv' (V4L2 I/O): Data, Enabled Here it shows the Media Driver Info for v4l-subdev0. > -------------------------------------------------------------------------------- > Compliance test for device /dev/v4l-subdev1: > > Driver Info: > Driver version : 6.6.0 > Capabilities : 0x00000000 But this does not appear for v4l-subdev1. I can't really tell why it doesn't show that. Can you debug a little bit? The code is in v4l2-compliance.cpp, line 1086: ent_id = mi_media_info_for_fd(media_fd, node.g_fd(), &is_invalid, &node.function); The mi_media_info_for_fd() function calls ioctl(media_fd, MEDIA_IOC_DEVICE_INFO, &mdinfo), and that fails for some reason. It could be that media_fd is invalid (would be weird). This could well be a v4l2-compliance bug that you hit with this driver. Regards, Hans