drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hubp/dcn10/dcn10_hubp.c- Extension
.c- Size
- 44398 bytes
- Lines
- 1424
- 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
dm_services.hdce_calcs.hreg_helper.hbasics/conversion.hdcn10_hubp.h
Detected Declarations
function filesfunction hubp1_disconnectfunction hubp1_disable_controlfunction hubp1_get_underflow_statusfunction hubp1_clear_underflowfunction hubp1_set_hubp_blank_enfunction hubp1_vready_workaroundfunction hubp1_program_tilingfunction hubp1_program_sizefunction hubp1_program_rotationfunction hubp1_program_pixel_formatfunction hubp1_program_surface_flip_and_addrfunction hubp1_clear_tilingfunction hubp1_dcc_controlfunction hubp_resetfunction hubp1_program_surface_configfunction hubp1_program_requestorfunction hubp1_program_deadlinefunction hubp1_setupfunction hubp1_setup_interdependentfunction hubp1_is_flip_pendingfunction hubp1_set_vm_system_aperture_settingsfunction hubp1_set_vm_context0_settingsfunction min_set_viewportfunction hubp1_read_state_commonfunction hubp1_read_statefunction hubp1_get_cursor_pitchfunction hubp1_get_lines_per_chunkfunction hubp1_cursor_set_attributesfunction hubp1_cursor_set_positionfunction hubp1_clk_cntlfunction hubp1_vtg_selfunction hubp1_in_blankfunction hubp1_soft_resetfunction hubp1_set_flip_intfunction hubp1_wait_pipe_read_startfunction hubp1_initfunction dcn10_hubp_construct
Annotated Snippet
if (reg_val) {
/* init sequence workaround: in case HUBP is
* power gated, this wait would timeout.
*
* we just wrote reg_val to non-0, if it stay 0
* it means HUBP is gated
*/
REG_WAIT(DCHUBP_CNTL,
HUBP_NO_OUTSTANDING_REQ, 1,
1, 200);
}
hubp->mpcc_id = 0xf;
hubp->opp_id = OPP_ID_INVALID;
}
}
static void hubp1_disconnect(struct hubp *hubp)
{
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
REG_UPDATE(DCHUBP_CNTL,
HUBP_TTU_DISABLE, 1);
REG_UPDATE(CURSOR_CONTROL,
CURSOR_ENABLE, 0);
}
static void hubp1_disable_control(struct hubp *hubp, bool disable_hubp)
{
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
uint32_t disable = disable_hubp ? 1 : 0;
REG_UPDATE(DCHUBP_CNTL,
HUBP_DISABLE, disable);
}
static unsigned int hubp1_get_underflow_status(struct hubp *hubp)
{
uint32_t hubp_underflow = 0;
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
REG_GET(DCHUBP_CNTL,
HUBP_UNDERFLOW_STATUS,
&hubp_underflow);
return hubp_underflow;
}
void hubp1_clear_underflow(struct hubp *hubp)
{
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
REG_UPDATE(DCHUBP_CNTL, HUBP_UNDERFLOW_CLEAR, 1);
}
static void hubp1_set_hubp_blank_en(struct hubp *hubp, bool blank)
{
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
uint32_t blank_en = blank ? 1 : 0;
REG_UPDATE(DCHUBP_CNTL, HUBP_BLANK_EN, blank_en);
}
void hubp1_vready_workaround(struct hubp *hubp,
struct _vcs_dpi_display_pipe_dest_params_st *pipe_dest)
{
uint32_t value = 0;
struct dcn10_hubp *hubp1 = TO_DCN10_HUBP(hubp);
/* set HBUBREQ_DEBUG_DB[12] = 1 */
value = REG_READ(HUBPREQ_DEBUG_DB);
/* hack mode disable */
value |= 0x100;
value &= ~0x1000;
if ((pipe_dest->vstartup_start - 2*(pipe_dest->vready_offset+pipe_dest->vupdate_width
+ pipe_dest->vupdate_offset) / pipe_dest->htotal) <= pipe_dest->vblank_end) {
/* if (eco_fix_needed(otg_global_sync_timing)
* set HBUBREQ_DEBUG_DB[12] = 1 */
value |= 0x1000;
}
REG_WRITE(HUBPREQ_DEBUG_DB, value);
}
void hubp1_program_tiling(
struct hubp *hubp,
Annotation
- Immediate include surface: `dm_services.h`, `dce_calcs.h`, `reg_helper.h`, `basics/conversion.h`, `dcn10_hubp.h`.
- Detected declarations: `function files`, `function hubp1_disconnect`, `function hubp1_disable_control`, `function hubp1_get_underflow_status`, `function hubp1_clear_underflow`, `function hubp1_set_hubp_blank_en`, `function hubp1_vready_workaround`, `function hubp1_program_tiling`, `function hubp1_program_size`, `function hubp1_program_rotation`.
- 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.