Received: by 10.223.185.116 with SMTP id b49csp6498963wrg; Wed, 28 Feb 2018 10:23:58 -0800 (PST) X-Google-Smtp-Source: AG47ELsCyJ5YIpn0MrFsFsgMVFjQprksvDLtNqK6o6OZo0XeojT21GIvGIXl2a4hJ/gPteZaJSs9 X-Received: by 10.101.69.4 with SMTP id n4mr10022442pgq.184.1519842238215; Wed, 28 Feb 2018 10:23:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519842238; cv=none; d=google.com; s=arc-20160816; b=ql5nrUJmsJ5jZy8uLMHdBdxIcr0bdLBtPbfCnyPllZ4lbUQhQ978dIELH5Jj2uKIau Wueo4LdlDkeyB9AbTuGvlZukDLz0L282Np5/1DQDgNa/OFaPA7qsXOjYv+fXb5R+ujVh GqWBkbNYW/21I48LbGEZsC7R2Ht6O35caJNrCh1Zlfk9m1BZr3TuIEeohQoDhFKhPmn1 7XmbXQRcCx3UtpNU/6Eh31uhSsxM/ekvHx1U0822x1Der/EHIfp+cf+hzXLpqdnH9YfP M2v7ofX3AeyeqIKMzJChDUGJfmXaxZB/6U7a5sdR3vV8mntxTSua7fhXG3eZAL8sj3bX tMGg== 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:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=DlICEDaE1PuPMke1B2ArfECeuldBhCSPZXXU2yth0Ss=; b=MMlWPqP71jMBTsV8CHf/48L8MdoZg6tswnr6UyHtfBy+bRG0H+2ifqFt5BX03n5XEw g+qHtAEgjERao2oeUmMce04bW+tMLcc5nIhtPuHJXnJrJmJBcXXLJEtbwDFwfjpIHDpj pvjDc1obcMiZZ0350pXsoCP6V2hb4Sz5riEJOe/Tdobpuvc9sq0fCZh0L/yi9xHIGFMC GayUdiMY1TsqS+z+damGxgo5UIf7cjG3nhVn1WbGUuWYxB49oxq4w5SRxYBj5EiOCS1J kxy6P3mg7CBUoMULnRX5EPyKmo3txq5s+hx+JqHIk2rq+/ubeXv5Ozxd3+C1ewkGBNie w8WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@micronovasrl.com header.s=dkim header.b=A+xTnkGr; 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 z6si1322717pgn.46.2018.02.28.10.23.42; Wed, 28 Feb 2018 10:23:58 -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=A+xTnkGr; 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 S932559AbeB1SWR (ORCPT + 99 others); Wed, 28 Feb 2018 13:22:17 -0500 Received: from mail.micronovasrl.com ([212.103.203.10]:40698 "EHLO mail.micronovasrl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932126AbeB1SWQ (ORCPT ); Wed, 28 Feb 2018 13:22:16 -0500 Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 98AB6B00A92 for ; Wed, 28 Feb 2018 19:22:14 +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:references:to:from:from:subject:subject; s=dkim; t= 1519842133; x=1520706134; bh=eO8AAI6NT7MI9uznT97hx+8KfDODwEU3FVI CZnyo/Nk=; b=A+xTnkGrEGhh0UR9dNwrug/MjKQSsMYuNi2kSY4615TlUTbzS0h nrWLxACJkggFboMj7xVpU8nX47Nv6ysrwNLghLJ9/hWImpluBAjvz5/Y3mjvkvOH 0JkJIo+MgptgooE2mVN5j0vAUkyZES2g+EnLhwm65kPVf3ctJ/n9WoXE= 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=unavailable 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 gOG6z_H6fyo7 for ; Wed, 28 Feb 2018 19:22:13 +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 06C46B003B2; Wed, 28 Feb 2018 19:22:12 +0100 (CET) Subject: Re: [PATCH] drm/sun4i: init dclk_min_div & dclk_max_div inside encoder init functions From: Giulio Benetti 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> Message-ID: <83d1a6d8-0816-9f75-34f6-4b93e84393e4@micronovasrl.com> Date: Wed, 28 Feb 2018 19:22:14 +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: 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 17:34, Giulio Benetti ha scritto: > 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. Submitted patchset for that. > >> >> 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? Don't mind. -- 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 > > Thanks >