Received: by 10.223.185.116 with SMTP id b49csp6387873wrg; Wed, 28 Feb 2018 08:35:20 -0800 (PST) X-Google-Smtp-Source: AH8x226Meg/KDQVXHcrwqqORAptgCux1WoDg4kQS+sW8f72lXTdOD5xtirR6We0rENNsNv5wljGl X-Received: by 2002:a17:902:42e:: with SMTP id 43-v6mr19056211ple.186.1519835720524; Wed, 28 Feb 2018 08:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519835720; cv=none; d=google.com; s=arc-20160816; b=nUwA3ioiT0ffWuvIHF0C8SE1S/XKOy7v99WqK+nNqWHfB54QJvOrssWmBcKz2d1Vmi xO7BZb1JxkLoGG+ppIwwHFZo+J80Fcbdok0IEGm39wTqbBeETwMPb0Q3ltXhwChLVMNy DCQxtWdzDUWkjFEtUeY/xutViddgswbtkJj6GMpsaRlOkZj3fIZgcipisxpgHWfsfRk5 le9Q78hvp31ahpG5pb+2bgel00KDquivpBGpshABM0lPqqIyk7vHfd16iwWPijAR1LPl XEaHp9Vh1D3UecjyEV1z2+BD0i/K9f/Tj2y52+eRSB7nI7VuUnBlPkSrWzZhu6zGXAav cikQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=85xOnfca3/H4oMR5mdOy6BVqrAWqFXl2MsAXLr7e6tg=; b=H/chtuvV2C3QiJnc8Y3rEJfVlLyWzqr4JxB60fKcObFp0Q+qTA0xbJGMxerBF2gFI5 SftAPlFh0/X1BcL8f4AbF3I3Pe0qJN/SxanCphpdS2bODgPdEDSeljQQTE336ys6Fbij Ejz4FuhfKTMVvga8hGu3uElepZhd9nWkeQsfHLXoKuHxqAwvONeTTDhB2oT9TYMg5nst SejAvBjgiJlXzjn6KlNi8+h1TWpJmba12JRe9vs4+K6dDL3zrnkEuzYLDj6T2lSDxfaf rKCVVJWlL4RmV6CfVj0dGp2IAZbKcWl1R72NlESOs+4fXYVCuScQ621zgH+Ot9o0VMFF 2png== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=XpsSAYgk; 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 i6si1203831pgq.471.2018.02.28.08.35.05; Wed, 28 Feb 2018 08:35:20 -0800 (PST) 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=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=XpsSAYgk; 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 S934465AbeB1Qe2 (ORCPT + 99 others); Wed, 28 Feb 2018 11:34:28 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:36994 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932358AbeB1QeZ (ORCPT ); Wed, 28 Feb 2018 11:34:25 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 6DB45B00A60 for ; Wed, 28 Feb 2018 17:34:24 +0100 (CET) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=content-transfer-encoding:content-language:content-type :content-type:in-reply-to:mime-version:user-agent:date:date :message-id:from:from:references:to:subject:subject; s=dkim; t= 1519835663; x=1520699664; bh=RBxQVYKS9Ece9TPHmHB14C8Szqo57AZw8Z3 6vzOUp+w=; b=XpsSAYgkglvqM41P1GJ+WiN1iwNLUBtMmsiIzQsecWwd9wUPVvf nbAFMEOw3iJO3EiOGCfAEYURkI+UxPrmIlOJBt29c8pu6cbswNpDFtrp0saTmbHv lBOoiYf0PdsgXA10iPf1UAtTP71O/tsX4hfvLNeMsFyrZBR+hOdkawt8= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id U5MFXNSTAiLN for ; Wed, 28 Feb 2018 17:34:23 +0100 (CET) Received: from [192.168.2.69] (62-11-51-166.dialup.tiscali.it [62.11.51.166]) by mail.micronovasrl.com (Postfix) with ESMTPSA id B2291B005AE; Wed, 28 Feb 2018 17:34:22 +0100 (CET) Subject: Re: [PATCH] drm/sun4i: init dclk_min_div & dclk_max_div inside encoder init functions To: Maxime Ripard Cc: David Airlie , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1519822318-3974-1-git-send-email-giulio.benetti@micronovasrl.com> <20180228155559.lqm22dzeiptrwyxe@flea> From: Giulio Benetti Message-ID: Date: Wed, 28 Feb 2018 17:34:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180228155559.lqm22dzeiptrwyxe@flea> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: it Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Il 28/02/2018 16:55, Maxime Ripard ha scritto: > Hi, > > On Wed, Feb 28, 2018 at 01:51:58PM +0100, Giulio Benetti wrote: >> sun4i_dclk_round_rate is called before sun4i_tcon_mode_set, >> so it finds dclk_min_div and dclk_max_div set to 0 and fails >> adding crtc. >> >> Move dclk_min_div and dclk_max_div to encoders init functions. >> >> Signed-off-by: Giulio Benetti > > I sent a similar patch there: > https://lists.freedesktop.org/archives/dri-devel/2018-February/166666.html I've missed that. And where you put it is better, since it's called every time set_mode is called. On lvds instead I don't see anything about this, it should have the same potential problem. Also I can't understand why it has been set min=7 and max=7 on lvds. With those values I would obtain 77Mhz only. And I can't find values on datasheet for minimum and maximum. > > I guess eventually, we'll want to remove the usage of the clock > framework entirely, but it's not really the scope of a fix. Where would you handle dclk instead of tcon? Thanks -- Giulio Benetti CTO MICRONOVA SRL Sede: Via A. Niedda 3 - 35010 Vigonza (PD) Tel. 049/8931563 - Fax 049/8931346 Cod.Fiscale - P.IVA 02663420285 Capitale Sociale ? 26.000 i.v. Iscritta al Reg. Imprese di Padova N. 02663420285 Numero R.E.A. 258642 > > Maxime >