drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-osd-osd101t2587-53ts.c- Extension
.c- Size
- 5048 bytes
- Lines
- 209
- 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/module.hlinux/of.hlinux/regulator/consumer.hdrm/drm_crtc.hdrm/drm_device.hdrm/drm_mipi_dsi.hdrm/drm_panel.hvideo/mipi_display.h
Detected Declarations
struct osd101t2587_panelfunction osd101t2587_panel_disablefunction osd101t2587_panel_unpreparefunction osd101t2587_panel_preparefunction osd101t2587_panel_enablefunction osd101t2587_panel_get_modesfunction osd101t2587_panel_addfunction osd101t2587_panel_probefunction osd101t2587_panel_remove
Annotated Snippet
struct osd101t2587_panel {
struct drm_panel base;
struct mipi_dsi_device *dsi;
struct regulator *supply;
const struct drm_display_mode *default_mode;
};
static inline struct osd101t2587_panel *ti_osd_panel(struct drm_panel *panel)
{
return container_of(panel, struct osd101t2587_panel, base);
}
static int osd101t2587_panel_disable(struct drm_panel *panel)
{
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
int ret;
ret = mipi_dsi_shutdown_peripheral(osd101t2587->dsi);
return ret;
}
static int osd101t2587_panel_unprepare(struct drm_panel *panel)
{
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
regulator_disable(osd101t2587->supply);
return 0;
}
static int osd101t2587_panel_prepare(struct drm_panel *panel)
{
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
return regulator_enable(osd101t2587->supply);
}
static int osd101t2587_panel_enable(struct drm_panel *panel)
{
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
int ret;
ret = mipi_dsi_turn_on_peripheral(osd101t2587->dsi);
if (ret)
return ret;
return ret;
}
static const struct drm_display_mode default_mode_osd101t2587 = {
.clock = 164400,
.hdisplay = 1920,
.hsync_start = 1920 + 152,
.hsync_end = 1920 + 152 + 52,
.htotal = 1920 + 152 + 52 + 20,
.vdisplay = 1200,
.vsync_start = 1200 + 24,
.vsync_end = 1200 + 24 + 6,
.vtotal = 1200 + 24 + 6 + 48,
.flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
};
static int osd101t2587_panel_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
struct osd101t2587_panel *osd101t2587 = ti_osd_panel(panel);
struct drm_display_mode *mode;
mode = drm_mode_duplicate(connector->dev, osd101t2587->default_mode);
if (!mode) {
dev_err(panel->dev, "failed to add mode %ux%ux@%u\n",
osd101t2587->default_mode->hdisplay,
osd101t2587->default_mode->vdisplay,
drm_mode_vrefresh(osd101t2587->default_mode));
return -ENOMEM;
}
drm_mode_set_name(mode);
drm_mode_probed_add(connector, mode);
connector->display_info.width_mm = 217;
connector->display_info.height_mm = 136;
return 1;
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/of.h`, `linux/regulator/consumer.h`, `drm/drm_crtc.h`, `drm/drm_device.h`, `drm/drm_mipi_dsi.h`, `drm/drm_panel.h`, `video/mipi_display.h`.
- Detected declarations: `struct osd101t2587_panel`, `function osd101t2587_panel_disable`, `function osd101t2587_panel_unprepare`, `function osd101t2587_panel_prepare`, `function osd101t2587_panel_enable`, `function osd101t2587_panel_get_modes`, `function osd101t2587_panel_add`, `function osd101t2587_panel_probe`, `function osd101t2587_panel_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.