Received: by 10.213.65.68 with SMTP id h4csp1628999imn; Thu, 29 Mar 2018 08:08:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Uq0HZdsBpRK4OZUdgBCacr8ktZ465/gY7J8xTpcoYRlwYFC/i2rOh4RInsqjzVkrwcJKY X-Received: by 2002:a17:902:468:: with SMTP id 95-v6mr8859337ple.360.1522336080012; Thu, 29 Mar 2018 08:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522336079; cv=none; d=google.com; s=arc-20160816; b=yuMubIGVO/3uY2ut2r9mHzth9l91mlyRVYLi8ewespYnITbBBGm7pWrE7G2BrUKU58 ppuMjNL1W1rJzmWHeD+wglWsD615PcxB3alZsFBBBIWkbsqWQoWrCyckDqCUqXfw56gq LtsBa5taMRAp6DqjEBFaNBjEMXukQ7xWOmqBK1S8ak1Zh0RiqrgE/840vn8malxyzMvd NUdPb28e6Y1oEMBct97+py9soAnEeEHwLhJE4Wqx+aIVl9VI65WqsepnSYCpeXXDAvlm RWllNFhb6cXyifFN1eilQhJ5apRLtjtsWb2j1qgmUhHSxkIir0AsmfTzc6yj1LEeyBbv cIBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=cTSRIAOPvvq5BxFtAVQ97MKFFY2WvcF7iYhKIfsLNzg=; b=sxWVR7n5rurD8Or2TxTScmN93WP/piSxCcs/LsR6O58DTL9hxVL8mIn3gGnmNGEV1w pBRXmcFbNzyuTy6oJe/XIAN1WA27YOH6QV2cQqdCOtaCsn8qfWmwwOaRUZcQPbyea7YV 63oLviLrMKhGtNhkKIIswaoZ6og1PnDs52RvNMygjkfmTjqEghnQu8sJZokHyX1NN7OS SIDrvdBynx+1CUaMF3SGkWbpbMn+JS0KZIud374C3nbbFHmPKZ+dz375CdQa+Dvb65c+ lMdfF4A/hn3qcqvvha7Lhg12VMgtaruZuunk4DwT7hn4a1guUGw4qdB3cAx0yxnw/JRv +5ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IuBxhmh6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f33-v6si6183364plb.585.2018.03.29.08.07.16; Thu, 29 Mar 2018 08:07:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=IuBxhmh6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752043AbeC2PCt (ORCPT + 99 others); Thu, 29 Mar 2018 11:02:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45818 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbeC2PCr (ORCPT ); Thu, 29 Mar 2018 11:02:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=cTSRIAOPvvq5BxFtAVQ97MKFFY2WvcF7iYhKIfsLNzg=; b=IuBxhmh6d7ix+nG7IvrhD2Mkh sy5DGCch24FZEdEjdBBwoPI4abYCDcv8EEi4ki2tsEf50sKkFgA5PK+a1034kTjiU/B8R+FGbsBjQ wNd/tUWZKO3I88rED/gegRX1OBg3StZKIiaQG88cGk9sdTAX3VYsluq/52oBAbBRFIy63UnUAilQf /xUrQ0hJfK9MxBlLJMTSk2/+uZm95ih3VI8SUlJLX7gB2sMZUnckCjAGYqFSEiEM4+/j4xVMsBKA0 /HjizabTxP0KSy6oA9lScv2x2TKbG9PzOrfE4hMCRkKEtQsUCW6zmXxclRzjrXyMtt88tblbK1TTi Xa/IS5YFg==; Received: from 177.205.88.90.dynamic.adsl.gvt.net.br ([177.205.88.90] helo=vento.lan) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f1Z4d-0002iR-Pi; Thu, 29 Mar 2018 15:02:44 +0000 Date: Thu, 29 Mar 2018 12:02:40 -0300 From: Mauro Carvalho Chehab To: Nasser Cc: p.zabel@pengutronix.de, sakari.ailus@linux.intel.com, hans.verkuil@cisco.com, bparrot@ti.com, garsilva@embeddedor.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: i2c: tvp5150: fix color burst lock instability on some hardware Message-ID: <20180329120240.169a5f33@vento.lan> In-Reply-To: <20180329143435.GA4392@smart-ThinkPad-T410> References: <20180325225633.5899-1-Afshin.Nasser@gmail.com> <20180326064353.187f752c@vento.lan> <20180326222921.GA5373@smart-ThinkPad-T410> <20180329143435.GA4392@smart-ThinkPad-T410> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 29 Mar 2018 19:04:35 +0430 Nasser escreveu: > On Tue, Mar 27, 2018 at 02:59:21AM +0430, Nasser wrote: > Hi Mauro, > > Thank you for taking time to review my patch. > > May be I should rephrase the commit message to something like: > Use the default register values as suggested in TVP5150AM1 datasheet > > As this is not a hardware-dependent issue. Am I missing something? It is not a matter of rephasing, but, instead, to be sure that it won't cause regressions on existing hardware. Yet, it would worth if you could describe at the patch what hardware did you test it, and if VBI was tested too. Anyway, I'll try to find some time to run some tests on the hardware I have with tvp5150 too. Regards, Mauro > > > On Mon, Mar 26, 2018 at 06:43:53AM -0300, Mauro Carvalho Chehab wrote: > > > Hi Nasser, > > > > > > Em Mon, 26 Mar 2018 03:26:33 +0430 > > > Nasser Afshin escreveu: > > > > > > > According to the datasheet, INTREQ/GPCL/VBLK should have a pull-up/down > > > > resistor if it's been disabled. On hardware that does not have such > > > > resistor, we should use the default output enable value. > > > > This prevents the color burst lock instability problem. > > > > > > > Color burst lock instability is just a side effect of not using the > > recommended value for this bit. If we use the recommended setting, we > > will support more hardware while not breaking anything. > > > > > If this is hardware-dependent, you should instead store it at > > > OF (for SoC) or pass via platform_data (for PCI/USB devices). > > > > > > > We have used the recommended value for this bit (as the datasheet > > suggests) while we are in tvp5150_init_enable but in tvp5150_s_stream > > we are using the wrong value. > > > > Also we have this comment at line 319: > > /* Default values as sugested at TVP5150AM1 datasheet */ > > But as you see, TVP5150_MISC_CTL is not set to its suggested default > > value. > > > > > > > > > > Signed-off-by: Nasser Afshin > > > > --- > > > > drivers/media/i2c/tvp5150.c | 5 +++-- > > > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > > > > > diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c > > > > index 2476d812f669..0e9713814816 100644 > > > > --- a/drivers/media/i2c/tvp5150.c > > > > +++ b/drivers/media/i2c/tvp5150.c > > > > @@ -328,7 +328,7 @@ static const struct i2c_reg_value tvp5150_init_default[] = { > > > > TVP5150_OP_MODE_CTL,0x00 > > > > }, > > > > { /* 0x03 */ > > > > - TVP5150_MISC_CTL,0x01 > > > > + TVP5150_MISC_CTL,0x21 > > > > }, > > > > { /* 0x06 */ > > > > TVP5150_COLOR_KIL_THSH_CTL,0x10 > > > > @@ -1072,7 +1072,8 @@ static int tvp5150_s_stream(struct v4l2_subdev *sd, int enable) > > > > * Enable the YCbCr and clock outputs. In discrete sync mode > > > > * (non-BT.656) additionally enable the the sync outputs. > > > > */ > > > > - val |= TVP5150_MISC_CTL_YCBCR_OE | TVP5150_MISC_CTL_CLOCK_OE; > > > > + val |= TVP5150_MISC_CTL_YCBCR_OE | TVP5150_MISC_CTL_CLOCK_OE | > > > > + TVP5150_MISC_CTL_INTREQ_OE; > > > > if (decoder->mbus_type == V4L2_MBUS_PARALLEL) > > > > val |= TVP5150_MISC_CTL_SYNC_OE; > > > > } > > > > > > > > > > > > Thanks, > > > Mauro > > Thanks, > Nasser Thanks, Mauro