drivers/gpu/drm/arm/display/komeda/d71/d71_component.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/arm/display/komeda/d71/d71_component.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/arm/display/komeda/d71/d71_component.c- Extension
.c- Size
- 41108 bytes
- Lines
- 1445
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/seq_file.hd71_dev.hkomeda_kms.hmalidp_io.hkomeda_framebuffer.hkomeda_color_mgmt.h
Detected Declarations
function get_resources_idfunction get_valid_inputsfunction get_values_from_regfunction dump_block_headerfunction __get_blk_line_sizefunction get_blk_line_sizefunction to_rot_ctrlfunction to_ad_ctrlfunction to_d71_input_idfunction d71_layer_update_fbfunction d71_layer_disablefunction d71_layer_updatefunction d71_layer_dumpfunction d71_layer_validatefunction d71_layer_initfunction d71_wb_layer_updatefunction d71_wb_layer_dumpfunction d71_wb_layer_disablefunction d71_wb_layer_initfunction d71_component_disablefunction compiz_enable_inputfunction d71_compiz_updatefunction for_each_changed_inputfunction d71_compiz_dumpfunction d71_compiz_initfunction d71_scaler_update_filter_lutfunction d71_scaler_updatefunction d71_scaler_dumpfunction d71_scaler_initfunction d71_downscaling_clk_checkfunction PXLCLKfunction d71_splitter_updatefunction d71_splitter_dumpfunction d71_splitter_initfunction d71_merger_updatefunction d71_merger_dumpfunction d71_merger_initfunction d71_improc_updatefunction d71_improc_dumpfunction d71_improc_initfunction d71_timing_ctrlr_disablefunction d71_timing_ctrlr_updatefunction d71_timing_ctrlr_dumpfunction d71_timing_ctrlr_initfunction d71_probe_blockfunction d71_gcu_dumpfunction d71_lpu_dumpfunction d71_dou_dump
Annotated Snippet
switch (kfb->format_caps->fourcc) {
case DRM_FORMAT_YUYV:
upsampling = fb->modifier ? LR_CHI422_BILINEAR :
LR_CHI422_REPLICATION;
break;
case DRM_FORMAT_UYVY:
upsampling = LR_CHI422_REPLICATION;
break;
case DRM_FORMAT_NV12:
case DRM_FORMAT_YUV420_8BIT:
case DRM_FORMAT_YUV420_10BIT:
case DRM_FORMAT_YUV420:
case DRM_FORMAT_P010:
/* these fmt support MPGE/JPEG both, here perfer JPEG*/
upsampling = LR_CHI420_JPEG;
break;
case DRM_FORMAT_X0L2:
upsampling = LR_CHI420_JPEG;
break;
default:
break;
}
malidp_write32(reg, LAYER_R_CONTROL, upsampling);
malidp_write_group(reg, LAYER_YUV_RGB_COEFF0,
KOMEDA_N_YUV2RGB_COEFFS,
komeda_select_yuv2rgb_coeffs(
plane_st->color_encoding,
plane_st->color_range));
}
malidp_write32(reg, BLK_IN_SIZE, HV_SIZE(st->hsize, st->vsize));
if (kfb->is_va)
ctrl |= L_TBU_EN;
malidp_write32_mask(reg, BLK_CONTROL, ctrl_mask, ctrl);
}
static void d71_layer_dump(struct komeda_component *c, struct seq_file *sf)
{
u32 v[15], i;
bool rich, rgb2rgb;
char *prefix;
get_values_from_reg(c->reg, LAYER_INFO, 1, &v[14]);
if (v[14] & 0x1) {
rich = true;
prefix = "LR_";
} else {
rich = false;
prefix = "LS_";
}
rgb2rgb = !!(v[14] & L_INFO_CM);
dump_block_header(sf, c->reg);
seq_printf(sf, "%sLAYER_INFO:\t\t0x%X\n", prefix, v[14]);
get_values_from_reg(c->reg, 0xD0, 1, v);
seq_printf(sf, "%sCONTROL:\t\t0x%X\n", prefix, v[0]);
if (rich) {
get_values_from_reg(c->reg, 0xD4, 1, v);
seq_printf(sf, "LR_RICH_CONTROL:\t0x%X\n", v[0]);
}
get_values_from_reg(c->reg, 0xD8, 4, v);
seq_printf(sf, "%sFORMAT:\t\t0x%X\n", prefix, v[0]);
seq_printf(sf, "%sIT_COEFFTAB:\t\t0x%X\n", prefix, v[1]);
seq_printf(sf, "%sIN_SIZE:\t\t0x%X\n", prefix, v[2]);
seq_printf(sf, "%sPALPHA:\t\t0x%X\n", prefix, v[3]);
get_values_from_reg(c->reg, 0x100, 3, v);
seq_printf(sf, "%sP0_PTR_LOW:\t\t0x%X\n", prefix, v[0]);
seq_printf(sf, "%sP0_PTR_HIGH:\t\t0x%X\n", prefix, v[1]);
seq_printf(sf, "%sP0_STRIDE:\t\t0x%X\n", prefix, v[2]);
get_values_from_reg(c->reg, 0x110, 2, v);
seq_printf(sf, "%sP1_PTR_LOW:\t\t0x%X\n", prefix, v[0]);
seq_printf(sf, "%sP1_PTR_HIGH:\t\t0x%X\n", prefix, v[1]);
if (rich) {
get_values_from_reg(c->reg, 0x118, 1, v);
seq_printf(sf, "LR_P1_STRIDE:\t\t0x%X\n", v[0]);
get_values_from_reg(c->reg, 0x120, 2, v);
seq_printf(sf, "LR_P2_PTR_LOW:\t\t0x%X\n", v[0]);
seq_printf(sf, "LR_P2_PTR_HIGH:\t\t0x%X\n", v[1]);
get_values_from_reg(c->reg, 0x130, 12, v);
for (i = 0; i < 12; i++)
seq_printf(sf, "LR_YUV_RGB_COEFF%u:\t0x%X\n", i, v[i]);
Annotation
- Immediate include surface: `linux/seq_file.h`, `d71_dev.h`, `komeda_kms.h`, `malidp_io.h`, `komeda_framebuffer.h`, `komeda_color_mgmt.h`.
- Detected declarations: `function get_resources_id`, `function get_valid_inputs`, `function get_values_from_reg`, `function dump_block_header`, `function __get_blk_line_size`, `function get_blk_line_size`, `function to_rot_ctrl`, `function to_ad_ctrl`, `function to_d71_input_id`, `function d71_layer_update_fb`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.