drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c- Extension
.c- Size
- 10487 bytes
- Lines
- 343
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hlinux/regulator/consumer.hdrm/display/drm_dsc.hdrm/display/drm_dsc_helper.hdrm/drm_mipi_dsi.hdrm/drm_probe_helper.hdrm/drm_panel.h
Detected Declarations
struct s6e3ha8function s6e3ha8_amb577px01_wqhd_resetfunction s6e3ha8_amb577px01_wqhd_onfunction s6e3ha8_enablefunction s6e3ha8_disablefunction s6e3ha8_amb577px01_wqhd_preparefunction s6e3ha8_amb577px01_wqhd_unpreparefunction s6e3ha8_amb577px01_wqhd_get_modesfunction s6e3ha8_amb577px01_wqhd_probefunction s6e3ha8_amb577px01_wqhd_remove
Annotated Snippet
struct s6e3ha8 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct drm_dsc_config dsc;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
};
static const struct regulator_bulk_data s6e3ha8_supplies[] = {
{ .supply = "vdd3" },
{ .supply = "vci" },
{ .supply = "vddr" },
};
static inline
struct s6e3ha8 *to_s6e3ha8_amb577px01_wqhd(struct drm_panel *panel)
{
return container_of(panel, struct s6e3ha8, panel);
}
#define s6e3ha8_test_key_on_lvl2(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0x5a, 0x5a)
#define s6e3ha8_test_key_off_lvl2(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0xa5, 0xa5)
#define s6e3ha8_test_key_on_lvl3(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0x5a, 0x5a)
#define s6e3ha8_test_key_off_lvl3(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0xa5, 0xa5)
#define s6e3ha8_test_key_on_lvl1(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0x9f, 0xa5, 0xa5)
#define s6e3ha8_test_key_off_lvl1(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0x9f, 0x5a, 0x5a)
#define s6e3ha8_afc_off(ctx) \
mipi_dsi_dcs_write_seq_multi(ctx, 0xe2, 0x00, 0x00)
static void s6e3ha8_amb577px01_wqhd_reset(struct s6e3ha8 *priv)
{
gpiod_set_value_cansleep(priv->reset_gpio, 1);
usleep_range(5000, 6000);
gpiod_set_value_cansleep(priv->reset_gpio, 0);
usleep_range(5000, 6000);
gpiod_set_value_cansleep(priv->reset_gpio, 1);
usleep_range(5000, 6000);
}
static int s6e3ha8_amb577px01_wqhd_on(struct s6e3ha8 *priv)
{
struct mipi_dsi_device *dsi = priv->dsi;
struct mipi_dsi_multi_context ctx = { .dsi = dsi };
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
s6e3ha8_test_key_on_lvl1(&ctx);
s6e3ha8_test_key_on_lvl2(&ctx);
mipi_dsi_compression_mode_multi(&ctx, true);
s6e3ha8_test_key_off_lvl2(&ctx);
mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
usleep_range(5000, 6000);
s6e3ha8_test_key_on_lvl2(&ctx);
mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x13);
s6e3ha8_test_key_off_lvl2(&ctx);
usleep_range(10000, 11000);
s6e3ha8_test_key_on_lvl2(&ctx);
mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x13);
s6e3ha8_test_key_off_lvl2(&ctx);
/* OMOK setting 1 (Initial setting) - Scaler Latch Setting Guide */
s6e3ha8_test_key_on_lvl2(&ctx);
mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x07);
/* latch setting 1 : Scaler on/off & address setting & PPS setting -> Image update latch */
mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x3c, 0x10);
mipi_dsi_dcs_write_seq_multi(&ctx, 0xb0, 0x0b);
/* latch setting 2 : Ratio change mode -> Image update latch */
mipi_dsi_dcs_write_seq_multi(&ctx, 0xf2, 0x30);
/* OMOK setting 2 - Seamless setting guide : WQHD */
mipi_dsi_dcs_write_seq_multi(&ctx, 0x2a, 0x00, 0x00, 0x05, 0x9f); /* CASET */
mipi_dsi_dcs_write_seq_multi(&ctx, 0x2b, 0x00, 0x00, 0x0b, 0x8f); /* PASET */
mipi_dsi_dcs_write_seq_multi(&ctx, 0xba, 0x01); /* scaler setup : scaler off */
s6e3ha8_test_key_off_lvl2(&ctx);
mipi_dsi_dcs_write_seq_multi(&ctx, 0x35, 0x00); /* TE Vsync ON */
s6e3ha8_test_key_on_lvl2(&ctx);
mipi_dsi_dcs_write_seq_multi(&ctx, 0xed, 0x4c); /* ERR_FG */
s6e3ha8_test_key_off_lvl2(&ctx);
Annotation
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `linux/regulator/consumer.h`, `drm/display/drm_dsc.h`, `drm/display/drm_dsc_helper.h`, `drm/drm_mipi_dsi.h`.
- Detected declarations: `struct s6e3ha8`, `function s6e3ha8_amb577px01_wqhd_reset`, `function s6e3ha8_amb577px01_wqhd_on`, `function s6e3ha8_enable`, `function s6e3ha8_disable`, `function s6e3ha8_amb577px01_wqhd_prepare`, `function s6e3ha8_amb577px01_wqhd_unprepare`, `function s6e3ha8_amb577px01_wqhd_get_modes`, `function s6e3ha8_amb577px01_wqhd_probe`, `function s6e3ha8_amb577px01_wqhd_remove`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.