[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d13cdf83-22df-4a24-a711-2db4abe3a0a8@ixit.cz>
Date: Thu, 16 Oct 2025 22:46:56 +0200
From: David Heidelberg <david@...t.cz>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: Neil Armstrong <neil.armstrong@...aro.org>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Thierry Reding
<thierry.reding@...il.com>, Sam Ravnborg <sam@...nborg.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konradybcio@...nel.org>,
Casey Connolly <casey.connolly@...aro.org>,
Jessica Zhang <jesszhan0024@...il.com>, dri-devel@...ts.freedesktop.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, phone-devel@...r.kernel.org
Subject: Re: [PATCH v3 4/8] drm/panel: Add Samsung S6E3FC2X01 DDIC with
AMS641RW panel
On 16/10/2025 22:12, Dmitry Baryshkov wrote:
> On Thu, Oct 16, 2025 at 06:16:59PM +0200, David Heidelberg via B4 Relay wrote:
>> From: David Heidelberg <david@...t.cz>
>>
>> Add panel driver used in the OnePlus 6T.
>>
>> No datasheet, based mostly on EDK2 init sequence and the downstream driver.
>>
>> Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01"
>> by OnePlus 6T device-tree.
>> The reason is because DDIC itself without knowing the panel type used
>> with it will not give the driver enough information about the panel used,
>> as the panel cannot be autodetected.
>> While would be more practical to support the original compatible,
>> I would like to avoid it, to prevent confusing devs upstreaming DDICs.
>>
>> Based on work of:
>> Casey Connolly <casey@...nolly.tech>
>> Joel Selvaraj <foss@...lselvaraj.com>
>> Nia Espera <a5b6@...eup.net>
>>
>> Signed-off-by: David Heidelberg <david@...t.cz>
>> ---
>> MAINTAINERS | 1 +
>> drivers/gpu/drm/panel/Kconfig | 13 +
>> drivers/gpu/drm/panel/Makefile | 1 +
>> drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 399 +++++++++++++++++++++++
>> 4 files changed, 414 insertions(+)
>>
>> +
>> +static const struct drm_display_mode ams641rw_mode = {
>> + .clock = (1080 + 72 + 16 + 36) * (2340 + 32 + 4 + 18) * 60 / 1000,
>> + .hdisplay = 1080,
>> + .hsync_start = 1080 + 72,
>> + .hsync_end = 1080 + 72 + 16,
>> + .htotal = 1080 + 72 + 16 + 36,
>> + .vdisplay = 2340,
>> + .vsync_start = 2340 + 32,
>> + .vsync_end = 2340 + 32 + 4,
>> + .vtotal = 2340 + 32 + 4 + 18,
>> + .width_mm = 68,
>> + .height_mm = 145,
>> +};
>> +
>> +static int s6e3fc2x01_get_modes(struct drm_panel *panel,
>> + struct drm_connector *connector)
>> +{
>> + struct drm_display_mode *mode;
>> +
>> + mode = drm_mode_duplicate(connector->dev, &ams641rw_mode);
>> + if (!mode)
>> + return -ENOMEM;
>> +
>> + drm_mode_set_name(mode);
>> +
>> + mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
>> + connector->display_info.width_mm = mode->width_mm;
>> + connector->display_info.height_mm = mode->height_mm;
>> + drm_mode_probed_add(connector, mode);
>
> drm_connector_helper_get_modes_fixed()
Thanks, next version will have it.>
>> +
>> + return 1;
>> +}
>> +
>> +
>> +static const struct of_device_id s6e3fc2x01_of_match[] = {
>> + /* samsung,s6e3fc2x01 will default to the AMS641RW mode (legacy) */
>> + { .compatible = "samsung,s6e3fc2x01", .data = &ams641rw_mode },
>
> Is there a need to probide this kind of legacy?
I don't know. I don't see the need to provide it, but I understood you
may want to have it. If not, please tell me and I'll happily remove it
from next version.
David
>
>> + { .compatible = "samsung,s6e3fc2x01-ams641rw", .data = &ams641rw_mode },
>> + { /* sentinel */ }
>> +};
>> +MODULE_DEVICE_TABLE(of, s6e3fc2x01_of_match);
>> +
>
--
David Heidelberg
Powered by blists - more mailing lists