drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dml/dcn30/display_rq_dlg_calc_30.c- Extension
.c- Size
- 66788 bytes
- Lines
- 1784
- 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
../display_mode_lib.h../display_mode_vba.h../dml_inline_defs.hdisplay_rq_dlg_calc_30.hdisplay_mode_vba_30.h
Detected Declarations
function filesfunction get_refcyc_per_deliveryfunction get_blk_size_bytesfunction extract_rq_sizing_regsfunction extract_rq_regsfunction handle_det_buf_splitfunction get_meta_and_pte_attrfunction get_surf_rq_paramfunction dml_rq_dlg_get_rq_paramsfunction dml30_rq_dlg_get_rq_regfunction calculate_ttu_cursorfunction dml_rq_dlg_get_dlg_paramsfunction dml30_rq_dlg_get_dlg_reg
Annotated Snippet
if (total_swath_bytes > detile_buf_size_in_bytes) {
req128_l = true;
swath_bytes_l = full_swath_bytes_packed_l / 2;
}
} else {
req128_l = true;
req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l/2;
swath_bytes_c = full_swath_bytes_packed_c;
total_swath_bytes = 2 * swath_bytes_l + 2 * swath_bytes_c;
if (total_swath_bytes > detile_buf_size_in_bytes) {
req128_c = true;
swath_bytes_c = full_swath_bytes_packed_c/2;
}
}
if (rq_param->yuv420)
total_swath_bytes = 2 * swath_bytes_l + 2 * swath_bytes_c;
else
total_swath_bytes = 2 * swath_bytes_l;
rq_param->misc.rq_l.stored_swath_bytes = swath_bytes_l;
rq_param->misc.rq_c.stored_swath_bytes = swath_bytes_c;
if (surf_linear) {
log2_swath_height_l = 0;
log2_swath_height_c = 0;
} else {
unsigned int swath_height_l;
unsigned int swath_height_c;
if (!surf_vert) {
swath_height_l = rq_param->misc.rq_l.blk256_height;
swath_height_c = rq_param->misc.rq_c.blk256_height;
} else {
swath_height_l = rq_param->misc.rq_l.blk256_width;
swath_height_c = rq_param->misc.rq_c.blk256_width;
}
if (swath_height_l > 0)
log2_swath_height_l = dml_log2(swath_height_l);
if (req128_l && log2_swath_height_l > 0)
log2_swath_height_l -= 1;
if (swath_height_c > 0)
log2_swath_height_c = dml_log2(swath_height_c);
if (req128_c && log2_swath_height_c > 0)
log2_swath_height_c -= 1;
}
rq_param->dlg.rq_l.swath_height = 1 << log2_swath_height_l;
rq_param->dlg.rq_c.swath_height = 1 << log2_swath_height_c;
dml_print("DML_DLG: %s: req128_l = %0d\n", __func__, req128_l);
dml_print("DML_DLG: %s: req128_c = %0d\n", __func__, req128_c);
dml_print("DML_DLG: %s: full_swath_bytes_packed_l = %0d\n",
__func__,
full_swath_bytes_packed_l);
dml_print("DML_DLG: %s: full_swath_bytes_packed_c = %0d\n",
__func__,
full_swath_bytes_packed_c);
}
static void get_meta_and_pte_attr(struct display_mode_lib *mode_lib,
display_data_rq_dlg_params_st *rq_dlg_param,
display_data_rq_misc_params_st *rq_misc_param,
display_data_rq_sizing_params_st *rq_sizing_param,
unsigned int vp_width,
unsigned int vp_height,
unsigned int data_pitch,
unsigned int meta_pitch,
unsigned int source_format,
unsigned int tiling,
unsigned int macro_tile_size,
unsigned int source_scan,
unsigned int hostvm_enable,
unsigned int is_chroma,
unsigned int surface_height)
{
bool surf_linear = (tiling == dm_sw_linear);
bool surf_vert = (source_scan == dm_vert);
unsigned int bytes_per_element = 0;
unsigned int bytes_per_element_y = 0;
unsigned int bytes_per_element_c = 0;
Annotation
- Immediate include surface: `../display_mode_lib.h`, `../display_mode_vba.h`, `../dml_inline_defs.h`, `display_rq_dlg_calc_30.h`, `display_mode_vba_30.h`.
- Detected declarations: `function files`, `function get_refcyc_per_delivery`, `function get_blk_size_bytes`, `function extract_rq_sizing_regs`, `function extract_rq_regs`, `function handle_det_buf_split`, `function get_meta_and_pte_attr`, `function get_surf_rq_param`, `function dml_rq_dlg_get_rq_params`, `function dml30_rq_dlg_get_rq_reg`.
- 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.