drivers/gpu/drm/i915/display/intel_dp_test.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/i915/display/intel_dp_test.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/i915/display/intel_dp_test.c- Extension
.c- Size
- 22671 bytes
- Lines
- 765
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hdrm/display/drm_dp.hdrm/display/drm_dp_helper.hdrm/drm_edid.hdrm/drm_print.hdrm/drm_probe_helper.hintel_ddi.hintel_de.hintel_display_regs.hintel_display_types.hintel_dp.hintel_dp_link_training.hintel_dp_mst.hintel_dp_test.h
Detected Declarations
function intel_dp_test_resetfunction intel_dp_test_compute_configfunction intel_dp_autotest_link_trainingfunction intel_dp_autotest_video_patternfunction intel_dp_autotest_edidfunction intel_dp_phy_pattern_updatefunction intel_dp_process_phy_requestfunction intel_dp_autotest_phy_patternfunction intel_dp_test_requestfunction intel_dp_prep_phy_testfunction intel_dp_do_phy_testfunction for_each_intel_crtc_in_pipe_maskfunction intel_dp_test_phyfunction intel_dp_test_short_pulsefunction i915_displayport_test_active_writefunction i915_displayport_test_active_showfunction i915_displayport_test_active_openfunction i915_displayport_test_data_showfunction i915_displayport_test_type_showfunction intel_dp_test_debugfs_register
Annotated Snippet
static const struct file_operations i915_displayport_test_active_fops = {
.owner = THIS_MODULE,
.open = i915_displayport_test_active_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = i915_displayport_test_active_write
};
static int i915_displayport_test_data_show(struct seq_file *m, void *data)
{
struct intel_display *display = m->private;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
struct intel_dp *intel_dp;
drm_connector_list_iter_begin(display->drm, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
struct intel_encoder *encoder;
if (connector->connector_type !=
DRM_MODE_CONNECTOR_DisplayPort)
continue;
encoder = to_intel_encoder(connector->encoder);
if (encoder && encoder->type == INTEL_OUTPUT_DP_MST)
continue;
if (encoder && connector->status == connector_status_connected) {
intel_dp = enc_to_intel_dp(encoder);
if (intel_dp->compliance.test_type ==
DP_TEST_LINK_EDID_READ)
seq_printf(m, "%lx",
intel_dp->compliance.test_data.edid);
else if (intel_dp->compliance.test_type ==
DP_TEST_LINK_VIDEO_PATTERN) {
seq_printf(m, "hdisplay: %d\n",
intel_dp->compliance.test_data.hdisplay);
seq_printf(m, "vdisplay: %d\n",
intel_dp->compliance.test_data.vdisplay);
seq_printf(m, "bpc: %u\n",
intel_dp->compliance.test_data.bpc);
} else if (intel_dp->compliance.test_type ==
DP_TEST_LINK_PHY_TEST_PATTERN) {
seq_printf(m, "pattern: %d\n",
intel_dp->compliance.test_data.phytest.phy_pattern);
seq_printf(m, "Number of lanes: %d\n",
intel_dp->compliance.test_data.phytest.num_lanes);
seq_printf(m, "Link Rate: %d\n",
intel_dp->compliance.test_data.phytest.link_rate);
seq_printf(m, "level: %02x\n",
intel_dp->train_set[0]);
}
} else {
seq_puts(m, "0");
}
}
drm_connector_list_iter_end(&conn_iter);
return 0;
}
DEFINE_SHOW_ATTRIBUTE(i915_displayport_test_data);
static int i915_displayport_test_type_show(struct seq_file *m, void *data)
{
struct intel_display *display = m->private;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
struct intel_dp *intel_dp;
drm_connector_list_iter_begin(display->drm, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
struct intel_encoder *encoder;
if (connector->connector_type !=
DRM_MODE_CONNECTOR_DisplayPort)
continue;
encoder = to_intel_encoder(connector->encoder);
if (encoder && encoder->type == INTEL_OUTPUT_DP_MST)
continue;
if (encoder && connector->status == connector_status_connected) {
intel_dp = enc_to_intel_dp(encoder);
seq_printf(m, "%02lx\n", intel_dp->compliance.test_type);
} else {
seq_puts(m, "0");
}
}
drm_connector_list_iter_end(&conn_iter);
Annotation
- Immediate include surface: `linux/debugfs.h`, `drm/display/drm_dp.h`, `drm/display/drm_dp_helper.h`, `drm/drm_edid.h`, `drm/drm_print.h`, `drm/drm_probe_helper.h`, `intel_ddi.h`, `intel_de.h`.
- Detected declarations: `function intel_dp_test_reset`, `function intel_dp_test_compute_config`, `function intel_dp_autotest_link_training`, `function intel_dp_autotest_video_pattern`, `function intel_dp_autotest_edid`, `function intel_dp_phy_pattern_update`, `function intel_dp_process_phy_request`, `function intel_dp_autotest_phy_pattern`, `function intel_dp_test_request`, `function intel_dp_prep_phy_test`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern 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.