drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/amdgpu/jpeg_v1_0.c- Extension
.c- Size
- 21423 bytes
- Lines
- 688
- 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
amdgpu.hamdgpu_jpeg.hamdgpu_cs.hsoc15.hsoc15d.hvcn_v1_0.hjpeg_v1_0.hvcn/vcn_1_0_offset.hvcn/vcn_1_0_sh_mask.h
Detected Declarations
function jpeg_v1_0_decode_ring_patch_wregfunction jpeg_v1_0_decode_ring_set_patch_ringfunction jpeg_v1_0_decode_ring_get_rptrfunction jpeg_v1_0_decode_ring_get_wptrfunction jpeg_v1_0_decode_ring_set_wptrfunction jpeg_v1_0_decode_ring_insert_startfunction jpeg_v1_0_decode_ring_insert_endfunction jpeg_v1_0_decode_ring_emit_fencefunction jpeg_v1_0_decode_ring_emit_ibfunction jpeg_v1_0_decode_ring_emit_reg_waitfunction jpeg_v1_0_decode_ring_emit_vm_flushfunction jpeg_v1_0_decode_ring_emit_wregfunction jpeg_v1_0_decode_ring_nopfunction jpeg_v1_0_set_interrupt_statefunction jpeg_v1_0_process_interruptfunction jpeg_v1_0_early_initfunction jpeg_v1_0_sw_initfunction jpeg_v1_0_sw_finifunction jpeg_v1_0_startfunction jpeg_v1_0_set_dec_ring_funcsfunction jpeg_v1_0_set_irq_funcsfunction jpeg_v1_0_ring_begin_usefunction jpeg_v1_dec_ring_parse_cs
Annotated Snippet
switch (type) {
case PACKETJ_TYPE0:
if (reg != JPEG_V1_LMI_JPEG_WRITE_64BIT_BAR_HIGH &&
reg != JPEG_V1_LMI_JPEG_WRITE_64BIT_BAR_LOW &&
reg != JPEG_V1_LMI_JPEG_READ_64BIT_BAR_HIGH &&
reg != JPEG_V1_LMI_JPEG_READ_64BIT_BAR_LOW &&
reg != JPEG_V1_REG_CTX_INDEX &&
reg != JPEG_V1_REG_CTX_DATA) {
ret = -EINVAL;
}
break;
case PACKETJ_TYPE1:
if (reg != JPEG_V1_REG_CTX_DATA)
ret = -EINVAL;
break;
case PACKETJ_TYPE3:
if (reg != JPEG_V1_REG_SOFT_RESET)
ret = -EINVAL;
break;
case PACKETJ_TYPE6:
if (ib->ptr[i] != CP_PACKETJ_NOP)
ret = -EINVAL;
break;
default:
ret = -EINVAL;
}
if (ret) {
dev_err(adev->dev, "Invalid packet [0x%08x]!\n", ib->ptr[i]);
break;
}
}
return ret;
}
Annotation
- Immediate include surface: `amdgpu.h`, `amdgpu_jpeg.h`, `amdgpu_cs.h`, `soc15.h`, `soc15d.h`, `vcn_v1_0.h`, `jpeg_v1_0.h`, `vcn/vcn_1_0_offset.h`.
- Detected declarations: `function jpeg_v1_0_decode_ring_patch_wreg`, `function jpeg_v1_0_decode_ring_set_patch_ring`, `function jpeg_v1_0_decode_ring_get_rptr`, `function jpeg_v1_0_decode_ring_get_wptr`, `function jpeg_v1_0_decode_ring_set_wptr`, `function jpeg_v1_0_decode_ring_insert_start`, `function jpeg_v1_0_decode_ring_insert_end`, `function jpeg_v1_0_decode_ring_emit_fence`, `function jpeg_v1_0_decode_ring_emit_ib`, `function jpeg_v1_0_decode_ring_emit_reg_wait`.
- 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.