drivers/gpu/drm/drm_internal.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/drm_internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/drm_internal.h- Extension
.h- Size
- 10141 bytes
- Lines
- 295
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kthread.hlinux/types.hdrm/drm_ioctl.hdrm/drm_vblank.h
Detected Declarations
struct dentrystruct dma_bufstruct iosys_mapstruct drm_connectorstruct drm_crtcstruct drm_framebufferstruct drm_gem_objectstruct drm_masterstruct drm_minorstruct drm_prime_file_privatestruct drm_printerstruct drm_vblank_crtcfunction drm_client_debugfs_initfunction drm_client_sysrq_registerfunction drm_pci_set_busidfunction drm_vblank_passedfunction drm_vblank_flush_workerfunction drm_vblank_destroy_workerfunction drm_debugfs_dev_finifunction drm_debugfs_unregister
Annotated Snippet
#ifndef __DRM_INTERNAL_H__
#define __DRM_INTERNAL_H__
#include <linux/kthread.h>
#include <linux/types.h>
#include <drm/drm_ioctl.h>
#include <drm/drm_vblank.h>
#define DRM_IF_MAJOR 1
#define DRM_IF_MINOR 4
#define DRM_IF_VERSION(maj, min) (maj << 16 | min)
struct dentry;
struct dma_buf;
struct iosys_map;
struct drm_connector;
struct drm_crtc;
struct drm_framebuffer;
struct drm_gem_object;
struct drm_master;
struct drm_minor;
struct drm_prime_file_private;
struct drm_printer;
struct drm_vblank_crtc;
/* drm_client_event.c */
#if defined(CONFIG_DRM_CLIENT)
void drm_client_debugfs_init(struct drm_device *dev);
#else
static inline void drm_client_debugfs_init(struct drm_device *dev)
{ }
#endif
/* drm_client_sysrq.c */
#if defined(CONFIG_DRM_CLIENT) && defined(CONFIG_MAGIC_SYSRQ)
void drm_client_sysrq_register(struct drm_device *dev);
void drm_client_sysrq_unregister(struct drm_device *dev);
#else
static inline void drm_client_sysrq_register(struct drm_device *dev)
{ }
static inline void drm_client_sysrq_unregister(struct drm_device *dev)
{ }
#endif
/* drm_file.c */
extern struct mutex drm_global_mutex;
bool drm_dev_needs_global_mutex(struct drm_device *dev);
struct drm_file *drm_file_alloc(struct drm_minor *minor);
void drm_file_free(struct drm_file *file);
#ifdef CONFIG_PCI
/* drm_pci.c */
int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master);
#else
static inline int drm_pci_set_busid(struct drm_device *dev,
struct drm_master *master)
{
return -EINVAL;
}
#endif
/* drm_prime.c */
int drm_prime_handle_to_fd_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
int drm_prime_fd_to_handle_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv);
void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);
int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv,
struct dma_buf *dma_buf, uint32_t handle);
void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv,
uint32_t handle);
/* drm_managed.c */
void drm_managed_release(struct drm_device *dev);
void drmm_add_final_kfree(struct drm_device *dev, void *container);
/* drm_vblank.c */
static inline bool drm_vblank_passed(u64 seq, u64 ref)
{
return (seq - ref) <= (1 << 23);
}
Annotation
- Immediate include surface: `linux/kthread.h`, `linux/types.h`, `drm/drm_ioctl.h`, `drm/drm_vblank.h`.
- Detected declarations: `struct dentry`, `struct dma_buf`, `struct iosys_map`, `struct drm_connector`, `struct drm_crtc`, `struct drm_framebuffer`, `struct drm_gem_object`, `struct drm_master`, `struct drm_minor`, `struct drm_prime_file_private`.
- 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.