drivers/gpu/drm/verisilicon/vs_dc.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/verisilicon/vs_dc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/verisilicon/vs_dc.c- Extension
.c- Size
- 4719 bytes
- Lines
- 208
- 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.
- 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/dma-mapping.hlinux/irqreturn.hlinux/of.hlinux/of_graph.hvs_crtc.hvs_dc.hvs_dc_top_regs.hvs_drm.hvs_hwdb.h
Detected Declarations
function vs_dc_irq_handlerfunction vs_dc_probefunction vs_dc_removefunction vs_dc_shutdown
Annotated Snippet
if (IS_ERR(dc->pix_clk[i])) {
dev_err(dev, "can't get pixel clk %u\n", i);
ret = PTR_ERR(dc->pix_clk[i]);
goto err_rst_assert;
}
}
ret = devm_request_irq(dev, irq, vs_dc_irq_handler, 0,
dev_name(dev), dc);
if (ret) {
dev_err(dev, "can't request irq\n");
goto err_rst_assert;
}
dev_set_drvdata(dev, dc);
ret = vs_drm_initialize(dc, pdev);
if (ret)
goto err_rst_assert;
return 0;
err_rst_assert:
reset_control_bulk_assert(VSDC_RESET_COUNT, dc->rsts);
return ret;
}
static void vs_dc_remove(struct platform_device *pdev)
{
struct vs_dc *dc = dev_get_drvdata(&pdev->dev);
vs_drm_finalize(dc);
dev_set_drvdata(&pdev->dev, NULL);
reset_control_bulk_assert(VSDC_RESET_COUNT, dc->rsts);
}
static void vs_dc_shutdown(struct platform_device *pdev)
{
struct vs_dc *dc = dev_get_drvdata(&pdev->dev);
vs_drm_shutdown_handler(dc);
}
static struct platform_driver vs_dc_platform_driver = {
.probe = vs_dc_probe,
.remove = vs_dc_remove,
.shutdown = vs_dc_shutdown,
.driver = {
.name = "verisilicon-dc",
.of_match_table = vs_dc_driver_dt_match,
},
};
module_platform_driver(vs_dc_platform_driver);
MODULE_AUTHOR("Icenowy Zheng <uwu@icenowy.me>");
MODULE_DESCRIPTION("Verisilicon display controller driver");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/dma-mapping.h`, `linux/irqreturn.h`, `linux/of.h`, `linux/of_graph.h`, `vs_crtc.h`, `vs_dc.h`, `vs_dc_top_regs.h`, `vs_drm.h`.
- Detected declarations: `function vs_dc_irq_handler`, `function vs_dc_probe`, `function vs_dc_remove`, `function vs_dc_shutdown`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- 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.