drivers/gpu/drm/i915/display/intel_vdsc.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_vdsc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_vdsc.c- Extension
.c- Size
- 41055 bytes
- Lines
- 1207
- 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
linux/limits.hdrm/display/drm_dsc_helper.hdrm/drm_fixed.hdrm/drm_print.hintel_crtc.hintel_de.hintel_display_types.hintel_display_utils.hintel_dp.hintel_dsi.hintel_qp_tables.hintel_vdsc.hintel_vdsc_regs.h
Detected Declarations
function intel_dsc_source_supportfunction intel_dsc_line_slice_countfunction intel_dsc_get_slice_configfunction is_pipe_dscfunction intel_vdsc_set_min_max_qpfunction get_range_bpg_offsetfunction qualityfunction intel_dsc_slice_dimensions_validfunction is_dsi_dsc_1_1function intel_dsc_compute_paramsfunction intel_dsc_enable_on_crtcfunction intel_dsc_enabled_on_linkfunction intel_dsc_power_domainfunction intel_dsc_get_vdsc_per_pipefunction intel_dsc_get_num_vdsc_instancesfunction intel_dsc_get_pps_regfunction intel_dsc_pps_writefunction intel_dsc_pps_configurefunction intel_dsc_dsi_pps_writefunction for_each_dsi_portfunction intel_dsc_dp_pps_writefunction intel_dsc_su_et_parameters_configurefunction dss_ctl1_regfunction dss_ctl2_regfunction intel_uncompressed_joiner_enablefunction intel_dsc_enablefunction intel_dsc_disablefunction intel_dsc_pps_readfunction intel_dsc_pps_read_and_verifyfunction intel_dsc_get_pps_configfunction intel_dsc_get_configfunction intel_vdsc_dump_statefunction intel_vdsc_state_dumpfunction intel_dsc_get_pixel_rate_with_dsc_bubblesfunction intel_vdsc_min_cdclkfunction intel_vdsc_prefill_lines
Annotated Snippet
if (vdsc_instances_per_pipe > 1) {
intel_de_write(display, DSCC_RC_BUF_THRESH_0,
rc_buf_thresh_dword[0]);
intel_de_write(display, DSCC_RC_BUF_THRESH_0_UDW,
rc_buf_thresh_dword[1]);
intel_de_write(display, DSCC_RC_BUF_THRESH_1,
rc_buf_thresh_dword[2]);
intel_de_write(display, DSCC_RC_BUF_THRESH_1_UDW,
rc_buf_thresh_dword[3]);
}
} else {
intel_de_write(display, ICL_DSC0_RC_BUF_THRESH_0(pipe),
rc_buf_thresh_dword[0]);
intel_de_write(display, ICL_DSC0_RC_BUF_THRESH_0_UDW(pipe),
rc_buf_thresh_dword[1]);
intel_de_write(display, ICL_DSC0_RC_BUF_THRESH_1(pipe),
rc_buf_thresh_dword[2]);
intel_de_write(display, ICL_DSC0_RC_BUF_THRESH_1_UDW(pipe),
rc_buf_thresh_dword[3]);
if (vdsc_instances_per_pipe > 1) {
intel_de_write(display,
ICL_DSC1_RC_BUF_THRESH_0(pipe),
rc_buf_thresh_dword[0]);
intel_de_write(display,
ICL_DSC1_RC_BUF_THRESH_0_UDW(pipe),
rc_buf_thresh_dword[1]);
intel_de_write(display,
ICL_DSC1_RC_BUF_THRESH_1(pipe),
rc_buf_thresh_dword[2]);
intel_de_write(display,
ICL_DSC1_RC_BUF_THRESH_1_UDW(pipe),
rc_buf_thresh_dword[3]);
}
}
/* Populate the RC_RANGE_PARAMETERS registers */
memset(rc_range_params_dword, 0, sizeof(rc_range_params_dword));
for (i = 0; i < DSC_NUM_BUF_RANGES; i++)
rc_range_params_dword[i / 2] |=
(u32)(((vdsc_cfg->rc_range_params[i].range_bpg_offset <<
RC_BPG_OFFSET_SHIFT) |
(vdsc_cfg->rc_range_params[i].range_max_qp <<
RC_MAX_QP_SHIFT) |
(vdsc_cfg->rc_range_params[i].range_min_qp <<
RC_MIN_QP_SHIFT)) << 16 * (i % 2));
if (!is_pipe_dsc(crtc, cpu_transcoder)) {
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_0,
rc_range_params_dword[0]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_0_UDW,
rc_range_params_dword[1]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_1,
rc_range_params_dword[2]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_1_UDW,
rc_range_params_dword[3]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_2,
rc_range_params_dword[4]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_2_UDW,
rc_range_params_dword[5]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_3,
rc_range_params_dword[6]);
intel_de_write(display, DSCA_RC_RANGE_PARAMETERS_3_UDW,
rc_range_params_dword[7]);
if (vdsc_instances_per_pipe > 1) {
intel_de_write(display, DSCC_RC_RANGE_PARAMETERS_0,
rc_range_params_dword[0]);
intel_de_write(display,
DSCC_RC_RANGE_PARAMETERS_0_UDW,
rc_range_params_dword[1]);
intel_de_write(display, DSCC_RC_RANGE_PARAMETERS_1,
rc_range_params_dword[2]);
intel_de_write(display,
DSCC_RC_RANGE_PARAMETERS_1_UDW,
rc_range_params_dword[3]);
intel_de_write(display, DSCC_RC_RANGE_PARAMETERS_2,
rc_range_params_dword[4]);
intel_de_write(display,
DSCC_RC_RANGE_PARAMETERS_2_UDW,
rc_range_params_dword[5]);
intel_de_write(display, DSCC_RC_RANGE_PARAMETERS_3,
rc_range_params_dword[6]);
intel_de_write(display,
DSCC_RC_RANGE_PARAMETERS_3_UDW,
rc_range_params_dword[7]);
}
} else {
intel_de_write(display, ICL_DSC0_RC_RANGE_PARAMETERS_0(pipe),
rc_range_params_dword[0]);
intel_de_write(display,
ICL_DSC0_RC_RANGE_PARAMETERS_0_UDW(pipe),
rc_range_params_dword[1]);
Annotation
- Immediate include surface: `linux/limits.h`, `drm/display/drm_dsc_helper.h`, `drm/drm_fixed.h`, `drm/drm_print.h`, `intel_crtc.h`, `intel_de.h`, `intel_display_types.h`, `intel_display_utils.h`.
- Detected declarations: `function intel_dsc_source_support`, `function intel_dsc_line_slice_count`, `function intel_dsc_get_slice_config`, `function is_pipe_dsc`, `function intel_vdsc_set_min_max_qp`, `function get_range_bpg_offset`, `function quality`, `function intel_dsc_slice_dimensions_valid`, `function is_dsi_dsc_1_1`, `function intel_dsc_compute_params`.
- 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.