drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-ilitek-ili9806e-dsi.c- Extension
.c- Size
- 17917 bytes
- Lines
- 501
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/err.hlinux/errno.hlinux/kernel.hlinux/mod_devicetable.hlinux/module.hlinux/property.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.hdrm/drm_probe_helper.hvideo/mipi_display.hpanel-ilitek-ili9806e-core.h
Detected Declarations
struct ili9806e_dsi_panel_descstruct ili9806e_dsi_panelfunction ili9806e_dsi_onfunction ili9806e_dsi_offfunction ili9806e_dsi_preparefunction ili9806e_dsi_unpreparefunction ili9806e_dsi_get_modesfunction ili9806e_dsi_get_orientationfunction ili9806e_dsi_probefunction ili9806e_dsi_removefunction com35h3p70ulc_initfunction dmt028vghmcmi_1d_init
Annotated Snippet
struct ili9806e_dsi_panel_desc {
const struct drm_display_mode *display_mode;
unsigned long mode_flags;
enum mipi_dsi_pixel_format format;
unsigned int lanes;
void (*init_sequence)(struct mipi_dsi_multi_context *ctx);
};
struct ili9806e_dsi_panel {
struct mipi_dsi_device *dsi;
const struct ili9806e_dsi_panel_desc *desc;
enum drm_panel_orientation orientation;
};
static int ili9806e_dsi_on(struct ili9806e_dsi_panel *ili9806e)
{
struct mipi_dsi_multi_context ctx = { .dsi = ili9806e->dsi };
if (ili9806e->desc->init_sequence)
ili9806e->desc->init_sequence(&ctx);
mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
mipi_dsi_msleep(&ctx, 120);
mipi_dsi_dcs_set_display_on_multi(&ctx);
return ctx.accum_err;
}
static int ili9806e_dsi_off(struct ili9806e_dsi_panel *panel)
{
struct mipi_dsi_multi_context ctx = { .dsi = panel->dsi };
mipi_dsi_dcs_set_display_off_multi(&ctx);
mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
mipi_dsi_msleep(&ctx, 120);
return ctx.accum_err;
}
static int ili9806e_dsi_prepare(struct drm_panel *panel)
{
struct ili9806e_dsi_panel *ctx = ili9806e_get_transport(panel);
struct device *dev = &ctx->dsi->dev;
int ret;
ret = ili9806e_power_on(dev);
if (ret < 0)
return ret;
ret = ili9806e_dsi_on(ctx);
if (ret < 0) {
ili9806e_power_off(dev);
return ret;
}
return 0;
}
static int ili9806e_dsi_unprepare(struct drm_panel *panel)
{
struct ili9806e_dsi_panel *ctx = ili9806e_get_transport(panel);
struct device *dev = &ctx->dsi->dev;
int ret;
ili9806e_dsi_off(ctx);
ret = ili9806e_power_off(dev);
if (ret < 0)
dev_err(dev, "power off failed: %d\n", ret);
return ret;
}
static int ili9806e_dsi_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
struct ili9806e_dsi_panel *ctx = ili9806e_get_transport(panel);
const struct drm_display_mode *mode = ctx->desc->display_mode;
return drm_connector_helper_get_modes_fixed(connector, mode);
}
static enum drm_panel_orientation ili9806e_dsi_get_orientation(struct drm_panel *panel)
{
struct ili9806e_dsi_panel *ctx = ili9806e_get_transport(panel);
return ctx->orientation;
}
static const struct drm_panel_funcs ili9806e_dsi_funcs = {
Annotation
- Immediate include surface: `linux/device.h`, `linux/err.h`, `linux/errno.h`, `linux/kernel.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/property.h`, `drm/drm_mipi_dsi.h`.
- Detected declarations: `struct ili9806e_dsi_panel_desc`, `struct ili9806e_dsi_panel`, `function ili9806e_dsi_on`, `function ili9806e_dsi_off`, `function ili9806e_dsi_prepare`, `function ili9806e_dsi_unprepare`, `function ili9806e_dsi_get_modes`, `function ili9806e_dsi_get_orientation`, `function ili9806e_dsi_probe`, `function ili9806e_dsi_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.