drivers/gpu/drm/exynos/exynos_drm_dsi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/exynos/exynos_drm_dsi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/exynos/exynos_drm_dsi.c- Extension
.c- Size
- 5328 bytes
- Lines
- 205
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- 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/component.hlinux/of.hlinux/platform_device.hdrm/bridge/samsung-dsim.hdrm/drm_probe_helper.hdrm/drm_simple_kms_helper.hexynos_drm_crtc.hexynos_drm_drv.h
Detected Declarations
struct exynos_dsifunction exynos_dsi_te_irq_handlerfunction exynos_dsi_host_attachfunction exynos_dsi_host_detachfunction exynos_dsi_bindfunction exynos_dsi_unbindfunction exynos_dsi_register_hostfunction exynos_dsi_unregister_host
Annotated Snippet
struct exynos_dsi {
struct drm_encoder encoder;
};
static irqreturn_t exynos_dsi_te_irq_handler(struct samsung_dsim *dsim)
{
struct exynos_dsi *dsi = dsim->priv;
struct drm_encoder *encoder = &dsi->encoder;
if (dsim->state & DSIM_STATE_VIDOUT_AVAILABLE)
exynos_drm_crtc_te_handler(encoder->crtc);
return IRQ_HANDLED;
}
static int exynos_dsi_host_attach(struct samsung_dsim *dsim,
struct mipi_dsi_device *device)
{
struct exynos_dsi *dsi = dsim->priv;
struct drm_encoder *encoder = &dsi->encoder;
struct drm_device *drm = encoder->dev;
drm_bridge_attach(encoder, &dsim->bridge,
list_first_entry_or_null(&encoder->bridge_chain,
struct drm_bridge,
chain_node), 0);
mutex_lock(&drm->mode_config.mutex);
dsim->lanes = device->lanes;
dsim->format = device->format;
dsim->mode_flags = device->mode_flags;
exynos_drm_crtc_get_by_type(drm, EXYNOS_DISPLAY_TYPE_LCD)->i80_mode =
!(dsim->mode_flags & MIPI_DSI_MODE_VIDEO);
mutex_unlock(&drm->mode_config.mutex);
if (drm->mode_config.poll_enabled)
drm_kms_helper_hotplug_event(drm);
return 0;
}
static void exynos_dsi_host_detach(struct samsung_dsim *dsim,
struct mipi_dsi_device *device)
{
struct exynos_dsi *dsi = dsim->priv;
struct drm_device *drm = dsi->encoder.dev;
if (drm->mode_config.poll_enabled)
drm_kms_helper_hotplug_event(drm);
}
static int exynos_dsi_bind(struct device *dev, struct device *master, void *data)
{
struct samsung_dsim *dsim = dev_get_drvdata(dev);
struct exynos_dsi *dsi = dsim->priv;
struct drm_encoder *encoder = &dsi->encoder;
struct drm_device *drm_dev = data;
int ret;
drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
ret = exynos_drm_set_possible_crtcs(encoder, EXYNOS_DISPLAY_TYPE_LCD);
if (ret < 0)
return ret;
return mipi_dsi_host_register(&dsim->dsi_host);
}
static void exynos_dsi_unbind(struct device *dev, struct device *master, void *data)
{
struct samsung_dsim *dsim = dev_get_drvdata(dev);
dsim->bridge.funcs->atomic_disable(&dsim->bridge, NULL);
mipi_dsi_host_unregister(&dsim->dsi_host);
}
static const struct component_ops exynos_dsi_component_ops = {
.bind = exynos_dsi_bind,
.unbind = exynos_dsi_unbind,
};
static int exynos_dsi_register_host(struct samsung_dsim *dsim)
{
struct exynos_dsi *dsi;
dsi = devm_kzalloc(dsim->dev, sizeof(*dsi), GFP_KERNEL);
if (!dsi)
Annotation
- Immediate include surface: `linux/component.h`, `linux/of.h`, `linux/platform_device.h`, `drm/bridge/samsung-dsim.h`, `drm/drm_probe_helper.h`, `drm/drm_simple_kms_helper.h`, `exynos_drm_crtc.h`, `exynos_drm_drv.h`.
- Detected declarations: `struct exynos_dsi`, `function exynos_dsi_te_irq_handler`, `function exynos_dsi_host_attach`, `function exynos_dsi_host_detach`, `function exynos_dsi_bind`, `function exynos_dsi_unbind`, `function exynos_dsi_register_host`, `function exynos_dsi_unregister_host`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.