drivers/media/test-drivers/visl/visl-video.c
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/visl/visl-video.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/visl/visl-video.c- Extension
.c- Size
- 20416 bytes
- Lines
- 804
- Domain
- Driver Families
- Bucket
- drivers/media
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hlinux/font.hmedia/v4l2-event.hmedia/v4l2-ioctl.hmedia/videobuf2-vmalloc.hmedia/videobuf2-v4l2.hvisl-video.hvisl.hvisl-debugfs.h
Detected Declarations
function visl_set_current_codecfunction visl_print_fmtfunction visl_tpg_initfunction visl_find_coded_fmt_descfunction visl_init_fmtfunction visl_reset_coded_fmtfunction visl_reset_decoded_fmtfunction visl_set_default_formatfunction visl_querycapfunction visl_enum_fmt_vid_capfunction visl_enum_fmt_vid_outfunction visl_g_fmt_vid_capfunction visl_g_fmt_vid_outfunction visl_try_fmt_vid_capfunction visl_try_fmt_vid_outfunction visl_s_fmt_vid_outfunction visl_s_fmt_vid_capfunction visl_enum_framesizesfunction visl_queue_setupfunction visl_queue_cleanupfunction visl_buf_out_validatefunction visl_buf_preparefunction visl_start_streamingfunction visl_stop_streamingfunction visl_buf_queuefunction visl_buf_request_completefunction visl_queue_initfunction visl_request_validatefunction list_for_each_entry
Annotated Snippet
if (vb2_request_object_is_buffer(obj)) {
vb = container_of(obj, struct vb2_buffer, req_obj);
ctx = vb2_get_drv_priv(vb->vb2_queue);
break;
}
}
if (!ctx)
return -ENOENT;
count = vb2_request_buffer_cnt(req);
if (!count) {
v4l2_err(&ctx->dev->v4l2_dev,
"No buffer was provided with the request\n");
return -ENOENT;
} else if (count > 1) {
v4l2_err(&ctx->dev->v4l2_dev,
"More than one buffer was provided with the request\n");
return -EINVAL;
}
return vb2_request_validate(req);
}
Annotation
- Immediate include surface: `linux/debugfs.h`, `linux/font.h`, `media/v4l2-event.h`, `media/v4l2-ioctl.h`, `media/videobuf2-vmalloc.h`, `media/videobuf2-v4l2.h`, `visl-video.h`, `visl.h`.
- Detected declarations: `function visl_set_current_codec`, `function visl_print_fmt`, `function visl_tpg_init`, `function visl_find_coded_fmt_desc`, `function visl_init_fmt`, `function visl_reset_coded_fmt`, `function visl_reset_decoded_fmt`, `function visl_set_default_format`, `function visl_querycap`, `function visl_enum_fmt_vid_cap`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.