drivers/gpu/drm/drm_mipi_dbi.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/drm_mipi_dbi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/drm_mipi_dbi.c- Extension
.c- Size
- 35984 bytes
- Lines
- 1386
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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/backlight.hlinux/debugfs.hlinux/delay.hlinux/export.hlinux/gpio/consumer.hlinux/module.hlinux/regulator/consumer.hlinux/spi/spi.hdrm/drm_atomic.hdrm/drm_damage_helper.hdrm/drm_drv.hdrm/drm_file.hdrm/drm_format_helper.hdrm/drm_fourcc.hdrm/drm_framebuffer.hdrm/drm_gem.hdrm/drm_mipi_dbi.hdrm/drm_modes.hdrm/drm_print.hdrm/drm_rect.hvideo/mipi_display.h
Detected Declarations
function mipi_dbi_command_is_readfunction mipi_dbi_command_readfunction mipi_dbi_command_buffunction mipi_dbi_command_stackbuffunction mipi_dbi_buf_copyfunction mipi_dbi_set_window_addressfunction mipi_dbi_fb_dirtyfunction drm_mipi_dbi_crtc_helper_mode_validfunction drm_mipi_dbi_plane_helper_atomic_checkfunction drm_mipi_dbi_plane_helper_atomic_updatefunction mipi_dbi_blankfunction drm_mipi_dbi_crtc_helper_atomic_checkfunction drm_mipi_dbi_crtc_helper_atomic_disablefunction drm_mipi_dbi_connector_helper_get_modesfunction mipi_dbi_rotate_modefunction drm_mipi_dbi_dev_initfunction mipi_dbi_hw_resetfunction registerfunction mipi_dbi_poweron_reset_conditionalfunction mipi_dbi_poweron_resetfunction mipi_dbi_poweron_conditional_resetfunction mipi_dbi_spi_cmd_max_speedfunction MIPI_DCS_NOPfunction mipi_dbi_spi1_transferfunction mipi_dbi_typec1_command_readfunction mipi_dbi_typec1_commandfunction mipi_dbi_typec3_command_readfunction mipi_dbi_typec3_commandfunction endianfunction dma_alloc_wcfunction mipi_dbi_spi_transferfunction mipi_dbi_debugfs_command_writefunction mipi_dbi_debugfs_command_showfunction mipi_dbi_debugfs_command_openfunction mipi_dbi_debugfs_initexport mipi_dbi_command_readexport mipi_dbi_command_bufexport mipi_dbi_command_stackbufexport mipi_dbi_buf_copyexport drm_mipi_dbi_crtc_helper_mode_validexport drm_mipi_dbi_plane_helper_atomic_checkexport drm_mipi_dbi_plane_helper_atomic_updateexport drm_mipi_dbi_crtc_helper_atomic_checkexport drm_mipi_dbi_crtc_helper_atomic_disableexport drm_mipi_dbi_connector_helper_get_modesexport drm_mipi_dbi_dev_initexport mipi_dbi_hw_resetexport mipi_dbi_display_is_on
Annotated Snippet
static const struct file_operations mipi_dbi_debugfs_command_fops = {
.owner = THIS_MODULE,
.open = mipi_dbi_debugfs_command_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
.write = mipi_dbi_debugfs_command_write,
};
/**
* mipi_dbi_debugfs_init - Create debugfs entries
* @minor: DRM minor
*
* This function creates a 'command' debugfs file for sending commands to the
* controller or getting the read command values.
* Drivers can use this as their &drm_driver->debugfs_init callback.
*
*/
void mipi_dbi_debugfs_init(struct drm_minor *minor)
{
struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(minor->dev);
umode_t mode = S_IFREG | S_IWUSR;
if (dbidev->dbi.read_commands)
mode |= S_IRUGO;
debugfs_create_file("command", mode, minor->debugfs_root, dbidev,
&mipi_dbi_debugfs_command_fops);
}
EXPORT_SYMBOL(mipi_dbi_debugfs_init);
#endif
MODULE_DESCRIPTION("MIPI Display Bus Interface (DBI) LCD controller support");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/debugfs.h`, `linux/delay.h`, `linux/export.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/regulator/consumer.h`, `linux/spi/spi.h`.
- Detected declarations: `function mipi_dbi_command_is_read`, `function mipi_dbi_command_read`, `function mipi_dbi_command_buf`, `function mipi_dbi_command_stackbuf`, `function mipi_dbi_buf_copy`, `function mipi_dbi_set_window_address`, `function mipi_dbi_fb_dirty`, `function drm_mipi_dbi_crtc_helper_mode_valid`, `function drm_mipi_dbi_plane_helper_atomic_check`, `function drm_mipi_dbi_plane_helper_atomic_update`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- 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.