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 <[email protected]>
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 <[email protected]>
Joel Selvaraj <[email protected]>
Nia Espera <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
---
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