From patchwork Sun May 21 21:23:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marijn Suijten X-Patchwork-Id: 13249588 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 11553C7EE2D for ; Sun, 21 May 2023 21:23:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D07B110E206; Sun, 21 May 2023 21:23:37 +0000 (UTC) Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by gabe.freedesktop.org (Postfix) with ESMTPS id C570010E202 for ; Sun, 21 May 2023 21:23:19 +0000 (UTC) Received: from Marijn-Arch-PC.localdomain (94-211-6-86.cable.dynamic.v4.ziggo.nl [94.211.6.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 9316D3F36C; Sun, 21 May 2023 23:23:17 +0200 (CEST) From: Marijn Suijten Date: Sun, 21 May 2023 23:23:12 +0200 Subject: [PATCH RFC 10/10] drm/panel/sony-griffin-samsung: Add panel driver for Sony Xperia 1 MIME-Version: 1.0 Message-Id: <20230521-drm-panels-sony-v1-10-541c341d6bee@somainline.org> References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson X-Mailer: b4 0.12.2 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: , Cc: devicetree@vger.kernel.org, Marijn Suijten , Jami Kettunen , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Abhinav Kumar , Konrad Dybcio , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Dmitry Baryshkov , Jessica Zhang , Kuogee Hsieh Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The Sony Xperia 1 (codename kumano griffin) features an unnamed 4k OLED DSI cmd mode panel produced by Samsung. It can be driven in a 1644x3840@60 or 1096x2560@60 mode, and always has Display Stream Compression 1.1 enabled. Signed-off-by: Marijn Suijten --- drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-sony-griffin-samsung.c | 410 +++++++++++++++++++++ 3 files changed, 424 insertions(+) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 8e2668153bce2..888b5152ca55e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -743,6 +743,19 @@ config DRM_PANEL_SONY_AKATSUKI_LGD This panel uses Display Stream Compression 1.1. +config DRM_PANEL_SONY_GRIFFIN_SAMSUNG + tristate "Sony Xperia 1 4k OLED panel" + depends on GPIOLIB && OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Sony Xperia 1 4k + 6.5" OLED DSI cmd mode panel produced by Samsung. + + This panel uses Display Stream Compression 1.1. + + The panel features a 1644x3840@60 and 1096x2560@60 mode. + config DRM_PANEL_SONY_TD4353_JDI tristate "Sony TD4353 JDI panel" depends on GPIOLIB && OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 52dcd82e33120..734d32987330d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -74,6 +74,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7703) += panel-sitronix-st7703.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_AKATSUKI_LGD) += panel-sony-akatsuki-lgd.o +obj-$(CONFIG_DRM_PANEL_SONY_GRIFFIN_SAMSUNG) += panel-sony-griffin-samsung.o obj-$(CONFIG_DRM_PANEL_SONY_TD4353_JDI) += panel-sony-td4353-jdi.o obj-$(CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521) += panel-sony-tulip-truly-nt35521.o obj-$(CONFIG_DRM_PANEL_TDO_TL070WSH30) += panel-tdo-tl070wsh30.o diff --git a/drivers/gpu/drm/panel/panel-sony-griffin-samsung.c b/drivers/gpu/drm/panel/panel-sony-griffin-samsung.c new file mode 100644 index 0000000000000..755cec7f9119b --- /dev/null +++ b/drivers/gpu/drm/panel/panel-sony-griffin-samsung.c @@ -0,0 +1,410 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright (c) 2023 Marijn Suijten + +#include +#include +#include +#include +#include +#include + +#include