drivers/gpu/drm/amd/display/dc/irq/irq_service.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/irq/irq_service.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/irq/irq_service.c- Extension
.c- Size
- 6157 bytes
- Lines
- 244
- 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.hinclude/irq_service_interface.hinclude/logger_interface.hdce110/irq_service_dce110.hdce60/irq_service_dce60.hdce80/irq_service_dce80.hdce120/irq_service_dce120.hdcn10/irq_service_dcn10.hreg_helper.hirq_service.h
Detected Declarations
function filesfunction dal_irq_service_destroyfunction dal_irq_service_set_genericfunction dal_irq_service_setfunction dal_irq_service_ack_genericfunction dal_irq_service_ackfunction dal_irq_service_to_irq_sourcefunction hpd0_ackfunction hpd1_ack
Annotated Snippet
if (info->funcs->set == dal_irq_service_dummy_set) {
DC_LOG_WARNING("%s: src: %d, st: %d\n", __func__,
source, enable);
ASSERT(0);
}
return info->funcs->set(irq_service, info, enable);
}
dal_irq_service_set_generic(irq_service, info, enable);
return true;
}
void dal_irq_service_ack_generic(
struct irq_service *irq_service,
const struct irq_source_info *info)
{
uint32_t addr = info->ack_reg;
uint32_t value = dm_read_reg(irq_service->ctx, addr);
value = (value & ~info->ack_mask) |
(info->ack_value & info->ack_mask);
dm_write_reg(irq_service->ctx, addr, value);
}
bool dal_irq_service_ack(
struct irq_service *irq_service,
enum dc_irq_source source)
{
const struct irq_source_info *info =
find_irq_source_info(irq_service, source);
if (!info) {
DC_LOG_ERROR("%s: cannot find irq info table entry for %d\n",
__func__,
source);
return false;
}
if (info->funcs && info->funcs->ack) {
if (info->funcs->ack == dal_irq_service_dummy_ack) {
DC_LOG_WARNING("%s: src: %d\n", __func__, source);
ASSERT(0);
}
return info->funcs->ack(irq_service, info);
}
dal_irq_service_ack_generic(irq_service, info);
return true;
}
enum dc_irq_source dal_irq_service_to_irq_source(
struct irq_service *irq_service,
uint32_t src_id,
uint32_t ext_id)
{
return irq_service->funcs->to_dal_irq_source(
irq_service,
src_id,
ext_id);
}
bool hpd0_ack(
struct irq_service *irq_service,
const struct irq_source_info *info)
{
uint32_t addr = info->status_reg;
uint32_t value = dm_read_reg(irq_service->ctx, addr);
uint32_t current_status =
get_reg_field_value(
value,
HPD0_DC_HPD_INT_STATUS,
DC_HPD_SENSE_DELAYED);
dal_irq_service_ack_generic(irq_service, info);
value = dm_read_reg(irq_service->ctx, info->enable_reg);
set_reg_field_value(
value,
current_status ? 0 : 1,
HPD0_DC_HPD_INT_CONTROL,
DC_HPD_INT_POLARITY);
dm_write_reg(irq_service->ctx, info->enable_reg, value);
return true;
Annotation
- Immediate include surface: `dm_services.h`, `include/irq_service_interface.h`, `include/logger_interface.h`, `dce110/irq_service_dce110.h`, `dce60/irq_service_dce60.h`, `dce80/irq_service_dce80.h`, `dce120/irq_service_dce120.h`, `dcn10/irq_service_dcn10.h`.
- Detected declarations: `function files`, `function dal_irq_service_destroy`, `function dal_irq_service_set_generic`, `function dal_irq_service_set`, `function dal_irq_service_ack_generic`, `function dal_irq_service_ack`, `function dal_irq_service_to_irq_source`, `function hpd0_ack`, `function hpd1_ack`.
- 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.