Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2563893pxu; Sun, 18 Oct 2020 07:08:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+tu5NeN2H4QRL0tJUxHHHVNcJlMF4yl5G9g2132ceGTWgkRBmntVbMDcHBXXH4BcVrkQ X-Received: by 2002:a17:906:c802:: with SMTP id cx2mr12263570ejb.298.1603030100576; Sun, 18 Oct 2020 07:08:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603030100; cv=none; d=google.com; s=arc-20160816; b=C1R8YIhCDGMVpSuj655TLkp9wTRIyTyA585ei1idclYKNnrX0PCb8khox8sf7EEBJ4 Wch8chne4m5qQfhkk4AkEVHWWuBp/W4yl1qzvTXNn1oOz+2WUSoW2o9sV7SXc8pbGDSF xAQR73qqvRxDe5S6qjfNsWDpooxWAzLAqyFW9FMDDaKtaxy+65o6p0wFzDGCR2nU+3bU s5QM47aRnAUTKyW2M4zme06N4D13twO7/Vtb0IPxKJcv4BtvKatMh6lB4fkKSpArvyw9 7CbxiMhKu8jN1lGReanP9w2ySW6HMH6DYjmpiaX7obOqB0IEbZJjNwUyaWaTYsUc0hqg 9euw== 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; bh=Xu6v/32i4ETp0EbSQ+nsfyD7tJsm8OcCOEn2bF0UbAM=; b=RnX60uzwWK1CcKtQyez20tyGzDPnrRhzdGwTJDS9GEITPQbKB4UL5MHFLIYl0BWY+e VafhBRaFy4moO2K2L3Bomb13CHts0OCrcQsvTbJFfvBGeAehOoPJq+BKFpIXYpBO5L4/ 3yas0BgSVpagHFdinDIWJ1QWuNGBtcY/D4eGIqJbtH7VvQiKvFDczKHoBDL7Zbwb5e84 mASjktRbww+jxOR79BZKvgCaLxoPeEE3MlSsRggKw/Ay9AaNlfAWbP02TQwlUEmc0+yc nZlPt/8+eDP5kf9twE7e0L8GWX+PXiowKSzY5VzFPxs19y9GYUZ2hB65utIveeetIQue nhCw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si5817916eja.409.2020.10.18.07.07.28; Sun, 18 Oct 2020 07:08:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbgJRNf4 (ORCPT + 99 others); Sun, 18 Oct 2020 09:35:56 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:39114 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgJRNfz (ORCPT ); Sun, 18 Oct 2020 09:35:55 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (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 3A47520020; Sun, 18 Oct 2020 15:35:48 +0200 (CEST) Date: Sun, 18 Oct 2020 15:35:46 +0200 From: Sam Ravnborg To: Caleb Connolly Cc: linux-arm-msm@vger.kernel.org, Thierry Reding , David Airlie , Daniel Vetter , ~postmarketos/upstreaming@lists.sr.ht, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/5] drm/panel/oneplus6: Add panel-oneplus6 Message-ID: <20201018133546.GA352707@ravnborg.org> References: <20201007174736.292968-1-caleb@connolly.tech> <20201007174736.292968-2-caleb@connolly.tech> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201007174736.292968-2-caleb@connolly.tech> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=S433PrkP c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=pG8NhYCFD_6Fsa5lt6wA:9 a=CjuIK1q_8ugA:10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Caleb. I have missed to provice review feedback so here goes. There is some improvements that can be made as the infrastructure has evolved since the driver was started. But despite the number of comments below it is all trivial and the driver looks good in general. I look forward to see the next revision. Sam On Wed, Oct 07, 2020 at 05:49:08PM +0000, Caleb Connolly wrote: > This commit adds support for the display panels used in the OnePlus 6 / > T devices. > > The OnePlus 6/T devices use different panels however they are > functionally identical with much of the commands being shared. The > panels don't appear to be used by any other devices some combine them as > one driver that is specific to the devices. > > The panels are: samsung,sofef00 > and samsung,s6e3fc2x01 > > Signed-off-by: Caleb Connolly > --- > drivers/gpu/drm/panel/Kconfig | 12 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-oneplus6.c | 418 +++++++++++++++++++++++++ It would be better to name the driver after the panels and not their user. So something like panel-samsung-sofef00. It is OK to name it after one panel and let it support mroe than one panel. The Kconfig description could then expain where it is used. > 3 files changed, 431 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-oneplus6.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index de2f2a452be5..d72862265400 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -229,6 +229,18 @@ config DRM_PANEL_OLIMEX_LCD_OLINUXINO > Say Y here if you want to enable support for Olimex Ltd. > LCD-OLinuXino panel. > > +config DRM_PANEL_ONEPLUS6 > + tristate "OnePlus 6/6T Samsung AMOLED DSI command mode panels" > + depends on OF > + depends on DRM_MIPI_DSI > + depends on BACKLIGHT_CLASS_DEVICE > + select VIDEOMODE_HELPERS > + help > + Say Y or M here if you want to enable support for the Samsung AMOLED > + command mode panels found in the OnePlus 6/6T smartphones. > + > + The panels are 2280x1080@60Hz and 2340x1080@60Hz respectively > + > config DRM_PANEL_ORISETECH_OTM8009A > tristate "Orise Technology otm8009a 480x800 dsi 2dl panel" > depends on OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index e45ceac6286f..017539056f53 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -21,6 +21,7 @@ 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_NT39016) += panel-novatek-nt39016.o > obj-$(CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO) += panel-olimex-lcd-olinuxino.o > +obj-$(CONFIG_DRM_PANEL_ONEPLUS6) += panel-oneplus6.o > obj-$(CONFIG_DRM_PANEL_ORISETECH_OTM8009A) += panel-orisetech-otm8009a.o > obj-$(CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS) += panel-osd-osd101t2587-53ts.o > obj-$(CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00) += panel-panasonic-vvx10f034n00.o > diff --git a/drivers/gpu/drm/panel/panel-oneplus6.c b/drivers/gpu/drm/panel/panel-oneplus6.c > new file mode 100644 > index 000000000000..5e212774b1e0 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-oneplus6.c > @@ -0,0 +1,418 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* Copyright (c) 2020 Caleb Connolly > + * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree: > + * Copyright (c) 2020, The Linux Foundation. All rights reserved. > + * > + * Caleb Connolly > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include