From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CA87C282CE for ; Mon, 8 Apr 2019 09:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5E29D20870 for ; Mon, 8 Apr 2019 09:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726568AbfDHJLE convert rfc822-to-8bit (ORCPT ); Mon, 8 Apr 2019 05:11:04 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44634 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726374AbfDHJLD (ORCPT ); Mon, 8 Apr 2019 05:11:03 -0400 Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id EBE9D26068F; Mon, 8 Apr 2019 10:11:00 +0100 (BST) Date: Mon, 8 Apr 2019 11:10:58 +0200 From: Boris Brezillon To: Douglas Anderson Cc: Thierry Reding , Heiko Stuebner , Sean Paul , linux-rockchip@lists.infradead.org, Laurent Pinchart , dri-devel@lists.freedesktop.org, Ezequiel Garcia , Enric =?UTF-8?B?QmFsbGV0YsOy?= , Rob Herring , mka@chromium.org, Eric Anholt , Jeffy Chen , =?UTF-8?B?U3TDqXBoYW5l?= Marchesin , devicetree@vger.kernel.org, David Airlie , linux-kernel@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH v5 2/7] drm/panel: simple: Add ability to override typical timing Message-ID: <20190408111058.5f0a4a3b@collabora.com> In-Reply-To: <20190401171724.215780-3-dianders@chromium.org> References: <20190401171724.215780-1-dianders@chromium.org> <20190401171724.215780-3-dianders@chromium.org> Organization: Collabora X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Apr 2019 10:17:19 -0700 Douglas Anderson wrote: > From: Sean Paul > > This patch adds the ability to override the typical display timing for a > given panel. This is useful for devices which have timing constraints > that do not apply across the entire display driver (eg: to avoid > crosstalk between panel and digitizer on certain laptops). The rules are > as follows: > > - panel must not specify fixed mode (since the override mode will > either be the same as the fixed mode, or we'll be unable to > check the bounds of the overried) > - panel must specify at least one display_timing range which will be > used to ensure the override mode fits within its bounds > > Changes in v2: > - Parse the full display-timings node (using the native-mode) (Rob) > Changes in v3: > - No longer parse display-timings subnode, use panel-timing (Rob) > Changes in v4: > - Don't add mode from timing if override was specified (Thierry) > - Add warning if timing and fixed mode was specified (Thierry) > - Don't add fixed mode if timing was specified (Thierry) > - Refactor/rename a bit to avoid extra indentation from "if" tests > - i should be unsigned (Thierry) > - Add annoying WARN_ONs for some cases (Thierry) > - Simplify 'No display_timing found' handling (Thierry) > - Rename to panel_simple_parse_override_mode() (Thierry) > Changes in v5: > - Added Heiko's Tested-by > > Cc: Doug Anderson > Cc: Eric Anholt > Cc: Heiko Stuebner > Cc: Jeffy Chen > Cc: Rob Herring > Cc: Stéphane Marchesin > Cc: Thierry Reding > Cc: devicetree@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org > Signed-off-by: Sean Paul > Tested-by: Enric Balletbo i Serra > Signed-off-by: Douglas Anderson > Tested-by: Heiko Stuebner Reviewed-by: Boris Brezillon > --- > > drivers/gpu/drm/panel/panel-simple.c | 109 +++++++++++++++++++++++++-- > 1 file changed, 104 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c > index 9e8218f6a3f2..ad4f4aac2d44 100644 > --- a/drivers/gpu/drm/panel/panel-simple.c > +++ b/drivers/gpu/drm/panel/panel-simple.c > @@ -34,6 +34,7 @@ > #include > > #include