drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/hubbub/dcn401/dcn401_hubbub.c- Extension
.c- Size
- 48048 bytes
- Lines
- 1275
- 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
dcn30/dcn30_hubbub.hdcn401_hubbub.hdm_services.hreg_helper.h
Detected Declarations
function filesfunction hubbub401_program_urgent_watermarksfunction hubbub401_program_stutter_watermarksfunction hubbub401_program_pstate_watermarksfunction hubbub401_program_usr_watermarksfunction hubbub401_program_watermarksfunction hubbub401_init_watermarksfunction hubbub401_wm_read_statefunction hubbub401_dcc_support_swizzlefunction hubbub401_dcc_support_pixel_formatfunction hubbub401_get_blk256_sizefunction hubbub401_det_request_sizefunction hubbub401_get_dcc_compression_capfunction dcn401_program_det_segmentsfunction dcn401_program_compbuf_segmentsfunction dcn401_wait_for_det_updatefunction dcn401_program_arbiterfunction hubbub401_construct
Annotated Snippet
if (bytes_per_element == 1) {
*segment_order_horz = segment_order__contiguous;
*segment_order_vert = segment_order__non_contiguous;
return true;
}
if (bytes_per_element == 2) {
*segment_order_horz = segment_order__non_contiguous;
*segment_order_vert = segment_order__contiguous;
return true;
}
if (bytes_per_element == 4) {
*segment_order_horz = segment_order__contiguous;
*segment_order_vert = segment_order__non_contiguous;
return true;
}
if (bytes_per_element == 8) {
*segment_order_horz = segment_order__contiguous;
*segment_order_vert = segment_order__non_contiguous;
return true;
}
}
return false;
}
bool hubbub401_dcc_support_pixel_format(
enum surface_pixel_format format,
unsigned int *plane0_bpe,
unsigned int *plane1_bpe)
{
switch (format) {
case SURFACE_PIXEL_FORMAT_GRPH_ARGB1555:
case SURFACE_PIXEL_FORMAT_GRPH_RGB565:
*plane0_bpe = 2;
*plane1_bpe = 0;
return true;
case SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr:
case SURFACE_PIXEL_FORMAT_VIDEO_420_YCrCb:
*plane0_bpe = 1;
*plane1_bpe = 2;
return true;
case SURFACE_PIXEL_FORMAT_GRPH_ARGB8888:
case SURFACE_PIXEL_FORMAT_GRPH_ABGR8888:
case SURFACE_PIXEL_FORMAT_GRPH_ARGB2101010:
case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010:
case SURFACE_PIXEL_FORMAT_GRPH_ABGR2101010_XR_BIAS:
case SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FIX:
case SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FIX:
case SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FLOAT:
case SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FLOAT:
case SURFACE_PIXEL_FORMAT_GRPH_RGBE:
*plane0_bpe = 4;
*plane1_bpe = 0;
return true;
case SURFACE_PIXEL_FORMAT_GRPH_RGBE_ALPHA:
*plane0_bpe = 4;
*plane1_bpe = 1;
return true;
case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr:
case SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb:
*plane0_bpe = 2;
*plane1_bpe = 4;
return true;
case SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010:
case SURFACE_PIXEL_FORMAT_VIDEO_CrYCbA1010102:
case SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888:
*plane0_bpe = 4;
*plane1_bpe = 0;
return true;
case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616:
case SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616:
case SURFACE_PIXEL_FORMAT_GRPH_ARGB16161616F:
case SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F:
*plane0_bpe = 8;
*plane1_bpe = 0;
return true;
default:
return false;
}
}
void hubbub401_get_blk256_size(unsigned int *blk256_width, unsigned int *blk256_height,
unsigned int bytes_per_element)
{
if (bytes_per_element == 1) {
*blk256_width = 16;
*blk256_height = 16;
} else if (bytes_per_element == 2) {
*blk256_width = 16;
*blk256_height = 8;
Annotation
- Immediate include surface: `dcn30/dcn30_hubbub.h`, `dcn401_hubbub.h`, `dm_services.h`, `reg_helper.h`.
- Detected declarations: `function files`, `function hubbub401_program_urgent_watermarks`, `function hubbub401_program_stutter_watermarks`, `function hubbub401_program_pstate_watermarks`, `function hubbub401_program_usr_watermarks`, `function hubbub401_program_watermarks`, `function hubbub401_init_watermarks`, `function hubbub401_wm_read_state`, `function hubbub401_dcc_support_swizzle`, `function hubbub401_dcc_support_pixel_format`.
- 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.