Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp1355797imw; Sat, 9 Jul 2022 02:47:07 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s48QCLu8piZM0nxGA57+oT+J92p/2FI/mykvrOv5g2nDf/p2qWkmBWjp9nFgDt5EfBgL3S X-Received: by 2002:a17:902:ebcb:b0:168:e3ba:4b5a with SMTP id p11-20020a170902ebcb00b00168e3ba4b5amr8185121plg.11.1657360026831; Sat, 09 Jul 2022 02:47:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657360026; cv=none; d=google.com; s=arc-20160816; b=dkYjEAPY4PEk6xM6Raag4DdHmK1nOTXs8e7aKL6BQ3yOmwOC55WLf/Eh8v2Qvj4fVT 4ByPLi6cHg3tzoK+qmWbke3IvwtAUmq9HJYOMAGzYlMAnV7IM4RTN3G91Dds2uoSWRfS 0d7i6nrmesZ8KmBaQbt8FJKnJQ9DRjzmtZFKCmqY3eJNLkQ39krft3Vbp9S9ZKg/LZ41 mgCaxPCfi6qWyPHwBycxA1VkpaFYd+puPk1BreEdSkcu5YtWo1RMheZYuqp5P37R4CT6 jQEyrGx1N+xYa3VmiAudaX8e2VJVLk5qH7bEhC0DEvO4sLiUb7QZY0bOP8aobO1ojK/w LAeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=IdOsexCTm1DbOGBMB7hSgC0LQ+yPdYR7j9ULfoLOTkQ=; b=HbmEb04AryUezr5UI2iHMtTTF6LRuEpPVPG2HQlpXgGAGDedGOwBtKN3iattB7/bwD Ta11OqzM/0t4iKMPhh+P5Ge76TcGXtKG6bWsazHCdRz4KkEUTyeXNFUiYClVprsbFbzI lx7D8mDWJyWYhpi/BP7rUTJHPVO5qpDQUgaKfmWMYAL5B2/Xmzu5n7fAcwtJXW/bPTEK 1F2nXFkL9IZxu9DguAiC4B7zFagdbXm7unUgmFlQye37uF1g15M4/MUwGavMBfMPzBEy 2SRUuO5tVPyody5ysBpNDOlQFQMs8J0phMhhr+7m8XyveSdeoyi1VJsAoJPHt1F6RpxZ wJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=TAc+TRI9; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1 header.b=yvNdxKJV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a63dd09000000b00411c101fb71si1511896pgg.87.2022.07.09.02.46.54; Sat, 09 Jul 2022 02:47:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=TAc+TRI9; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed1 header.b=yvNdxKJV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229554AbiGIJak (ORCPT + 99 others); Sat, 9 Jul 2022 05:30:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbiGIJai (ORCPT ); Sat, 9 Jul 2022 05:30:38 -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 ECAED43310 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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