Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3326932rwb; Fri, 9 Dec 2022 13:00:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6DhaVE6gte4R/JUR5SiwrpoccMzOLOiwwuTnlzFLUh5Hp/IVhMnn7mAAmRj1YJIGLUe/DN X-Received: by 2002:a17:906:d787:b0:7c1:1e5a:9bfb with SMTP id pj7-20020a170906d78700b007c11e5a9bfbmr6539334ejb.3.1670619615010; Fri, 09 Dec 2022 13:00:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670619614; cv=none; d=google.com; s=arc-20160816; b=c4QNQLm2Pa5VQN5CqsmBeFuu+aRWaQhE3l2+qhljRAdHcGHkHpYczrW6zg2LrGIsLr zUQ+JRnyIciCKkh87ZVJ9Rm4SDvxtQj5VxWHPKLPK+bTMLr7c1513wERm0btclFLPR1C XxXHo+Qkmh1rPiNWwAhVJbvYz0mh9OgD7ErH5EXZd3Ya2XbnPt1ha0NhqALo2Ovs6kqK 3ak9RkAVGw+wT7d4+Fmr595liY5rl7ypJvGLUcQsZrXxE3Lz4DIHS8IuKxIwzPnpUowx QKR19T0rNJrVcm1xnth3ZC15OBqB910no4jeG9gccUTpATgBiP3kXNeZlRY2VL1wffPf FP3w== 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=Wcc2Tu1wA0F20q4VjsAeuowDJOHXw/RbQPvCEXH/1bw=; b=GDQyvq2LymzM3MhMp7J6KP4CpCMYjFOB8X+uvZCHHI+uJnW0CtaaZtDeQnRbIFhKo8 QgHB6ZyxAnmdKfxh1FMbkc2/G/HHvvZra5VXR7aZX55vedx8f1ciWeLXW0eG+2Sv1QRb 2WMF/bqaWfK7yy9RAncnczIhnNf/DPR4ZJW0p999ySlaqH76z91k+HXvJdl+dZeS6kaE Z6k3v33E4u+selvs+HgDQL8gL7TKOpinmUkE5HMZSOigEwjlww2IydYcxBV8/sHPcV27 FB7tz1fQtLqLhc/E/9/bailgImYruISYrEP46i7RGgwh04X6IrayqmXyWZfVlDXtJssC Ny4g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa16-20020a170907869000b007be1ba9fba1si577528ejc.948.2022.12.09.12.59.55; Fri, 09 Dec 2022 13:00:14 -0800 (PST) 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 S229668AbiLIUqt (ORCPT + 75 others); Fri, 9 Dec 2022 15:46:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229538AbiLIUqs (ORCPT ); Fri, 9 Dec 2022 15:46:48 -0500 Received: from relay06.th.seeweb.it (relay06.th.seeweb.it [5.144.164.167]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 372F0ABA29 for ; Fri, 9 Dec 2022 12:46:46 -0800 (PST) Received: from SoMainline.org (94-209-172-39.cable.dynamic.v4.ziggo.nl [94.209.172.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id 432FF3F25A; Fri, 9 Dec 2022 21:46:44 +0100 (CET) Date: Fri, 9 Dec 2022 21:46:43 +0100 From: Marijn Suijten To: Konrad Dybcio Cc: ~postmarketos/upstreaming@lists.sr.ht, martin.botka@somainline.org, angelogioacchino.delregno@somainline.org, jamipkettunen@somainline.org, Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v3 2/2] gpu/drm/panel: Add Sony TD4353 JDI panel driver Message-ID: <20221209204643.wvlq7t2w4sa4a3i7@SoMainline.org> References: <20220930180812.32210-1-konrad.dybcio@somainline.org> <20220930180812.32210-2-konrad.dybcio@somainline.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220930180812.32210-2-konrad.dybcio@somainline.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 On 2022-09-30 20:08:11, Konrad Dybcio wrote: > Add support for the Sony TD4353 JDI 2160x1080 display panel used in This is a vertical panel of 1080x2160 right? > some Sony Xperia XZ2 and XZ2 Compact smartphones. Due to the specifics > of smartphone manufacturing, it is impossible to retrieve a better name > for this panel. > > This revision adds support for the default 60 Hz configuration, however > there could possibly be some room for expansion, as the display panels > used on Sony devices have historically been capable of >2x refresh rate > overclocking. > > Signed-off-by: Konrad Dybcio Reviewed-by: Marijn Suijten Apart from some minor nits about how we can change seemingly magical hex constants to a decimal represntation, which makes it more obvious (to the reader) that these are just width-1 and height-1. > --- > Changes since v2: > - "GPL v2" -> "GPL" > - add missing S-o-b (how embarassing) > - move { after sony_td4353_assert_reset_gpios() to a new line > > drivers/gpu/drm/panel/Kconfig | 10 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-sony-td4353-jdi.c | 329 ++++++++++++++++++ > 3 files changed, 340 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-sony-td4353-jdi.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index a582ddd583c2..6ef1b48169b5 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -637,6 +637,16 @@ config DRM_PANEL_SONY_ACX565AKM > Say Y here if you want to enable support for the Sony ACX565AKM > 800x600 3.5" panel (found on the Nokia N900). > > +config DRM_PANEL_SONY_TD4353_JDI > + tristate "Sony TD4353 JDI 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 Tama > + TD4353 JDI command mode panel as found on some Sony Xperia > + XZ2 and XZ2 Compact smartphones. > + > config DRM_PANEL_SONY_TULIP_TRULY_NT35521 > tristate "Sony Tulip Truly NT35521 panel" > depends on GPIOLIB && OF > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index 8e71aa7581b8..8ef27bc86f94 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -64,6 +64,7 @@ obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o > 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_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 > obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o > diff --git a/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c > new file mode 100644 > index 000000000000..11db62992b8b > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-sony-td4353-jdi.c > @@ -0,0 +1,329 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright (c) 2022 Konrad Dybcio > + * > + * Generated with linux-mdss-dsi-panel-driver-generator with a > + * substantial amount of manual adjustments. > + * > + * SONY Downstream kernel calls this one: > + * - "JDI ID3" for Akari (XZ2) > + * - "JDI ID4" for Apollo (XZ2 Compact) > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include