Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp348690rdg; Tue, 10 Oct 2023 12:03:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGqCpDxnn5RaZkxPW+JvLQnIlaWVULblKCZbYSvcHPuy+HDf/AeaKEmdrOkBe1sbgDoHn3o X-Received: by 2002:a17:902:ea0c:b0:1c6:3157:29f3 with SMTP id s12-20020a170902ea0c00b001c6315729f3mr19606621plg.36.1696964586572; Tue, 10 Oct 2023 12:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696964586; cv=none; d=google.com; s=arc-20160816; b=uT1LrTFn5DvT00IMAzSe5XtIRgXBo4N8SkTKgzHXhpUEuHL9cv18s/ocTEUbXHPIKO LreZRt140/uYHePLNrNq/dkOMkzrIzzliDlnvIVXd1/92pPBccU1+rpx+K3DxGW5IlQk 3SK5PgUvAVXTrZF4iND1gctKnGdZjgpa+QZ6Y7R2oXKbQkem9v8xylDWJ2yDsTd3qip4 +fFbku0mCfP8NW15SJr0FkRGsZClkYb+IHSWt1Kl/csB+rImSZcnd0kxHAp1kT28+u5Q bJUn0sv1bIwU7AeT56SHC5duT6ZabY9/ejczfAUoxTpW/8YR9Yk9lJRN5Rw0JIP6ZUKV +n0A== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TTkwciBPHpkHQim+hrwizd7vUiFtamHK2mlyN+IwYbc=; fh=vVRr6vgcRt21Ib+d9mlzW0U53TgDYGT6HCgDwtmkutI=; b=NOhWXAoRn701wkCUq/vPb/amUZsTSKxAK9Gi+qLb2OM/UeHWv/y2a8/FHhz5MdFa/c g9ozDQs27bNXKZKHt4wHEfBT+XEtnXi6TA0Zk6S/nLuwWqSZRwtjExwTbOsJMw/JgVLu oim43d3kCvBA4ueF8Lid8LuMSKjKcghyKV/WLVMjk3x8cwtTQH2mU381R2DKcv08Ud3h qExciiw0XzkhfxQPPny+jUrEmz80qp7F2TFhpRX3olLM8SPtiKuQ5O8FQi7KwN64SggV EI0BgSez5A1LlMEjwA6zv9fi2AMEEBSJ8rl1rKWf70MyJCzI6dR7R6wxfNqEN7aODr3J HGTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gVfmVRcA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id l10-20020a170902f68a00b001c60ee79b6esi13187981plg.0.2023.10.10.12.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 12:03:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=gVfmVRcA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D7D9681BF2C2; Tue, 10 Oct 2023 12:03:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbjJJTCx (ORCPT + 99 others); Tue, 10 Oct 2023 15:02:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234162AbjJJTCw (ORCPT ); Tue, 10 Oct 2023 15:02:52 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F5DB93; Tue, 10 Oct 2023 12:02:49 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPSA id 27C131BF208; Tue, 10 Oct 2023 19:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1696964568; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TTkwciBPHpkHQim+hrwizd7vUiFtamHK2mlyN+IwYbc=; b=gVfmVRcAbr/0CVhMqNzg/qc+f+gFVBT0enuSrYZHcwfVH+Ae7LueB0d4xTSd4oYLyliKNk fHG9G12xn3bDRMwwsAoVfmH/miao4/uQYgWD/PpoLzHDlD4rFyeYj4ibqSjBNZWkMymQS4 gOzG5sqZG4ZLYY7w3jiKVJCzh7wgm5Iwe0fc9q8Wu/vndVwMOIZAQmjVyJF2xILgXwh+iH NTIsVAvamhqEzFj0DMKc7E1ImI5hJofY7APMzK7uMmzKCK1bCNLdbxIuSAX+RueO20ZJeb KXm9Y1hfIybJzTN+iwo/O3Ch7RnENb4bpAZl119eSLY+DCJcdaQdh9JRK7yoWQ== Date: Tue, 10 Oct 2023 21:02:42 +0200 From: Mehdi Djait To: Laurent Pinchart Cc: mchehab@kernel.org, heiko@sntech.de, hverkuil-cisco@xs4all.nl, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, conor+dt@kernel.org, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, alexandre.belloni@bootlin.com, maxime.chevallier@bootlin.com, paul.kocialkowski@bootlin.com Subject: Re: [PATCH v6 0/3] media: i2c: Introduce driver for the TW9900 video decoder Message-ID: References: <20231009022122.GH5121@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231009022122.GH5121@pendragon.ideasonboard.com> X-GND-Sasl: mehdi.djait@bootlin.com X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 10 Oct 2023 12:03:04 -0700 (PDT) X-Spam-Level: ** Hi Laurent, On Mon, Oct 09, 2023 at 05:21:22AM +0300, Laurent Pinchart wrote: > On Fri, Oct 06, 2023 at 06:25:27PM +0200, Mehdi Djait wrote: > > Hello everyone, > > > > This series is based on the fifth iteration of the series introducing the > > tw9900 driver: sent 29 Dec 2020 [1] > > > > This is the version 6 of the series adding support for the Techwell > > TW9900 multi standard decoder. It's a pretty simple decoder compared to > > the TW9910, since it doesn't have a built-in scaler/crop engine. > > > > Changes v5 => v6: > > - dropped .skip_top and .field in the supported_modes > > - added error handling for the i2c writes/reads > > - added the colorimetry information to fill_fmt > > - removed pm_runtime > > It's not very nice to keep the chip powered up all the time :-( > I agree 100% I tried to make it work with pm_runtime but I faced many issues. I don't know if this is due to my lack of experience but here is the situation when I enable pm_runtime: I get most of the time wrong values when calling g_input_status to check if I have a signal or not. To do that I read the 0x01 – Chip Status Register I (STATUS1) and check the BIT(6): HLOCK: - 1 = Horizontal sync PLL is locked to the incoming video source. - 0 = Horizontal sync PLL is not locked. To make the g_input_status work with pm_runtime I had to add a 300 msleep after power ON! Which is a huge delay. I also face issues with the standard detection... So I decided to drop it for this first version of the driver. -- Kind Regards Mehdi Djait