drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_colorop_test.c- Extension
.c- Size
- 7540 bytes
- Lines
- 240
- 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_colorop.hdrm/drm_kunit_helpers.hamdgpu_dm_colorop.h
Detected Declarations
function dm_test_supported_degam_tfs_has_srgb_eotffunction dm_test_supported_degam_tfs_has_pq125_eotffunction dm_test_supported_degam_tfs_has_bt2020_inv_oetffunction dm_test_supported_degam_tfs_has_gamma22function dm_test_supported_degam_tfs_no_extra_bitsfunction dm_test_supported_shaper_tfs_has_srgb_inv_eotffunction dm_test_supported_shaper_tfs_has_pq125_inv_eotffunction dm_test_supported_shaper_tfs_has_bt2020_oetffunction dm_test_supported_shaper_tfs_has_gamma22_invfunction dm_test_supported_shaper_tfs_no_extra_bitsfunction dm_test_supported_blnd_tfs_has_srgb_eotffunction dm_test_supported_blnd_tfs_has_pq125_eotffunction dm_test_supported_blnd_tfs_has_bt2020_inv_oetffunction dm_test_supported_blnd_tfs_has_gamma22function dm_test_supported_blnd_tfs_no_extra_bitsfunction dm_test_degam_and_blnd_tfs_matchfunction kunit_colorop_pipeline_destroyfunction dm_test_initialize_default_pipelinefunction drm_for_each_colorop
Annotated Snippet
if (op->base.id == (uint32_t)list.type) {
first = op;
break;
}
}
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, first);
for (op = first; op; op = op->next, i++) {
KUNIT_ASSERT_LT(test, i, (int)ARRAY_SIZE(expected));
KUNIT_EXPECT_EQ(test, op->type, expected[i]);
KUNIT_EXPECT_NOT_NULL(test, op->bypass_property);
}
KUNIT_EXPECT_EQ(test, i, (int)ARRAY_SIZE(expected));
}
static struct kunit_case dm_colorop_test_cases[] = {
/* degam TFs */
KUNIT_CASE(dm_test_supported_degam_tfs_has_srgb_eotf),
KUNIT_CASE(dm_test_supported_degam_tfs_has_pq125_eotf),
KUNIT_CASE(dm_test_supported_degam_tfs_has_bt2020_inv_oetf),
KUNIT_CASE(dm_test_supported_degam_tfs_has_gamma22),
KUNIT_CASE(dm_test_supported_degam_tfs_no_extra_bits),
/* shaper TFs */
KUNIT_CASE(dm_test_supported_shaper_tfs_has_srgb_inv_eotf),
KUNIT_CASE(dm_test_supported_shaper_tfs_has_pq125_inv_eotf),
KUNIT_CASE(dm_test_supported_shaper_tfs_has_bt2020_oetf),
KUNIT_CASE(dm_test_supported_shaper_tfs_has_gamma22_inv),
KUNIT_CASE(dm_test_supported_shaper_tfs_no_extra_bits),
/* blnd TFs */
KUNIT_CASE(dm_test_supported_blnd_tfs_has_srgb_eotf),
KUNIT_CASE(dm_test_supported_blnd_tfs_has_pq125_eotf),
KUNIT_CASE(dm_test_supported_blnd_tfs_has_bt2020_inv_oetf),
KUNIT_CASE(dm_test_supported_blnd_tfs_has_gamma22),
KUNIT_CASE(dm_test_supported_blnd_tfs_no_extra_bits),
/* cross-check */
KUNIT_CASE(dm_test_degam_and_blnd_tfs_match),
/* amdgpu_dm_initialize_default_pipeline */
KUNIT_CASE(dm_test_initialize_default_pipeline),
{}
};
static struct kunit_suite dm_colorop_test_suite = {
.name = "amdgpu_dm_colorop",
.test_cases = dm_colorop_test_cases,
};
kunit_test_suite(dm_colorop_test_suite);
MODULE_LICENSE("Dual MIT/GPL");
MODULE_DESCRIPTION("KUnit tests for amdgpu_dm_colorop");
MODULE_AUTHOR("AMD");
Annotation
- Immediate include surface: `kunit/test.h`, `drm/drm_colorop.h`, `drm/drm_kunit_helpers.h`, `amdgpu_dm_colorop.h`.
- Detected declarations: `function dm_test_supported_degam_tfs_has_srgb_eotf`, `function dm_test_supported_degam_tfs_has_pq125_eotf`, `function dm_test_supported_degam_tfs_has_bt2020_inv_oetf`, `function dm_test_supported_degam_tfs_has_gamma22`, `function dm_test_supported_degam_tfs_no_extra_bits`, `function dm_test_supported_shaper_tfs_has_srgb_inv_eotf`, `function dm_test_supported_shaper_tfs_has_pq125_inv_eotf`, `function dm_test_supported_shaper_tfs_has_bt2020_oetf`, `function dm_test_supported_shaper_tfs_has_gamma22_inv`, `function dm_test_supported_shaper_tfs_no_extra_bits`.
- 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.