drivers/video/of_display_timing.c
Source file repositories/reference/linux-study-clean/drivers/video/of_display_timing.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/of_display_timing.c- Extension
.c- Size
- 6835 bytes
- Lines
- 249
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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/export.hlinux/of.hlinux/slab.hvideo/display_timing.hvideo/of_display_timing.h
Detected Declarations
function Copyrightfunction of_parse_display_timingfunction of_get_display_timingfunction for_each_child_of_node_scopedexport of_get_display_timingexport of_get_display_timings
Annotated Snippet
if (!dt) {
pr_err("%pOF: could not allocate display_timing struct\n",
np);
goto timingfail;
}
r = of_parse_display_timing(child, dt);
if (r) {
/*
* to not encourage wrong devicetrees, fail in case of
* an error
*/
pr_err("%pOF: error in timing %d\n",
np, disp->num_timings + 1);
kfree(dt);
goto timingfail;
}
if (native_mode == child)
disp->native_mode = disp->num_timings;
disp->timings[disp->num_timings] = dt;
disp->num_timings++;
}
of_node_put(timings_np);
/*
* native_mode points to the device_node returned by of_parse_phandle
* therefore call of_node_put on it
*/
of_node_put(native_mode);
pr_debug("%pOF: got %d timings. Using timing #%d as default\n",
np, disp->num_timings,
disp->native_mode + 1);
return disp;
timingfail:
of_node_put(native_mode);
display_timings_release(disp);
disp = NULL;
entryfail:
kfree(disp);
dispfail:
of_node_put(timings_np);
return NULL;
}
EXPORT_SYMBOL_GPL(of_get_display_timings);
Annotation
- Immediate include surface: `linux/export.h`, `linux/of.h`, `linux/slab.h`, `video/display_timing.h`, `video/of_display_timing.h`.
- Detected declarations: `function Copyright`, `function of_parse_display_timing`, `function of_get_display_timing`, `function for_each_child_of_node_scoped`, `export of_get_display_timing`, `export of_get_display_timings`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.