drivers/gpu/drm/udl/udl_edid.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/udl/udl_edid.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/udl/udl_edid.c- Extension
.c- Size
- 1711 bytes
- Lines
- 82
- 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
linux/string.hdrm/drm_drv.hdrm/drm_edid.hdrm/drm_print.hudl_drv.hudl_edid.h
Detected Declarations
function udl_read_edid_blockfunction udl_probe_edid
Annotated Snippet
if (ret < 0) {
drm_err(dev, "Read EDID byte %zu failed err %x\n", i, ret);
goto err_drm_dev_exit;
} else if (ret < 1) {
ret = -EIO;
drm_err(dev, "Read EDID byte %zu failed\n", i);
goto err_drm_dev_exit;
}
buf[i] = read_buff[1];
}
drm_dev_exit(idx);
kfree(read_buff);
return 0;
err_drm_dev_exit:
drm_dev_exit(idx);
err_kfree:
kfree(read_buff);
return ret;
}
bool udl_probe_edid(struct udl_device *udl)
{
u8 hdr[8];
int ret;
ret = udl_read_edid_block(udl, hdr, 0, sizeof(hdr));
if (ret)
return false;
/*
* The adapter sends all-zeros if no monitor has been
* connected. We consider anything else a connection.
*/
return !mem_is_zero(hdr, sizeof(hdr));
}
const struct drm_edid *udl_edid_read(struct drm_connector *connector)
{
struct udl_device *udl = to_udl(connector->dev);
return drm_edid_read_custom(connector, udl_read_edid_block, udl);
}
Annotation
- Immediate include surface: `linux/string.h`, `drm/drm_drv.h`, `drm/drm_edid.h`, `drm/drm_print.h`, `udl_drv.h`, `udl_edid.h`.
- Detected declarations: `function udl_read_edid_block`, `function udl_probe_edid`.
- 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.