Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1299099pxk; Mon, 31 Aug 2020 15:40:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoly/kqa/CTJMg46QK1+OBE9WKhy/ye1tjaoqejVLzdJaP/mm6r6ZtpKvXdq8wqi1RmOAD X-Received: by 2002:a17:906:a84f:: with SMTP id dx15mr2844251ejb.377.1598913650107; Mon, 31 Aug 2020 15:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598913650; cv=none; d=google.com; s=arc-20160816; b=IO0QvrvY/2Jpjk4kLVzSaGkZw/szEWzzwmJ/nlIRJhkHo+Qrra9JqlQPw5EyVmCaC9 +plWu6hPX7McgWY0sLyPnzzuzB/p1CkJNna4L+iF52Yk1BFeyAIqGhcrAEyBkbznzf7O vgFOlTUIiAkn9vv9S4dORLJk297C43CYTou9BDDUNbxkPviUOm98IXxOFg5waXUtfwLW 68kWIJHfsEIUJgUvNqiU7+yr7Z1xH2p0SMAXFshPS2I6V8OMTTAIb2HgnR8YEEAJKRAq tU6/utdcGdN8QbrS05KRk0pjBWi6py72G2qQeTwrQ7ZdsKL82PywBpJFhUGyPSJN3pue 25Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=WcaixiuXt8LTwPUxV7+AZSN5V2CQLT9SZI84GSoT30M=; b=E9zQCfOf3kW7ZODF1Et6e4NBQiilFORqAMl3QdJUprurfpTsI2AOYlNH1DtY+I30gg AMF5+TL5DI2yhlbBFKYi5OaCxQCixSNpv64883Yf36/GNBDyEqzYXti5RWG7+eCloU1j joXRf49BI4AQKHfhegjEDSuzQNZqM7fW1qWoIotYfRdoBrPKxTEyCLVJg5WfP5IoMvIo j9aPJ/3HykHjMlbRS9rQdakOkJDIEIhps7GLm6T4MGr/MzYcDbIh9GSkk3ktpypb7MmJ xbhVaQouiD9fy8Sj2jpdUepj9eB/Ais+Bju8PpGEbNpgb5IIUGoqd8wwiM+eiVcEif3H nQ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Xb8gTq3/"; 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 p60si6037010edd.302.2020.08.31.15.40.26; Mon, 31 Aug 2020 15:40:50 -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="Xb8gTq3/"; 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 S1727101AbgHaTP1 (ORCPT + 99 others); Mon, 31 Aug 2020 15:15:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgHaTPZ (ORCPT ); Mon, 31 Aug 2020 15:15:25 -0400 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 929EDC061573 for ; Mon, 31 Aug 2020 12:15:24 -0700 (PDT) Received: by mail-qk1-x742.google.com with SMTP id p4so7256682qkf.0 for ; Mon, 31 Aug 2020 12:15:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=WcaixiuXt8LTwPUxV7+AZSN5V2CQLT9SZI84GSoT30M=; b=Xb8gTq3/k7PJ5ZGyeYCfFKlKn1cK1F4mtnbxdpeDJdJqta2SF9GSqR0ma0VllMd5rS cMsgyuM+sWkplUEQgaAGSacuwqQVUni7FNqrL+OWoyLW4aamY1Bqnnvie6wClGTxQfCQ Y+vwSBqBD9rY5xMk0inzEk4hA0+HNaPapYKYujAcH8qVF9Pyir1FFNjx0d4vNdkNPxeF cmOmFVqeNDd+EXNelHrOYLWOkop/iaCdCZ9sEvTczGWyTlzfes91dDcrLBIEGsvKf+jB xrO3PcHSN4EIyWUcsXS/VCLxoFdLQ1gP1wfzvydiQ9QDS2eTsH7X/2PZpSp7rMaxZkp3 rkvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WcaixiuXt8LTwPUxV7+AZSN5V2CQLT9SZI84GSoT30M=; b=Z8tI8l1ImWfXI0zSmql1BlPlr+uNjh460HSg596yzkZIPm/17/GX2uACEBl7q0P5y0 v8HvdSjJviCFA+5cKJHPDC7XGTSXzun597bH5ix3xyaKfPLVTXuMA7RiH1b+1KjAU7S9 1faRW1AIbxvbqU/2Zt+3UnrBj3+vlfrB28i/zq8ehkqqgJ7PlBjmlJoLFwBOst48+Hm8 2Alt/HMzeuEjYnbrRGggqj6HpNp8LVcV1tk5txiTM8xcv2DWjqjUCOtLqkDx7zOj5CDa 0xK+7KEbUjG5j1Yqehn+PvEENebXYGYInGMmd0EGxlpnktGCAVncvCFsBqCm+Zvzsm9y bvzQ== X-Gm-Message-State: AOAM532gr1KyICnei0sa/2I1K46dVbiU0jfrR0po4ff1232fGZFH33YW Ie/z18cofUxFNtPbw6zpoN1LEw== X-Received: by 2002:a05:620a:24cc:: with SMTP id m12mr2880275qkn.159.1598901323263; Mon, 31 Aug 2020 12:15:23 -0700 (PDT) Received: from uller (ec2-34-197-84-77.compute-1.amazonaws.com. [34.197.84.77]) by smtp.gmail.com with ESMTPSA id b47sm11796332qta.20.2020.08.31.12.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Aug 2020 12:15:22 -0700 (PDT) Date: Mon, 31 Aug 2020 19:15:21 +0000 From: Bjorn Andersson To: Sumit Semwal Cc: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Mauro Carvalho Chehab , "David S . Miller" , Rob Herring , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Benni Steini Subject: Re: [PATCH v6 2/2] drm: panel: Add novatek nt36672a panel driver Message-ID: <20200831191521.GD468@uller> References: <20200831130251.19769-1-sumit.semwal@linaro.org> <20200831130251.19769-3-sumit.semwal@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200831130251.19769-3-sumit.semwal@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 31 Aug 13:02 UTC 2020, Sumit Semwal wrote: > Novatek NT36672a is a generic DSI IC that drives command and video mode > panels. Add the driver for it. > > Right now adding support for some Poco F1 phones that have an LCD panel > from Tianma connected with this IC, with a resolution of 1080x2246 that > operates in DSI video mode. > > 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 > > --- > 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. > v5: Fixed review comments from Sam: > - rebased on top of drm-misc-next > remove return of drm_panel_add() > remove drm_panel_detach() > - renamed the panel driver file to reflect that this is a novatek > nt36672a display driver and not only for tianma panels. > Adjusted some internal names also to reflect the same. > - corrected changelog to add info about the generic Novatek DSI IC > - corrected compatible string accordingly > - removed pinctrl > - used drm_panel* API for prepare/unprepare/disable/remove > v6: Fixed few review comments on v5 from Sam: > - add dev_err_probe() support > - move DRM_* error printing to dev_err() > - removed a few unnecessary bits > --- > MAINTAINERS | 7 + > drivers/gpu/drm/panel/Kconfig | 10 + > drivers/gpu/drm/panel/Makefile | 1 + > .../gpu/drm/panel/panel-novatek-nt36672a.c | 740 ++++++++++++++++++ > 4 files changed, 758 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36672a.c > > diff --git a/MAINTAINERS b/MAINTAINERS > index 01fb9ee6b951..aeecade2d65f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -5619,6 +5619,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 8d97d07c5871..02600f12a063 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -208,6 +208,16 @@ config DRM_PANEL_NOVATEK_NT35510 > around the Novatek NT35510 display controller, such as some > Hydis panels. > > +config DRM_PANEL_NOVATEK_NT36672A > + tristate "Novatek NT36672A DSI 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 panels built > + around the Novatek NT36672A display controller, such as some > + Tianma panels used in a few Xiaomi Poco F1 mobile phone. > + > config DRM_PANEL_NOVATEK_NT39016 > tristate "Novatek NT39016 RGB/SPI panel" > depends on OF && SPI > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index 15a4e7752951..4a36eb45f670 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -19,6 +19,7 @@ obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o > obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o > obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o > obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) += panel-novatek-nt35510.o > +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o > obj-$(CONFIG_DRM_PANEL_NOVATEK_NT39016) += panel-novatek-nt39016.o > obj-$(CONFIG_DRM_PANEL_MANTIX_MLAF057WE51) += panel-mantix-mlaf057we51.o > obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o > diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36672a.c b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > new file mode 100644 > index 000000000000..675e9d52f3c4 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-novatek-nt36672a.c > @@ -0,0 +1,740 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Copyright (C) 2020 Linaro Ltd > + * Author: Sumit Semwal > + * > + * This driver is for the DSI interface to panels using the NT36672A display driver IC > + * from Novatek. > + * Currently supported are the Tianma FHD+ panels found in some Xiaomi phones, including > + * some variants of the Poco F1 phone. > + * > + * Panels using the Novatek NT37762A IC should add appropriate configuration per-panel and > + * use this driver. > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include