drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hubp/dcn401/dcn401_hubp.c- Extension
.c- Size
- 36648 bytes
- Lines
- 1100
- 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.hdcn401_hubp.hdal_asic_id.h
Detected Declarations
function filesfunction hubp401_program_3dlut_fl_dlg_paramfunction hubp401_enable_3dlut_flfunction hubp401_get_3dlut_fl_donefunction hubp401_program_3dlut_fl_addressing_modefunction hubp401_program_3dlut_fl_widthfunction hubp401_program_3dlut_fl_tmz_protectedfunction hubp401_program_3dlut_fl_crossbarfunction hubp401_update_3dlut_fl_bias_scalefunction hubp401_program_3dlut_fl_modefunction hubp401_program_3dlut_fl_formatfunction hubp401_program_3dlut_fl_configfunction hubp401_update_mall_selfunction hubp401_initfunction hubp401_vready_at_or_After_vsyncfunction hubp401_program_requestorfunction hubp401_program_deadlinefunction hubp401_setupfunction hubp401_setup_interdependentfunction hubp401_program_surface_flip_and_addrfunction hubp401_clear_tilingfunction hubp401_dcc_controlfunction hubp401_program_tilingfunction hubp401_program_sizefunction hubp401_program_surface_configfunction hubp401_set_viewportfunction hubp401_program_mcache_id_and_split_coordinatefunction hubp401_set_flip_intfunction hubp401_in_blankfunction hubp401_cursor_set_positionfunction hubp401_read_statefunction hubp401_set_unbounded_requestingfunction hubp401_construct
Annotated Snippet
#include "dm_services.h"
#include "dce_calcs.h"
#include "reg_helper.h"
#include "basics/conversion.h"
#include "dcn401_hubp.h"
#include "dal_asic_id.h"
#define REG(reg)\
hubp2->hubp_regs->reg
#define CTX \
hubp2->base.ctx
#undef FN
#define FN(reg_name, field_name) \
hubp2->hubp_shift->field_name, hubp2->hubp_mask->field_name
void hubp401_program_3dlut_fl_addr(struct hubp *hubp,
const struct dc_plane_address address)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_ADDRESS_HIGH, HUBP_3DLUT_ADDRESS_HIGH, address.lut3d.addr.high_part);
REG_WRITE(HUBP_3DLUT_ADDRESS_LOW, address.lut3d.addr.low_part);
}
void hubp401_program_3dlut_fl_dlg_param(struct hubp *hubp, int refcyc_per_3dlut_group)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_DLG_PARAM, REFCYC_PER_3DLUT_GROUP, refcyc_per_3dlut_group);
}
void hubp401_enable_3dlut_fl(struct hubp *hubp, bool enable)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_CONTROL, HUBP_3DLUT_ENABLE, enable ? 1 : 0);
}
uint32_t hubp401_get_3dlut_fl_done(struct hubp *hubp)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
uint32_t ret;
REG_GET(HUBP_3DLUT_CONTROL, HUBP_3DLUT_DONE, &ret);
return ret;
}
void hubp401_program_3dlut_fl_addressing_mode(struct hubp *hubp, enum hubp_3dlut_fl_addressing_mode addr_mode)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_CONTROL, HUBP_3DLUT_ADDRESSING_MODE, addr_mode);
}
void hubp401_program_3dlut_fl_width(struct hubp *hubp, enum hubp_3dlut_fl_width width)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_CONTROL, HUBP_3DLUT_WIDTH, width);
}
void hubp401_program_3dlut_fl_tmz_protected(struct hubp *hubp, uint8_t protection_bits)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE(HUBP_3DLUT_CONTROL, HUBP_3DLUT_TMZ, protection_bits);
}
void hubp401_program_3dlut_fl_crossbar(struct hubp *hubp,
enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_y_g,
enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cb_b,
enum hubp_3dlut_fl_crossbar_bit_slice bit_slice_cr_r)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE_3(HUBP_3DLUT_CONTROL,
HUBP_3DLUT_CROSSBAR_SELECT_Y_G, bit_slice_y_g,
HUBP_3DLUT_CROSSBAR_SELECT_CB_B, bit_slice_cb_b,
HUBP_3DLUT_CROSSBAR_SELECT_CR_R, bit_slice_cr_r);
}
void hubp401_update_3dlut_fl_bias_scale(struct hubp *hubp, uint16_t bias, uint16_t scale)
{
struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
REG_UPDATE_2(_3DLUT_FL_BIAS_SCALE, HUBP0_3DLUT_FL_BIAS, bias, HUBP0_3DLUT_FL_SCALE, scale);
}
Annotation
- Immediate include surface: `dm_services.h`, `dce_calcs.h`, `reg_helper.h`, `basics/conversion.h`, `dcn401_hubp.h`, `dal_asic_id.h`.
- Detected declarations: `function files`, `function hubp401_program_3dlut_fl_dlg_param`, `function hubp401_enable_3dlut_fl`, `function hubp401_get_3dlut_fl_done`, `function hubp401_program_3dlut_fl_addressing_mode`, `function hubp401_program_3dlut_fl_width`, `function hubp401_program_3dlut_fl_tmz_protected`, `function hubp401_program_3dlut_fl_crossbar`, `function hubp401_update_3dlut_fl_bias_scale`, `function hubp401_program_3dlut_fl_mode`.
- 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.