From patchwork Wed Oct 7 17:19:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caleb Connolly X-Patchwork-Id: 11822267 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 715276CA for ; Thu, 8 Oct 2020 07:21:12 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 375472087D for ; Thu, 8 Oct 2020 07:21:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=connolly.tech header.i=@connolly.tech header.b="P77AwqaH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 375472087D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=connolly.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F347F6EA37; Thu, 8 Oct 2020 07:20:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-40131.protonmail.ch (mail-40131.protonmail.ch [185.70.40.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id CADAE6E118 for ; Wed, 7 Oct 2020 17:19:49 +0000 (UTC) Date: Wed, 07 Oct 2020 17:19:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=connolly.tech; s=protonmail; t=1602091187; bh=lr01I54W83dQfyPAXxNgr/K8XWBKrwkLjst7BnhvlRw=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=P77AwqaHfzSUfSdSPycIEWqs+dG/IhTlMsCjJTQMpsFg8wJP9H2wIQjxPG4ySI3te ctoDDJKzco1Sju7n++a1l6YeVilr4yXq2S/hGNa3IAHQxO/67K/VlxnGBTL1t7WeQF Wg84/nTVppFrWeP+V/OOADXwYJ744lRreG4OLfUw= To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter From: Caleb Connolly Subject: [PATCH 1/5] drm/panel/oneplus6: Add panel-oneplus6 Message-ID: <20201007171807.285298-2-caleb@connolly.tech> In-Reply-To: <20201007171807.285298-1-caleb@connolly.tech> References: <20201007171807.285298-1-caleb@connolly.tech> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch X-Mailman-Approved-At: Thu, 08 Oct 2020 07:20:54 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Caleb Connolly Cc: Caleb Connolly , ~postmarketos/upstreaming@lists.sr.ht, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 +++++++++++++++++++++++++ 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