drivers/gpu/drm/exynos/exynos_dp.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/exynos/exynos_dp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/exynos/exynos_dp.c- Extension
.c- Size
- 5966 bytes
- Lines
- 235
- 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.
- 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/clk.hlinux/component.hlinux/err.hlinux/module.hlinux/of.hlinux/of_graph.hlinux/platform_device.hlinux/pm_runtime.hvideo/of_display_timing.hvideo/of_videomode.hvideo/videomode.hdrm/bridge/analogix_dp.hdrm/bridge/of-display-mode-bridge.hdrm/drm_atomic_helper.hdrm/drm_bridge.hdrm/drm_bridge_connector.hdrm/drm_crtc.hdrm/drm_of.hdrm/drm_panel.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/drm_simple_kms_helper.hdrm/exynos_drm.hexynos_drm_crtc.h
Detected Declarations
struct exynos_dp_devicefunction exynos_dp_crtc_clock_enablefunction exynos_dp_poweronfunction exynos_dp_powerofffunction exynos_dp_mode_setfunction exynos_dp_bindfunction exynos_dp_unbindfunction exynos_dp_probefunction exynos_dp_removefunction exynos_dp_suspendfunction exynos_dp_resume
Annotated Snippet
struct exynos_dp_device {
struct drm_encoder encoder;
struct drm_device *drm_dev;
struct device *dev;
struct analogix_dp_device *adp;
struct analogix_dp_plat_data plat_data;
};
static int exynos_dp_crtc_clock_enable(struct analogix_dp_plat_data *plat_data,
bool enable)
{
struct exynos_dp_device *dp = to_dp(plat_data);
struct drm_encoder *encoder = &dp->encoder;
if (!encoder->crtc)
return -EPERM;
exynos_drm_pipe_clk_enable(to_exynos_crtc(encoder->crtc), enable);
return 0;
}
static int exynos_dp_poweron(struct analogix_dp_plat_data *plat_data)
{
return exynos_dp_crtc_clock_enable(plat_data, true);
}
static int exynos_dp_poweroff(struct analogix_dp_plat_data *plat_data)
{
return exynos_dp_crtc_clock_enable(plat_data, false);
}
static void exynos_dp_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
{
}
static void exynos_dp_nop(struct drm_encoder *encoder)
{
/* do nothing */
}
static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = {
.mode_set = exynos_dp_mode_set,
.enable = exynos_dp_nop,
.disable = exynos_dp_nop,
};
static int exynos_dp_bind(struct device *dev, struct device *master, void *data)
{
struct exynos_dp_device *dp = dev_get_drvdata(dev);
struct drm_encoder *encoder = &dp->encoder;
struct drm_device *drm_dev = data;
struct drm_connector *connector;
int ret;
dp->drm_dev = drm_dev;
drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_TMDS);
drm_encoder_helper_add(encoder, &exynos_dp_encoder_helper_funcs);
ret = exynos_drm_set_possible_crtcs(encoder, EXYNOS_DISPLAY_TYPE_LCD);
if (ret < 0)
return ret;
dp->plat_data.encoder = encoder;
ret = analogix_dp_bind(dp->adp, dp->drm_dev);
if (ret) {
dp->encoder.funcs->destroy(&dp->encoder);
return ret;
}
connector = drm_bridge_connector_init(dp->drm_dev, dp->plat_data.encoder);
if (IS_ERR(connector)) {
ret = PTR_ERR(connector);
dev_err(dp->dev, "Failed to initialize bridge_connector\n");
return ret;
}
return 0;
}
static void exynos_dp_unbind(struct device *dev, struct device *master,
void *data)
{
struct exynos_dp_device *dp = dev_get_drvdata(dev);
Annotation
- Immediate include surface: `linux/clk.h`, `linux/component.h`, `linux/err.h`, `linux/module.h`, `linux/of.h`, `linux/of_graph.h`, `linux/platform_device.h`, `linux/pm_runtime.h`.
- Detected declarations: `struct exynos_dp_device`, `function exynos_dp_crtc_clock_enable`, `function exynos_dp_poweron`, `function exynos_dp_poweroff`, `function exynos_dp_mode_set`, `function exynos_dp_bind`, `function exynos_dp_unbind`, `function exynos_dp_probe`, `function exynos_dp_remove`, `function exynos_dp_suspend`.
- 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.
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.