From patchwork Tue Sep 19 13:08:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 44306 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1duIHU-0000tj-Hm; Tue, 19 Sep 2017 13:09:40 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751040AbdISNJi (ORCPT + 1 other); Tue, 19 Sep 2017 09:09:38 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:39783 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751000AbdISNJi (ORCPT ); Tue, 19 Sep 2017 09:09:38 -0400 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8JD9UDA006048 for ; Tue, 19 Sep 2017 14:09:36 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : cc : subject : date : message-id : in-reply-to : references : in-reply-to : references; s=pp; bh=DvbmW/TZNEnWT1Ka71bKZNM/289OqKvl4udalg9alOw=; b=ZaGYFb1jvtppQGYeu1vtVBEI5G7HytJx3af8Rx7Bc7XOJUq8jKhuMpxFKC4LFwX3UclP qzxW8s9nbEwNLxMX2ZIlXbmTEU0YYJQnkjb/l4rpjMb/YoDYMdqS/ZVbNHv4QUksWig4 WBjxsKDEtiZf+k6SLP5HBsIYtK9LPdfzXStBHCIMkF05UO5N8j3yADebwWnXhcGQime7 8dj+mA5NFkpTK/yiiBpVHu1zFE5WBzuAfDpREbcx7RxvUjynIMJ3h2ORJr18X8O6Izqg 29ube+PItEHoV0I0uEbFTxtKUZMxKtFUiJuwtXProuBaCUjH+Q6QHl1u47uMoDVwTy1K Zg== Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by mx07-00252a01.pphosted.com with ESMTP id 2d0sc01jce-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Tue, 19 Sep 2017 14:09:36 +0100 Received: by mail-wr0-f198.google.com with SMTP id d6so3751358wrd.7 for ; Tue, 19 Sep 2017 06:09:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=DvbmW/TZNEnWT1Ka71bKZNM/289OqKvl4udalg9alOw=; b=sc/EXTrolHNVxJTdZZgx7OJBWeqbF8V9Y9sW775uTLb2F1eRhBVGBFG0TAFNvu+RRS Ud1UC1OtCW9Rl2B4Lv31IDaM31pCHd+iZyR/D9/B4RxDdH591aNjLfFJQkaBvJ5xShiu rstZhhyEwRt+FaEMz/CzT/UrWI89L7L7T2Z4NMVwpYVVj4r5IdQfozYVSkixwtNxI92r PMQIp2huZXh6zE8f0w1Bq5rHyN1rt2eCoZdzgPHHFSA8rYDky/zrmULpw22r5IGB8ESO HGYBvKshYLW5aJmYkbDldkF0vBUzzURHlANRao/o4AYlv2SJN8eaMA1vHL6HoDLcQiWv MaJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=DvbmW/TZNEnWT1Ka71bKZNM/289OqKvl4udalg9alOw=; b=ZzZ9FJ+fvTtQlpdxFvPcyTjjsP1x1Y0zQBwxztrmpnuqLxvAJ2WFdHRd3AqLdkvccT PPFPjcQcL/1Z+FyylH7kl5fQWXCaTBNXlfnkW0J/weNQfcwl4QQBlOtt3Mng1fjs09SZ QSUdOi7pnl/KbrN67oMxCJ93pqTF4CFAdg237BQwmZPlhn5asq83EUVXlo3fIKeNHmYl oVtZTFmZySndAYBwUrZpUrSgA2ZS3/u1iE9Y2fqmoSSAEeTx8+jvNZ0+anlvkJG/BY3I +4DZvihtYxa4/7TdM70nmkVCDBh7Jg9tXsZbiol/qOqExmHTlQpW/1HskzN+XnWp9a4g aR/Q== X-Gm-Message-State: AHPjjUhXzQvGjee1LnMEHoreHELzlWFcTs0E029atbOx7enPS8XpRkmP L0kQM3/3gOPgcIY6id95txSOFwaD+nuYFraSeGiIvxByYaWexnAHhfxYZE53ykYLOuyBYtWxGcC RTxdZMn1977yoAR2cjmPr+w== X-Received: by 10.28.22.82 with SMTP id 79mr1176465wmw.70.1505826576061; Tue, 19 Sep 2017 06:09:36 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCL3jKmpy+Yz16YdST/7FOWTM7slMfDM2zZg/0ZicntoRExzr1ljtCE9aHv49WB3RvJnO5h2g== X-Received: by 10.28.22.82 with SMTP id 79mr1176447wmw.70.1505826575811; Tue, 19 Sep 2017 06:09:35 -0700 (PDT) Received: from dave-VirtualBox.pitowers.org ([217.33.127.173]) by smtp.googlemail.com with ESMTPSA id a195sm1119170wme.34.2017.09.19.06.09.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Sep 2017 06:09:35 -0700 (PDT) From: Dave Stevenson To: Mats Randgaard , Mauro Carvalho Chehab , Hans Verkuil , Philipp Zabel , linux-media@vger.kernel.org Cc: Dave Stevenson Subject: [PATCH 2/3] [media] tc358743: Increase FIFO level to 300. Date: Tue, 19 Sep 2017 14:08:52 +0100 Message-Id: <3e638375aff788b24f988e452214649d6100a596.1505826082.git.dave.stevenson@raspberrypi.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-09-19_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709190186 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The existing fixed value of 16 worked for UYVY 720P60 over 2 lanes at 594MHz, or UYVY 1080P60 over 4 lanes. (RGB888 1080P60 needs 6 lanes at 594MHz). It doesn't allow for lower resolutions to work as the FIFO underflows. Using a value of 300 works for all resolutions down to VGA60, and the increase in frame delay is <4usecs for 1080P60 UYVY (2.55usecs for RGB888). Signed-off-by: Dave Stevenson --- drivers/media/i2c/tc358743.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c index 6b0fd07..7632daf 100644 --- a/drivers/media/i2c/tc358743.c +++ b/drivers/media/i2c/tc358743.c @@ -1782,8 +1782,14 @@ static int tc358743_probe_of(struct tc358743_state *state) state->pdata.refclk_hz = clk_get_rate(refclk); state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS; state->pdata.enable_hdcp = false; - /* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */ - state->pdata.fifo_level = 16; + /* + * A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz, + * but is insufficient for lower resolutions. + * A value of 300 allows for resolutions down to VGA60 (and possibly + * lower) to work, whilst still leaving the delay for 1080P60 + * stilll below 4usecs. + */ + state->pdata.fifo_level = 300; /* * The PLL input clock is obtained by dividing refclk by pll_prd. * It must be between 6 MHz and 40 MHz, lower frequency is better.