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=-8.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 7DE70C5B576 for ; Sun, 30 Jun 2019 20:23:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4266B204FD for ; Sun, 30 Jun 2019 20:23:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726895AbfF3UWx (ORCPT ); Sun, 30 Jun 2019 16:22:53 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:34876 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbfF3UWx (ORCPT ); Sun, 30 Jun 2019 16:22:53 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id B93E120070; Sun, 30 Jun 2019 22:22:47 +0200 (CEST) Date: Sun, 30 Jun 2019 22:22:46 +0200 From: Sam Ravnborg To: Douglas Anderson Cc: Thierry Reding , Heiko Stuebner , Sean Paul , devicetree@vger.kernel.org, Rob Herring , David Airlie , Jeffy Chen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Boris Brezillon , Laurent Pinchart , Enric =?iso-8859-1?Q?Balletb=F2?= , =?iso-8859-1?Q?St=E9phane?= Marchesin , Ezequiel Garcia , mka@chromium.org Subject: Re: [PATCH v5 2/7] drm/panel: simple: Add ability to override typical timing Message-ID: <20190630202246.GB15102@ravnborg.org> References: <20190401171724.215780-1-dianders@chromium.org> <20190401171724.215780-3-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190401171724.215780-3-dianders@chromium.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=dqr19Wo4 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=8nJEP1OIZ-IA:10 a=cm27Pg_UAAAA:8 a=-VAfIpHNAAAA:8 a=s8YR1HE3AAAA:8 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=e5mUnYsNAAAA:8 a=QX4gbG5DAAAA:8 a=VQv1v-rfpna5m5GkDzwA:9 a=WdM8EmG1RyxdikVb:21 a=PK01xQEQwDdgTzne:21 a=wPNLvfGTeEIA:10 a=xmb-EsYY8bH0VWELuYED:22 a=srlwD-8ojaedGGhPAyx8:22 a=jGH_LyMDp9YhSvY-UuyI:22 a=AjGcO6oz07-iQ99wixmX:22 a=Vxmtnl_E_bksehYqCbjh:22 a=AbAUZ8qAyYyZVLSsDulk:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Douglas. Again, long overdue. The review triggered several questions that you should have had a long time ago. Hopefully they makes sense to you. Sam On Mon, Apr 01, 2019 at 10:17:19AM -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 > --- > > 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