drivers/gpu/drm/tests/drm_format_helper_test.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/tests/drm_format_helper_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/tests/drm_format_helper_test.c- Extension
.c- Size
- 49669 bytes
- Lines
- 1741
- 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.
- 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
kunit/test.hdrm/drm_device.hdrm/drm_drv.hdrm/drm_file.hdrm/drm_format_helper.hdrm/drm_fourcc.hdrm/drm_framebuffer.hdrm/drm_gem_framebuffer_helper.hdrm/drm_kunit_helpers.hdrm/drm_mode.hdrm/drm_print.hdrm/drm_rect.h../drm_crtc_internal.h
Detected Declarations
struct convert_to_gray8_resultstruct convert_to_rgb332_resultstruct convert_to_rgb565_resultstruct convert_to_xrgb1555_resultstruct convert_to_argb1555_resultstruct convert_to_rgba5551_resultstruct convert_to_rgb888_resultstruct convert_to_bgr888_resultstruct convert_to_argb8888_resultstruct convert_to_xrgb2101010_resultstruct convert_to_argb2101010_resultstruct convert_to_mono_resultstruct fb_swab_resultstruct convert_to_xbgr8888_resultstruct convert_to_abgr8888_resultstruct convert_xrgb8888_casestruct clip_offset_casestruct fb_memcpy_casefunction conversion_buf_sizefunction convert_xrgb8888_case_descfunction drm_test_fb_xrgb8888_to_gray8function drm_test_fb_xrgb8888_to_rgb332function drm_test_fb_xrgb8888_to_rgb565function drm_test_fb_xrgb8888_to_xrgb1555function drm_test_fb_xrgb8888_to_argb1555function drm_test_fb_xrgb8888_to_rgba5551function drm_test_fb_xrgb8888_to_rgb888function drm_test_fb_xrgb8888_to_bgr888function drm_test_fb_xrgb8888_to_argb8888function drm_test_fb_xrgb8888_to_xrgb2101010function drm_test_fb_xrgb8888_to_argb2101010function drm_test_fb_xrgb8888_to_monofunction drm_test_fb_swabfunction drm_test_fb_xrgb8888_to_abgr8888function drm_test_fb_xrgb8888_to_xbgr8888function clip_offset_case_descfunction drm_test_fb_clip_offsetfunction fb_memcpy_case_descfunction drm_test_fb_memcpy
Annotated Snippet
struct convert_to_gray8_result {
unsigned int dst_pitch;
const u8 expected[TEST_BUF_SIZE];
};
struct convert_to_rgb332_result {
unsigned int dst_pitch;
const u8 expected[TEST_BUF_SIZE];
};
struct convert_to_rgb565_result {
unsigned int dst_pitch;
const u16 expected[TEST_BUF_SIZE];
const u16 expected_swab[TEST_BUF_SIZE];
};
struct convert_to_xrgb1555_result {
unsigned int dst_pitch;
const u16 expected[TEST_BUF_SIZE];
};
struct convert_to_argb1555_result {
unsigned int dst_pitch;
const u16 expected[TEST_BUF_SIZE];
};
struct convert_to_rgba5551_result {
unsigned int dst_pitch;
const u16 expected[TEST_BUF_SIZE];
};
struct convert_to_rgb888_result {
unsigned int dst_pitch;
const u8 expected[TEST_BUF_SIZE];
};
struct convert_to_bgr888_result {
unsigned int dst_pitch;
const u8 expected[TEST_BUF_SIZE];
};
struct convert_to_argb8888_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_to_xrgb2101010_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_to_argb2101010_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_to_mono_result {
unsigned int dst_pitch;
const u8 expected[TEST_BUF_SIZE];
};
struct fb_swab_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_to_xbgr8888_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_to_abgr8888_result {
unsigned int dst_pitch;
const u32 expected[TEST_BUF_SIZE];
};
struct convert_xrgb8888_case {
const char *name;
unsigned int pitch;
struct drm_rect clip;
const u32 xrgb8888[TEST_BUF_SIZE];
struct convert_to_gray8_result gray8_result;
struct convert_to_rgb332_result rgb332_result;
struct convert_to_rgb565_result rgb565_result;
struct convert_to_xrgb1555_result xrgb1555_result;
struct convert_to_argb1555_result argb1555_result;
struct convert_to_rgba5551_result rgba5551_result;
struct convert_to_rgb888_result rgb888_result;
struct convert_to_bgr888_result bgr888_result;
struct convert_to_argb8888_result argb8888_result;
Annotation
- Immediate include surface: `kunit/test.h`, `drm/drm_device.h`, `drm/drm_drv.h`, `drm/drm_file.h`, `drm/drm_format_helper.h`, `drm/drm_fourcc.h`, `drm/drm_framebuffer.h`, `drm/drm_gem_framebuffer_helper.h`.
- Detected declarations: `struct convert_to_gray8_result`, `struct convert_to_rgb332_result`, `struct convert_to_rgb565_result`, `struct convert_to_xrgb1555_result`, `struct convert_to_argb1555_result`, `struct convert_to_rgba5551_result`, `struct convert_to_rgb888_result`, `struct convert_to_bgr888_result`, `struct convert_to_argb8888_result`, `struct convert_to_xrgb2101010_result`.
- 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.