Received: by 10.213.65.68 with SMTP id h4csp1597051imn; Thu, 29 Mar 2018 07:36:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx49Ia2q6ZOh0Sk4rSJwdoDmioKr4kNbTclS3VHNVMCeCiIZ+5O1y5TR9o9+W6Wer4sIUo+dM X-Received: by 10.101.86.198 with SMTP id w6mr5734354pgs.294.1522334183676; Thu, 29 Mar 2018 07:36:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522334183; cv=none; d=google.com; s=arc-20160816; b=lETT5n6boTD9Xo1Tt0pTae7VTqmhlIerk9az0oURy2zWK2fEB/GiEc/p+oq0/MauXC PVC66jkT36QInRXT4FZGjV+0b9FL/WC7rRb6ODAIhF49fZPk0oPfgGBBYGnKefMwfMg4 qS5GMKOBGaquUQx/GURSGgNUfKr63oPoIa961uQpIn8rnfbihCAjkRjxC6naah+I+1y0 g0AHR1a5hQq3HPtgV1CXlyOAgWb26duPagK0+i1iD+dc5bzXsy23Yr0vQTSe7xnevwPT cPN/o6y+kMNrUmBqtP8GHm2TMCykMw125BE1ODPqnAasNFhTLvnRd0WrEeEyRxijMQ9j 4oyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=akMmSZDAbIHezSHXSNcawSA43OUFIF7TUcRzwKEN7Zs=; b=wgAFFQf7CDOT19DpQyUGWSRIcKupP4FF2gdquuwTIm4S2yXDqJhoyB6GjiHaO8iE8j LcIjHsV/h6otMzvFSe6khnTP1hr9EVg5ph/naCVY+nYXCIFNogjSpYj7duvR+AZae5fr rTGn7C+Bn5V4XVXN5dM2wh1vasPEuiVnb2VWMQ+s66fHmN2cLDx0KFby5x8ZfJzNqI/x oQ8nXbD9DcNzTqf+weqH+xtgpoAlpM67/CJhP90ke5855Hi/u/P7zlKA43s/gLayl6AH PPvGhElqAoScu1P2oefSQwre1SrY66Jlg7wG8Zd+2rf2DscsuzDPU0fA/thbYKRZyK5J Igkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BLjs+Gdu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si5771425plp.662.2018.03.29.07.36.09; Thu, 29 Mar 2018 07:36:23 -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=pass header.i=@gmail.com header.s=20161025 header.b=BLjs+Gdu; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752131AbeC2Oep (ORCPT + 99 others); Thu, 29 Mar 2018 10:34:45 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:38307 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946AbeC2Oen (ORCPT ); Thu, 29 Mar 2018 10:34:43 -0400 Received: by mail-wm0-f66.google.com with SMTP id l16so12086618wmh.3; Thu, 29 Mar 2018 07:34:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=akMmSZDAbIHezSHXSNcawSA43OUFIF7TUcRzwKEN7Zs=; b=BLjs+Gdu6HrIHuITSc/yt1lQrfzGxCFYn3x+l01hMphw1xSxLcfmcqELt40NORDC1j 6gStTcVdAtH7/WcdvADxXkGAoDl9dBX05t+aoXbppq9j2JF4LETE0GiOFcSbgtfyTOq5 KOMZtQb3+te877mb2s+qZlb6jrhtPkqueuQycxZywoUIXhkcigGcC+v9/C/xXjoKb6/P p5XkoIL2BeVXvFwoHatZM3crU89xoi6K5VIhBamWPYZKkdQTlgRvsuyWHrs+xx0eGtqw xUWrPg9NnzkxxnV4Faxa/JU2dTU0IJj8rwdDakXJckhWfIBFv30uZSpbKGO8pE8kYwk1 WSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=akMmSZDAbIHezSHXSNcawSA43OUFIF7TUcRzwKEN7Zs=; b=uPwhqDYTABWsdqY+85dLP0p/PTQpRmP89Eff8zOdw61P5DcKXM1qO46NJqVLTZfYrG L2Ym9twO1lX7yD4WtHPXuu0br4a5poNSoekWSpa6MBhcHKlU7lXPRNuWzl8WbqDvhZCc DsFp770dQI1qBQVIeiIYUDaSFWX27gzQAIE9sLQEOdaTUG0tNgKAWfC9f0ZehBI5waVB 2JcyUCsCRq6EdfgoI6YXVDJxTGyURLDz5j2+X7s3Wh6IXr0hehM9V/MSGRTT0rdf8+bJ I/VxyMGRM7FcmlR63CTOCCGpIpA9mqCf1F/JEaI6qzd2QqWrNg1DNpkLGrboxiKDt9j0 x+yA== X-Gm-Message-State: AElRT7E1EfNt7cfZaQfzK03krYN/Y1f3YQQFhzhs3d0WJO1QhsQ2v2l/ 0WlVD7+qU8eG/oM2BOlQuNw= X-Received: by 10.28.113.216 with SMTP id d85mr5819207wmi.97.1522334082105; Thu, 29 Mar 2018 07:34:42 -0700 (PDT) Received: from smart-ThinkPad-T410 ([151.243.68.54]) by smtp.gmail.com with ESMTPSA id r15sm6697421wrr.79.2018.03.29.07.34.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 07:34:41 -0700 (PDT) Date: Thu, 29 Mar 2018 19:04:35 +0430 From: Nasser To: Mauro Carvalho Chehab 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: <20180329143435.GA4392@smart-ThinkPad-T410> References: <20180325225633.5899-1-Afshin.Nasser@gmail.com> <20180326064353.187f752c@vento.lan> <20180326222921.GA5373@smart-ThinkPad-T410> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180326222921.GA5373@smart-ThinkPad-T410> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? > 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