drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-samsung-s6e3fa7.c- Extension
.c- Size
- 6730 bytes
- Lines
- 257
- 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/backlight.hlinux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/of.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct s6e3fa7_panelfunction s6e3fa7_panel_resetfunction s6e3fa7_panel_onfunction s6e3fa7_panel_preparefunction s6e3fa7_panel_unpreparefunction s6e3fa7_panel_disablefunction s6e3fa7_panel_get_modesfunction s6e3fa7_panel_bl_update_statusfunction s6e3fa7_panel_bl_get_brightnessfunction s6e3fa7_panel_create_backlightfunction s6e3fa7_panel_probefunction s6e3fa7_panel_remove
Annotated Snippet
struct s6e3fa7_panel {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
};
static inline struct s6e3fa7_panel *to_s6e3fa7_panel(struct drm_panel *panel)
{
return container_of(panel, struct s6e3fa7_panel, panel);
}
static void s6e3fa7_panel_reset(struct s6e3fa7_panel *ctx)
{
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
usleep_range(1000, 2000);
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(10000, 11000);
}
static int s6e3fa7_panel_on(struct mipi_dsi_device *dsi)
{
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_dcs_set_tear_on_multi(&dsi_ctx, MIPI_DSI_DCS_TEAR_MODE_VBLANK);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0x5a, 0x5a);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf4,
0xbb, 0x23, 0x19, 0x3a, 0x9f, 0x0f, 0x09, 0xc0,
0x00, 0xb4, 0x37, 0x70, 0x79, 0x69);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf0, 0xa5, 0xa5);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x20);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static int s6e3fa7_panel_prepare(struct drm_panel *panel)
{
struct s6e3fa7_panel *ctx = to_s6e3fa7_panel(panel);
int ret;
s6e3fa7_panel_reset(ctx);
ret = s6e3fa7_panel_on(ctx->dsi);
if (ret < 0)
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
return ret;
}
static int s6e3fa7_panel_unprepare(struct drm_panel *panel)
{
struct s6e3fa7_panel *ctx = to_s6e3fa7_panel(panel);
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
return 0;
}
static int s6e3fa7_panel_disable(struct drm_panel *panel)
{
struct s6e3fa7_panel *ctx = to_s6e3fa7_panel(panel);
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
return dsi_ctx.accum_err;
}
static const struct drm_display_mode s6e3fa7_panel_mode = {
.clock = (1080 + 32 + 32 + 78) * (2220 + 32 + 4 + 78) * 60 / 1000,
.hdisplay = 1080,
.hsync_start = 1080 + 32,
.hsync_end = 1080 + 32 + 32,
.htotal = 1080 + 32 + 32 + 78,
.vdisplay = 2220,
.vsync_start = 2220 + 32,
.vsync_end = 2220 + 32 + 4,
.vtotal = 2220 + 32 + 4 + 78,
.width_mm = 62,
.height_mm = 127,
};
static int s6e3fa7_panel_get_modes(struct drm_panel *panel,
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `video/mipi_display.h`, `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`.
- Detected declarations: `struct s6e3fa7_panel`, `function s6e3fa7_panel_reset`, `function s6e3fa7_panel_on`, `function s6e3fa7_panel_prepare`, `function s6e3fa7_panel_unprepare`, `function s6e3fa7_panel_disable`, `function s6e3fa7_panel_get_modes`, `function s6e3fa7_panel_bl_update_status`, `function s6e3fa7_panel_bl_get_brightness`, `function s6e3fa7_panel_create_backlight`.
- 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.