Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp214939pxa; Fri, 14 Aug 2020 01:58:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMNC33I5Hxs2Q+s/g7ayALZtytTJ2rbBC1zgA3w2GJGJToR9nIXnl0qD2UKRawo31m0umI X-Received: by 2002:a17:906:a0c5:: with SMTP id bh5mr1419958ejb.120.1597395532872; Fri, 14 Aug 2020 01:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597395532; cv=none; d=google.com; s=arc-20160816; b=zBvywCZ+SPXwBBJtL2Z1DpyzD+xZ1fRlriZQURA9T7vmFNs1F7tAa/KzUHiom2osvS LROgs6nBWS9qor3QoaG4MSyp4BEGggrS0EAhjuHH6XlBvIsr7RDxPJyJT4Vv817XzU7L tjSp4XkLfnWSUgw/ZFo31ED795DX29YQrBSK52vEghoIMcFRDfI8tdGgFJ732jZGUSK+ 0q2m4gylT4/jQ3b/0quNmvPFkKCt0ptYZsLS1BiOeyHRCuPywgQGAuesAjUuGQwtHIJf hy8FkOZc40kYb4fRGat9zrt/Fu2dxVhFsYDYVgQtaSl/dRkaN6RTiwmFAUehCzz3pSeJ nZng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=qrkgl+wd+rfLtxQ+IaGBNG9qvFDBZIf0yqGYIVPRz38=; b=Z9zIADtPDX0tZstXrEHKj2eLSSdVLjeITStkWUR6rfJEAPOXzrZ05raPBDZTfMcCnh slb9yM1fO5GYdwIhESS6THpwm9Om8adiPXxL8n6JQn688VNW7ewWpxXHWitHbNwoaUeC J/IrUPzQiSJma8TtCA0SclQHaI24vTgbZYs8ZM7O3TeRj1a0Xx9hENzKMszceBH7P032 MpxltlcIJFmNPnnULKGemYWr8AR6kyYNJV2jlQ6YTzd2BdKUSfOaIMEDjQPm5HtsUqEo X0F7jxvQAIgnagRZv86tYdeGRRZdda2RPuI3cjxR7SZJ3GUbXMbRt4EJ/GHev4QzYJVz 05Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GtVGyL30; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v4si5681615edl.506.2020.08.14.01.58.28; Fri, 14 Aug 2020 01:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GtVGyL30; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726990AbgHNIyE (ORCPT + 99 others); Fri, 14 Aug 2020 04:54:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbgHNIyE (ORCPT ); Fri, 14 Aug 2020 04:54:04 -0400 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E16A6C061383 for ; Fri, 14 Aug 2020 01:54:03 -0700 (PDT) Received: by mail-ot1-x344.google.com with SMTP id h22so6999111otq.11 for ; Fri, 14 Aug 2020 01:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qrkgl+wd+rfLtxQ+IaGBNG9qvFDBZIf0yqGYIVPRz38=; b=GtVGyL300R5qGD+BU1uow0Ki5Tce9qCaGe9xfx7REBR8lkSJOaNaKC0FwqJI+3jruW aaq1KULsVKeqhzKQJUiekwl+RevwUJsiM6zGERTjTPFBDHRN8NCrUkCTR7YZuQpUlg3F KulI/ppYs4/7Uexpl6gvS29Ry4SiDAyq7zGokgoXCGhGA9iRHxl4gia15kJQ1Gk3TkY/ OFhkYZc4dO8G0Na8zmKn66BqoC8PVqgKsCe4t/yAPgTl5g9KXtAKThMQCkj3xIvhnrRC AFUYF6IZOEIZSqEmOxW2GHhJ0pKpSiXrHXyv5I5GWeUMyMn4iAeYLYgx6J9GsNzJa95P ouUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qrkgl+wd+rfLtxQ+IaGBNG9qvFDBZIf0yqGYIVPRz38=; b=IATIBjhnYkrH5H/qwqeazBgFe7/sKBfSCk7eMTEyGh8AoBuQ2nYNB0PKEPxv5+y3Zw O/f5wo7O83LuCcn6y9DL3jSim55/RQnA/M63eTK/4lxnaINrxpPW+Bi2LOrQckGPY6qa gipFhnO9yqVuBGhPyYuRLJQcxv5DXQN1UXAQXf+oUPAKc2Pp1o542KsewYzV+on3IoCn jUdGfUzrFib3VL1As3BCeLCDFXDlX3JuHiJLrgCx3XjKUgUcylKdMVrvsyElUy0uHZLB WxDSPk2/YFeHwUtznKbYt55gHb6zImxnM3764lMqtAUmrPPuEqlT8qyrRZ2fyivZCA0S d+6Q== X-Gm-Message-State: AOAM532UNHapOH29FSecBdMn1Mug//+d1p0vXI73LIyh7PzxL2pt0XLT v3FU2fwuHCcO+p+Arw8xDg/pVFWWCwCTUN/NCiSL3w== X-Received: by 2002:a9d:748f:: with SMTP id t15mr1195809otk.371.1597395242015; Fri, 14 Aug 2020 01:54:02 -0700 (PDT) MIME-Version: 1.0 References: <20200811182107.6515-1-sumit.semwal@linaro.org> <20200811182107.6515-3-sumit.semwal@linaro.org> <20200813194620.GA806622@ravnborg.org> In-Reply-To: <20200813194620.GA806622@ravnborg.org> From: Sumit Semwal Date: Fri, 14 Aug 2020 14:23:50 +0530 Message-ID: Subject: Re: [PATCH v4 2/2] drm: panel: Add tianma nt36672a panel driver To: Sam Ravnborg Cc: Thierry Reding , devicetree@vger.kernel.org, David Airlie , Benni Steini , LKML , DRI mailing list , Bjorn Andersson , Mauro Carvalho Chehab , "David S . Miller" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Sam, Thanks very much for the review. On Fri, 14 Aug 2020 at 01:16, Sam Ravnborg wrote: > > Hi Sumit. > > On Tue, Aug 11, 2020 at 11:51:07PM +0530, Sumit Semwal wrote: > > Some Poco F1 phones have an LCD panel from Tianma, model nt36672a, > > with a resolution of 1080x2246 that operates in DSI video mode. > > > > Add the drm panel driver for it. > > > > During testing, Benni Steini helped us fix > > the reset sequence timing (from 10ms to 20ms), to get the bootanimation > > to work on Android. > > > > With current AOSP, we need to increase it to 200ms - this seems to be a > > safe high value to avoid a white screen occasionally. > > > > Signed-off-by: Sumit Semwal > > Cc: Benni Steini > > Checkpatch is not happy with this patch. > Please fix relevant warnings. > > My checkpatch options: > -q --emacs --strict --show-types > > A lot of details in the following. > Sorry for not catching these before. > > Sam > > > > > --- > > v2: increase reset sequence timing to a safe 200ms > > v4: Since "0425662fdf05: drm: Nuke mode->vrefresh", we have to calculate > > vrefresh on demand. Update for it. > > --- > > MAINTAINERS | 7 + > > drivers/gpu/drm/panel/Kconfig | 11 + > > drivers/gpu/drm/panel/Makefile | 1 + > > drivers/gpu/drm/panel/panel-tianma-nt36672a.c | 858 ++++++++++++++++++ > > 4 files changed, 877 insertions(+) > > create mode 100644 drivers/gpu/drm/panel/panel-tianma-nt36672a.c > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index f77df02e4121..9e4bc8da9b2d 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -5611,6 +5611,13 @@ T: git git://anongit.freedesktop.org/drm/drm-misc > > F: Documentation/devicetree/bindings/display/ste,mcde.txt > > F: drivers/gpu/drm/mcde/ > > > > +DRM DRIVER FOR TIANMA NT36672A PANELS > > +M: Sumit Semwal > > +S: Maintained > > +T: git git://anongit.freedesktop.org/drm/drm-misc > > +F: Documentation/devicetree/bindings/display/panel/tianma,nt36672a-panel.yaml > > +F: drivers/gpu/drm/panel/panel-tianma-nt36672a.c > > + > > DRM DRIVER FOR TDFX VIDEO CARDS > > S: Orphan / Obsolete > > F: drivers/gpu/drm/tdfx/ > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > > index de2f2a452be5..8108a682dcb0 100644 > > --- a/drivers/gpu/drm/panel/Kconfig > > +++ b/drivers/gpu/drm/panel/Kconfig > > @@ -437,6 +437,17 @@ config DRM_PANEL_TPO_TD043MTEA1 > > Say Y here if you want to enable support for TPO TD043MTEA1 800x480 > > 4.3" panel (found on the OMAP3 Pandora board). > > > > +config DRM_PANEL_TIANMA_FHD_NT36672A > > + tristate "TIANMA NT36672A panel" > > + depends on OF > > + depends on DRM_MIPI_DSI > > + depends on BACKLIGHT_CLASS_DEVICE > > + help > > + Say Y here if you want to enable support for the Tianma NT36672A > > + panel. It is seen mostly in Xiaomi Poco F1 mobile phone. > > + The panel has a 1080x2246 resolution and uses 24 bit RGB per pixel. > > + It provides a MIPI DSI interface to the host. > > + > > config DRM_PANEL_TPO_TPG110 > > tristate "TPO TPG 800x400 panel" > > depends on OF && SPI && GPIOLIB > > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > > index e45ceac6286f..472ae9ba8788 100644 > > --- a/drivers/gpu/drm/panel/Makefile > > +++ b/drivers/gpu/drm/panel/Makefile > > @@ -44,6 +44,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o > > obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o > > obj-$(CONFIG_DRM_PANEL_SONY_ACX424AKP) += panel-sony-acx424akp.o > > obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o > > +obj-$(CONFIG_DRM_PANEL_TIANMA_FHD_NT36672A) += panel-tianma-nt36672a.o > > obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o > > obj-$(CONFIG_DRM_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o > > obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o > > diff --git a/drivers/gpu/drm/panel/panel-tianma-nt36672a.c b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c > > new file mode 100644 > > index 000000000000..2941975e039c > > --- /dev/null > > +++ b/drivers/gpu/drm/panel/panel-tianma-nt36672a.c > > @@ -0,0 +1,858 @@ > > +// SPDX-License-Identifier: GPL-2.0+ > > +/* > > + * Copyright (C) 2020 Linaro Ltd > > + * Author: Sumit Semwal > > + */ > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include