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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0959AC433EF for ; Sat, 9 Jul 2022 09:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229448AbiGIJal (ORCPT ); Sat, 9 Jul 2022 05:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbiGIJaj (ORCPT ); Sat, 9 Jul 2022 05:30:39 -0400 Received: from mailrelay1-1.pub.mailoutpod1-cph3.one.com (mailrelay1-1.pub.mailoutpod1-cph3.one.com [46.30.210.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECB9643E4C for ; Sat, 9 Jul 2022 02:30:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=IdOsexCTm1DbOGBMB7hSgC0LQ+yPdYR7j9ULfoLOTkQ=; b=TAc+TRI9Xt6L6CvuOcgbuFGDn7dbo2w+JxGySLsxF+k5agG0gGWcUgjl8SpoG/xAQOt8DfXYb0Qy6 14ckbNDw3d3FoS8U2AJa7FI74WUhpkusKce1HMEONIw45SEDYg4OkP+Kn7B4Yn6dF2qREuyHJkWOwC QLdQZVBDpSzYi2927yWisNKWtb5R8w0xRfy3C66SNBTVoRGih9nU5Cy5cM6SzoH0g/ebYRHVehoCtz bgFYY04Jr2zFMH5DUUnEc4475uig+JINBNh7FYjh0BMS7HVLjZmYIsoL/kqSLCezHvJkYLUvcyIlxJ KZ8RhVCOJbaV6OT/xfGnryimKnmbSYw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=IdOsexCTm1DbOGBMB7hSgC0LQ+yPdYR7j9ULfoLOTkQ=; b=yvNdxKJVpsPK8paWoYa2H9lux8XzxApep349W9HZqkQU3DpxehomNGPmDKX4aRvFob+qB/tcrxbMS xvmwpW0BA== X-HalOne-Cookie: f694ca950a74160f82af1c72980ebbcf61aeb4fe X-HalOne-ID: c7271ad8-ff69-11ec-a6c6-d0431ea8a283 Received: from mailproxy2.cst.dirpod3-cph3.one.com (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay1.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id c7271ad8-ff69-11ec-a6c6-d0431ea8a283; Sat, 09 Jul 2022 09:30:32 +0000 (UTC) Date: Sat, 9 Jul 2022 11:30:30 +0200 From: Sam Ravnborg To: MollySophia Cc: Thierry Reding , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] drm: panel: Add novatek nt35596s panel driver Message-ID: References: <20220708021824.9167-1-mollysophia379@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220708021824.9167-1-mollysophia379@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Molly, Thanks for submitting this driver. A few comments follows - the most relevant is the error handling when unprepare/disable. Please take a look and re-submit. Sam On Fri, Jul 08, 2022 at 10:18:23AM +0800, MollySophia wrote: > Novatek NT35596s is a generic DSI IC that drives command and video mode > panels. Add the driver for it. Currently add support for the LCD panel > from JDI connected with this IC, as found on Xiaomi Mi Mix2s phones. > > Signed-off-by: MollySophia > --- > drivers/gpu/drm/panel/Kconfig | 9 + > drivers/gpu/drm/panel/Makefile | 1 + > .../gpu/drm/panel/panel-jdi-fhd-nt35596s.c | 464 ++++++++++++++++++ > 3 files changed, 474 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index d5176f75248f..a54389c107bc 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -231,6 +231,15 @@ config DRM_PANEL_JDI_R63452 > Say Y here if you want to enable support for the JDI R63452 > DSI command mode panel as found in Xiaomi Mi 5 Devices. > > +config DRM_PANEL_JDI_NT35596S > + tristate "JDI NT35596S Full HD 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 JDI NT35596S > + DSI video mode panel as found in Xiaomi Mi Mix2s Devices. > + Alphabetic order is preferred, so it comes before DRM_PANEL_JDI_R63452 > config DRM_PANEL_KHADAS_TS050 > tristate "Khadas TS050 panel" > depends on OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index ef89dada021d..40db5e6dcbf5 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -21,6 +21,7 @@ obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o > obj-$(CONFIG_DRM_PANEL_INNOLUX_TD4328) += panel-innolux-td4328.o > obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o > obj-$(CONFIG_DRM_PANEL_JDI_R63452) += panel-jdi-fhd-r63452.o > +obj-$(CONFIG_DRM_PANEL_JDI_NT35596S) += panel-jdi-fhd-nt35596s.o Alphabetic order is preferred, so again before CONFIG_DRM_PANEL_JDI_R63452 > obj-$(CONFIG_DRM_PANEL_KHADAS_TS050) += panel-khadas-ts050.o > obj-$(CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04) += panel-kingdisplay-kd097d04.o > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o > diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c b/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c > new file mode 100644 > index 000000000000..0793bcd872e2 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-jdi-fhd-nt35596s.c > @@ -0,0 +1,464 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2022 Molly Sophia > + * > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include