drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c- Extension
.c- Size
- 17854 bytes
- Lines
- 717
- 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/dce_11_0_d.hdce/dce_11_0_sh_mask.hdc_types.hdc_bios_types.hdc.hinclude/grph_object_id.hinclude/logger_interface.hdce110_timing_generator.hdce110_timing_generator_v.htiming_generator.h
Detected Declarations
function filesfunction dce110_timing_generator_v_disable_crtcfunction dce110_timing_generator_v_blank_crtcfunction dce110_timing_generator_v_unblank_crtcfunction dce110_timing_generator_v_is_in_vertical_blankfunction dce110_timing_generator_v_is_counter_movingfunction dce110_timing_generator_v_wait_for_vblankfunction VActivefunction dce110_timing_generator_v_wait_for_statefunction dce110_timing_generator_v_program_blankingfunction dce110_timing_generator_v_enable_advanced_requestfunction dce110_timing_generator_v_set_blankfunction dce110_timing_generator_v_program_timingfunction dce110_timing_generator_v_program_blank_colorfunction dce110_timing_generator_v_set_overscan_color_blackfunction dce110_tg_v_program_blank_colorfunction dce110_timing_generator_v_set_overscan_colorfunction dce110_timing_generator_v_set_colorsfunction dce110_timing_generator_v_set_early_controlfunction dce110_timing_generator_v_get_vblank_counterfunction dce110_timing_generator_v_did_triggered_reset_occurfunction dce110_timing_generator_v_setup_global_swap_lockfunction dce110_timing_generator_v_enable_reset_triggerfunction dce110_timing_generator_v_disable_reset_triggerfunction dce110_timing_generator_v_tear_down_global_swap_lockfunction dce110_timing_generator_v_disable_vgafunction dce110_timing_generator_v_construct
Annotated Snippet
if (!dce110_timing_generator_v_is_counter_moving(tg)) {
/* error - no point to wait if counter is not moving */
break;
}
}
while (!dce110_timing_generator_v_is_in_vertical_blank(tg)) {
if (!dce110_timing_generator_v_is_counter_moving(tg)) {
/* error - no point to wait if counter is not moving */
break;
}
}
}
/*
* Wait till we are in VActive (anywhere in VActive)
*/
static void dce110_timing_generator_v_wait_for_vactive(struct timing_generator *tg)
{
while (dce110_timing_generator_v_is_in_vertical_blank(tg)) {
if (!dce110_timing_generator_v_is_counter_moving(tg)) {
/* error - no point to wait if counter is not moving */
break;
}
}
}
static void dce110_timing_generator_v_wait_for_state(struct timing_generator *tg,
enum crtc_state state)
{
switch (state) {
case CRTC_STATE_VBLANK:
dce110_timing_generator_v_wait_for_vblank(tg);
break;
case CRTC_STATE_VACTIVE:
dce110_timing_generator_v_wait_for_vactive(tg);
break;
default:
break;
}
}
static void dce110_timing_generator_v_program_blanking(
struct timing_generator *tg,
const struct dc_crtc_timing *timing)
{
uint32_t vsync_offset = timing->v_border_bottom +
timing->v_front_porch;
uint32_t v_sync_start = timing->v_addressable + vsync_offset;
uint32_t hsync_offset = timing->h_border_right +
timing->h_front_porch;
uint32_t h_sync_start = timing->h_addressable + hsync_offset;
struct dc_context *ctx = tg->ctx;
uint32_t value = 0;
uint32_t addr = 0;
uint32_t tmp = 0;
addr = mmCRTCV_H_TOTAL;
value = dm_read_reg(ctx, addr);
set_reg_field_value(
value,
timing->h_total - 1,
CRTCV_H_TOTAL,
CRTC_H_TOTAL);
dm_write_reg(ctx, addr, value);
addr = mmCRTCV_V_TOTAL;
value = dm_read_reg(ctx, addr);
set_reg_field_value(
value,
timing->v_total - 1,
CRTCV_V_TOTAL,
CRTC_V_TOTAL);
dm_write_reg(ctx, addr, value);
addr = mmCRTCV_H_BLANK_START_END;
value = dm_read_reg(ctx, addr);
tmp = timing->h_total -
(h_sync_start + timing->h_border_left);
set_reg_field_value(
value,
tmp,
CRTCV_H_BLANK_START_END,
CRTC_H_BLANK_END);
Annotation
- Immediate include surface: `dm_services.h`, `dce/dce_11_0_d.h`, `dce/dce_11_0_sh_mask.h`, `dc_types.h`, `dc_bios_types.h`, `dc.h`, `include/grph_object_id.h`, `include/logger_interface.h`.
- Detected declarations: `function files`, `function dce110_timing_generator_v_disable_crtc`, `function dce110_timing_generator_v_blank_crtc`, `function dce110_timing_generator_v_unblank_crtc`, `function dce110_timing_generator_v_is_in_vertical_blank`, `function dce110_timing_generator_v_is_counter_moving`, `function dce110_timing_generator_v_wait_for_vblank`, `function VActive`, `function dce110_timing_generator_v_wait_for_state`, `function dce110_timing_generator_v_program_blanking`.
- 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.