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: 96914 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1059244vqo; Sun, 21 May 2023 14:24:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65CANZE6MHF5ibqL01fSCqOIyhtCJ1zEMLqTWeDV2180xt498MVfSXzFf6Fg5dbC/2YPfO X-Received: by 2002:a05:6a00:1596:b0:64d:1451:8233 with SMTP id u22-20020a056a00159600b0064d14518233mr13268296pfk.21.1684704279962; Sun, 21 May 2023 14:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684704279; cv=none; d=google.com; s=arc-20160816; b=OBZWDUEdvddkcDyyaLKWRdCvwvw0FX3QvkYvMCpWj1NDsgJkl1FiGuMgDRAldR96nS TL+LohosuI/H+GlXAr2a/ts8xLVVjUPqyYUCY5BgUXwewyDgl//UaMB8CDvgxOIwyKCB eof0PfYoi8nJAVfayJ38xY15xTjN29XFbdT4BFbY1kAmU1BYJOLSlf/ivaWteBZMYKG+ d55Q0F1ZNlGvJYXz9zIFDFbm1xnW+ygG/9uSPXSOsE8UU8ueNdH72RdPKbVBijmUtGgv abveaABKDKzHsIDp5cRm7fVOE1D8MghV57YjWVkLd78ZbsMjT8gbUDwUeOUWqz8as3Je iUyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from; bh=oZuBof2cSudpY7dKEzLBjLpQXMMgjYAI9CFv0zWV2I4=; b=hiCblXhGGTnR6+KH/55SAUbr6/0pmSaF8j8W284RsBW++T5clIJ8CV+WOl8FngHit/ mKshhjq6bnpRwCnNok+f0i8PF0RJKIeHw8UMtIGX2PRN6Y4lGVmdiMYCiIjRUR9f7Trm x9St/z6khKA6Nw+Y5hxUUVbWVeOyxQxI8GPX/fBHCIzIBMU24Qn0Ibk7EsrQ0Mtp+nUq sEHEalKI5fqG2XsrbefGUMpQM+yDb98eeYb8Vn/7cbr12x+wDGPobaQZ47BcMfsG83AO fw9ejBu65tU6sauAEMpEOd3CD0TdmSViPsaLg3fvte/d/n1Y9+cUeICOlyHxd37WByaR 4Oyg== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l123-20020a633e81000000b005348946df72si3562902pga.126.2023.05.21.14.24.28; Sun, 21 May 2023 14:24:39 -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; 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 S231414AbjEUVXs (ORCPT + 99 others); Sun, 21 May 2023 17:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231178AbjEUVXW (ORCPT ); Sun, 21 May 2023 17:23:22 -0400 Received: from relay07.th.seeweb.it (relay07.th.seeweb.it [IPv6:2001:4b7a:2000:18::168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5143121 for ; Sun, 21 May 2023 14:23:19 -0700 (PDT) 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 Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, Dmitry Baryshkov , Abhinav Kumar , Kuogee Hsieh , Jessica Zhang , Marijn Suijten X-Mailer: b4 0.12.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766540475044440750?= X-GMAIL-MSGID: =?utf-8?q?1766540475044440750?= 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