Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1844402imm; Thu, 18 Oct 2018 05:19:21 -0700 (PDT) X-Google-Smtp-Source: ACcGV60CWOo8FnAPKLTHRFq+T9FRc+kev+CpSQHdthFVT71dnwqInnXJS415e353PDSeDy8duqkU X-Received: by 2002:a17:902:9b84:: with SMTP id y4-v6mr30224131plp.332.1539865161774; Thu, 18 Oct 2018 05:19:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539865161; cv=none; d=google.com; s=arc-20160816; b=pHbeVsDT1IpWheIXeJNi7ijeNFp77J06RRMtPz0pc9W8QitoF3H+DHXB1Cnps9t9fR Q7+4HKgQaAT2Y3+V6w8dudSJO4pUZEuDpbNF9wGLcM3KTJf+VIF+qZBImV+o1mhSYUCE JhobkQkDEABmUVNyz6IchcbXEsPUM1in+/15iOzfZH7//wAh3svhR5uY+mRy4azID0+j RolCgz3D1GPZALpFL5FxZurqMFY6V5kEd1+nlKXAuldkEUbAfaMlLquPz/QEb63d9K96 n8oopTkhs6GwlyA9nT3PgmAEMlvQN4CCMFMvd0wXVT3t+D2mhYRgb7osjV9WaZ+e8uTo O3ZA== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=EPN7bIGGWtmESuBYlCUtHc7+4I7O3DIy+1tp6fZkN5o=; b=R4WBFRX9gatIuCXpvEJ4K9/YEKblEHFIafG19UnPROAoQxJBoGpyKaR+xgTIw13LRy fXyNxCMuun/kQFh7qUho4gOroP0fX5RaTZmjd16L2WkSOH9Emaog2rWzgxNhngQQyzrm C06XTpadHGn5vpy+808I70egyXBipXL3yJMr4QnIthyv+MaUxjzD3PG0rt5v8m2rtTc8 hxsJxwDnYYxYeSTRTndfvWSas18kRIoWa9Pw52k/ZeWSomuuig6iuLc3tIoQlXSon8By vwl/B49dJ7Bpuik9V8DJQ7uBTYbeYvjnrrYwxhL++z6PNi9r8LalM4MdfA5PKHtkvdpz YNtw== ARC-Authentication-Results: i=1; mx.google.com; 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 d81-v6si22451974pfm.40.2018.10.18.05.19.04; Thu, 18 Oct 2018 05:19:21 -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; 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 S1726698AbeJRUTR convert rfc822-to-8bit (ORCPT + 99 others); Thu, 18 Oct 2018 16:19:17 -0400 Received: from mail.bootlin.com ([62.4.15.54]:57574 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726506AbeJRUTQ (ORCPT ); Thu, 18 Oct 2018 16:19:16 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 489842090A; Thu, 18 Oct 2018 14:18:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-25-52.w90-88.abo.wanadoo.fr [90.88.145.52]) by mail.bootlin.com (Postfix) with ESMTPSA id 1619820712; Thu, 18 Oct 2018 14:18:19 +0200 (CEST) Date: Thu, 18 Oct 2018 14:18:19 +0200 From: Maxime Ripard To: Laurent Pinchart Cc: Daniel Vetter , Icenowy Zheng , devicetree@vger.kernel.org, Dave Airlie , linux-sunxi , Linux Kernel Mailing List , dri-devel , Chen-Yu Tsai , Rob Herring , Linux ARM Subject: Re: [PATCH 9/9] [DO NOT MERGE] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check Message-ID: <20181018121819.gmup3jd7ukj52rvx@flea> References: <20181018073327.64942-1-icenowy@aosc.io> <20181018094258.oahlopafvm2udvoe@flea> <1585874.9P5eR8PMbl@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1585874.9P5eR8PMbl@avalon> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 18, 2018 at 02:31:01PM +0300, Laurent Pinchart wrote: > Hello, > > On Thursday, 18 October 2018 12:42:58 EEST Maxime Ripard wrote: > > On Thu, Oct 18, 2018 at 11:18:06AM +0200, Daniel Vetter wrote: > > > On Thu, Oct 18, 2018 at 10:55 AM Laurent Pinchart wrote: > > >> On Thursday, 18 October 2018 10:33:27 EEST Icenowy Zheng wrote: > > >>> From: Chen-Yu Tsai > > >>> > > >>> The panels shipped with Allwinner devices are very "generic", i.e. > > >>> they do not have model numbers or reliable sources of information > > >>> for the timings (that we know of) other than the fex files shipped > > >>> on them. The dot clock frequency provided in the fex files have all > > >>> been rounded to the nearest MHz, as that is the unit used in them. > > >>> > > >>> We were using the simple panel "urt,umsh-8596md-t" as a substitute > > >>> for the A13 Q8 tablets in the absence of a specific model for what > > >>> may be many different but otherwise timing compatible panels. This > > >>> was usable without any visual artifacts or side effects, until the > > >>> dot clock rate check was added in commit bb43d40d7c83 ("drm/sun4i: > > >>> rgb: Validate the clock rate"). > > >>> > > >>> The reason this check fails is because the dotclock frequency for > > >>> this model is 33.26 MHz, which is not achievable with our dot clock > > >>> hardware, and the rate returned by clk_round_rate deviates slightly, > > >>> causing the driver to reject the display mode. > > >>> > > >>> The LCD panels have some tolerance on the dot clock frequency, even > > >>> if it's not specified in their datasheets. > > >>> > > >>> This patch adds a 5% tolerence to the dot clock check. > > >> > > >> Why do you think this shouldn't be merged ? > > > > > > It pisses of a lot of people who really insist upon accurate timing. > > > > It's not just about accurate timings. That 5% is a made-up limit, that > > never have really been confirmed by looking at the typical tolerancies > > of panels. > > > > And while being to relaxed might make some panels work that are not > > working currently, it might also break some panels that currently work > > and won't now, and ideally, we should really be able to let those > > panels work if they can, and filter out resolutions if they can't. > > > > > I think a better fix would be to have a dotclock range in drm_panel, > > > and some magic to figure out which one of these we can actually > > > do. Then tell userspace that this is the mode is should > > > request. That way userspace knows what the actual dotclock/refresh > > > rate is, and the panel still works. > > > > It's not just about panels, but also bridges with EDID where the > > tolerancy is not exposed. > > Given that the tolerance is a property of the panel or bridge, I agree with > Daniel that it should be implemented there, or at least in cooperation with > drm_panel and drm_bridge. How are we supposed to deal with panels without any documentation then? > Semi-related information, I think the CEA and VESA standards allow a 0.5% > clock tolerance. What is the maximum clock frequency deviation required for > this platform ? Looks like it does indeed. That's definetely good to know. Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com