drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c- Extension
.c- Size
- 27950 bytes
- Lines
- 1054
- 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
dpu_kms.hdpu_hw_lm.hdpu_hw_ctl.hdpu_hw_cdm.hdpu_hw_cwb.hdpu_hw_pingpong.hdpu_hw_sspp.hdpu_hw_intf.hdpu_hw_wb.hdpu_hw_dspp.hdpu_hw_merge3d.hdpu_hw_dsc.hdpu_encoder.hdpu_trace.h
Detected Declarations
function Copyrightfunction dpu_rm_initfunction _dpu_rm_needs_split_displayfunction _dpu_rm_get_lm_peerfunction _dpu_rm_reserve_cwb_mux_and_pingpongsfunction _dpu_rm_check_lm_and_get_connected_blksfunction _dpu_rm_reserve_lmsfunction _dpu_rm_reserve_ctlsfunction _dpu_rm_pingpong_next_indexfunction _dpu_rm_pingpong_dsc_checkfunction _dpu_rm_dsc_allocfunction _dpu_rm_dsc_alloc_pairfunction _dpu_rm_reserve_dscfunction _dpu_rm_reserve_cdmfunction _dpu_rm_make_reservationfunction _dpu_rm_clear_mappingfunction dpu_rm_releasefunction dpu_rm_reservefunction dpu_rm_release_all_ssppfunction dpu_rm_get_assigned_resourcesfunction dpu_rm_print_state_helperfunction dpu_rm_print_state
Annotated Snippet
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed lm object creation: err %d\n", rc);
goto fail;
}
rm->mixer_blks[lm->id - LM_0] = &hw->base;
}
for (i = 0; i < cat->merge_3d_count; i++) {
struct dpu_hw_merge_3d *hw;
const struct dpu_merge_3d_cfg *merge_3d = &cat->merge_3d[i];
hw = dpu_hw_merge_3d_init(dev, merge_3d, mmio);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed merge_3d object creation: err %d\n",
rc);
goto fail;
}
rm->merge_3d_blks[merge_3d->id - MERGE_3D_0] = &hw->base;
}
for (i = 0; i < cat->pingpong_count; i++) {
struct dpu_hw_pingpong *hw;
const struct dpu_pingpong_cfg *pp = &cat->pingpong[i];
hw = dpu_hw_pingpong_init(dev, pp, mmio, cat->mdss_ver);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed pingpong object creation: err %d\n",
rc);
goto fail;
}
if (pp->merge_3d && pp->merge_3d < MERGE_3D_MAX)
hw->merge_3d = to_dpu_hw_merge_3d(rm->merge_3d_blks[pp->merge_3d - MERGE_3D_0]);
rm->pingpong_blks[pp->id - PINGPONG_0] = &hw->base;
}
for (i = 0; i < cat->intf_count; i++) {
struct dpu_hw_intf *hw;
const struct dpu_intf_cfg *intf = &cat->intf[i];
hw = dpu_hw_intf_init(dev, intf, mmio, cat->mdss_ver);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed intf object creation: err %d\n", rc);
goto fail;
}
rm->hw_intf[intf->id - INTF_0] = hw;
}
for (i = 0; i < cat->wb_count; i++) {
struct dpu_hw_wb *hw;
const struct dpu_wb_cfg *wb = &cat->wb[i];
hw = dpu_hw_wb_init(dev, wb, mmio, cat->mdss_ver);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed wb object creation: err %d\n", rc);
goto fail;
}
rm->hw_wb[wb->id - WB_0] = hw;
}
for (i = 0; i < cat->cwb_count; i++) {
struct dpu_hw_cwb *hw;
const struct dpu_cwb_cfg *cwb = &cat->cwb[i];
hw = dpu_hw_cwb_init(dev, cwb, mmio);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed cwb object creation: err %d\n", rc);
goto fail;
}
rm->cwb_blks[cwb->id - CWB_0] = &hw->base;
}
for (i = 0; i < cat->ctl_count; i++) {
struct dpu_hw_ctl *hw;
const struct dpu_ctl_cfg *ctl = &cat->ctl[i];
hw = dpu_hw_ctl_init(dev, ctl, mmio, cat->mdss_ver, cat->mixer_count, cat->mixer);
if (IS_ERR(hw)) {
rc = PTR_ERR(hw);
DPU_ERROR("failed ctl object creation: err %d\n", rc);
goto fail;
}
rm->ctl_blks[ctl->id - CTL_0] = &hw->base;
}
Annotation
- Immediate include surface: `dpu_kms.h`, `dpu_hw_lm.h`, `dpu_hw_ctl.h`, `dpu_hw_cdm.h`, `dpu_hw_cwb.h`, `dpu_hw_pingpong.h`, `dpu_hw_sspp.h`, `dpu_hw_intf.h`.
- Detected declarations: `function Copyright`, `function dpu_rm_init`, `function _dpu_rm_needs_split_display`, `function _dpu_rm_get_lm_peer`, `function _dpu_rm_reserve_cwb_mux_and_pingpongs`, `function _dpu_rm_check_lm_and_get_connected_blks`, `function _dpu_rm_reserve_lms`, `function _dpu_rm_reserve_ctls`, `function _dpu_rm_pingpong_next_index`, `function _dpu_rm_pingpong_dsc_check`.
- 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.