include/linux/host1x.h
Source file repositories/reference/linux-study-clean/include/linux/host1x.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/host1x.h- Extension
.h- Size
- 13865 bytes
- Lines
- 501
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/dma-direction.hlinux/dma-fence.hlinux/spinlock.hlinux/types.h
Detected Declarations
struct host1xstruct host1x_clientstruct iommu_groupstruct host1x_bo_cachestruct host1x_client_opsstruct host1x_clientstruct host1x_bostruct sg_tablestruct host1x_bo_mappingstruct host1x_bo_opsstruct host1x_bostruct host1x_syncpt_basestruct host1x_syncptstruct host1xstruct host1x_channelstruct host1x_jobstruct host1x_relocstruct host1x_jobstruct host1x_devicestruct host1x_driverstruct host1x_devicestruct host1x_memory_contextenum host1x_classfunction host1x_bo_cache_initfunction host1x_bo_cache_destroyfunction host1x_bo_initfunction host1x_bo_putfunction host1x_bo_munmapfunction to_host1x_driverfunction host1x_memory_context_get
Annotated Snippet
struct device_driver driver;
const struct of_device_id *subdevs;
struct list_head list;
int (*probe)(struct host1x_device *device);
void (*remove)(struct host1x_device *device);
void (*shutdown)(struct host1x_device *device);
};
static inline struct host1x_driver *
to_host1x_driver(struct device_driver *driver)
{
return container_of(driver, struct host1x_driver, driver);
}
int host1x_driver_register_full(struct host1x_driver *driver,
struct module *owner);
void host1x_driver_unregister(struct host1x_driver *driver);
#define host1x_driver_register(driver) \
host1x_driver_register_full(driver, THIS_MODULE)
struct host1x_device {
struct host1x_driver *driver;
struct list_head list;
struct device dev;
struct mutex subdevs_lock;
struct list_head subdevs;
struct list_head active;
struct mutex clients_lock;
struct list_head clients;
bool registered;
struct device_dma_parameters dma_parms;
};
static inline struct host1x_device *to_host1x_device(struct device *dev)
{
return container_of(dev, struct host1x_device, dev);
}
int host1x_device_init(struct host1x_device *device);
int host1x_device_exit(struct host1x_device *device);
void __host1x_client_init(struct host1x_client *client, struct lock_class_key *key);
void host1x_client_exit(struct host1x_client *client);
#define host1x_client_init(client) \
({ \
static struct lock_class_key __key; \
__host1x_client_init(client, &__key); \
})
int __host1x_client_register(struct host1x_client *client);
/*
* Note that this wrapper calls __host1x_client_init() for compatibility
* with existing callers. Callers that want to separately initialize and
* register a host1x client must first initialize using either of the
* __host1x_client_init() or host1x_client_init() functions and then use
* the low-level __host1x_client_register() function to avoid the client
* getting reinitialized.
*/
#define host1x_client_register(client) \
({ \
static struct lock_class_key __key; \
__host1x_client_init(client, &__key); \
__host1x_client_register(client); \
})
void host1x_client_unregister(struct host1x_client *client);
int host1x_client_suspend(struct host1x_client *client);
int host1x_client_resume(struct host1x_client *client);
/* host1x memory contexts */
struct host1x_memory_context {
struct host1x *host;
refcount_t ref;
struct pid *owner;
struct device_dma_parameters dma_parms;
struct device dev;
u64 dma_mask;
Annotation
- Immediate include surface: `linux/device.h`, `linux/dma-direction.h`, `linux/dma-fence.h`, `linux/spinlock.h`, `linux/types.h`.
- Detected declarations: `struct host1x`, `struct host1x_client`, `struct iommu_group`, `struct host1x_bo_cache`, `struct host1x_client_ops`, `struct host1x_client`, `struct host1x_bo`, `struct sg_table`, `struct host1x_bo_mapping`, `struct host1x_bo_ops`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.