drivers/gpu/host1x/hw/opcodes.h
Source file repositories/reference/linux-study-clean/drivers/gpu/host1x/hw/opcodes.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/host1x/hw/opcodes.h- Extension
.h- Size
- 3736 bytes
- Lines
- 151
- 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.
Dependency Surface
linux/types.h
Detected Declarations
function Copyrightfunction host1x_class_host_load_syncpt_basefunction host1x_class_host_wait_syncpt_basefunction host1x_class_host_incr_syncpt_basefunction host1x_class_host_incr_syncptfunction host1x_class_host_indoff_reg_writefunction host1x_class_host_indoff_reg_readfunction host1x_opcode_setclassfunction host1x_opcode_incrfunction host1x_opcode_nonincrfunction host1x_opcode_maskfunction host1x_opcode_immfunction host1x_opcode_imm_incr_syncptfunction host1x_opcode_restartfunction host1x_opcode_gatherfunction host1x_opcode_gather_nonincrfunction host1x_opcode_gather_incrfunction host1x_opcode_setstreamidfunction host1x_opcode_setpayloadfunction host1x_opcode_gather_widefunction host1x_opcode_acquire_mlockfunction host1x_opcode_release_mlock
Annotated Snippet
#ifndef __HOST1X_OPCODES_H
#define __HOST1X_OPCODES_H
#include <linux/types.h>
static inline u32 host1x_class_host_wait_syncpt(
unsigned indx, unsigned threshold)
{
return host1x_uclass_wait_syncpt_indx_f(indx)
| host1x_uclass_wait_syncpt_thresh_f(threshold);
}
static inline u32 host1x_class_host_load_syncpt_base(
unsigned indx, unsigned threshold)
{
return host1x_uclass_load_syncpt_base_base_indx_f(indx)
| host1x_uclass_load_syncpt_base_value_f(threshold);
}
static inline u32 host1x_class_host_wait_syncpt_base(
unsigned indx, unsigned base_indx, unsigned offset)
{
return host1x_uclass_wait_syncpt_base_indx_f(indx)
| host1x_uclass_wait_syncpt_base_base_indx_f(base_indx)
| host1x_uclass_wait_syncpt_base_offset_f(offset);
}
static inline u32 host1x_class_host_incr_syncpt_base(
unsigned base_indx, unsigned offset)
{
return host1x_uclass_incr_syncpt_base_base_indx_f(base_indx)
| host1x_uclass_incr_syncpt_base_offset_f(offset);
}
static inline u32 host1x_class_host_incr_syncpt(
unsigned cond, unsigned indx)
{
return host1x_uclass_incr_syncpt_cond_f(cond)
| host1x_uclass_incr_syncpt_indx_f(indx);
}
static inline u32 host1x_class_host_indoff_reg_write(
unsigned mod_id, unsigned offset, bool auto_inc)
{
u32 v = host1x_uclass_indoff_indbe_f(0xf)
| host1x_uclass_indoff_indmodid_f(mod_id)
| host1x_uclass_indoff_indroffset_f(offset);
if (auto_inc)
v |= host1x_uclass_indoff_autoinc_f(1);
return v;
}
static inline u32 host1x_class_host_indoff_reg_read(
unsigned mod_id, unsigned offset, bool auto_inc)
{
u32 v = host1x_uclass_indoff_indmodid_f(mod_id)
| host1x_uclass_indoff_indroffset_f(offset)
| host1x_uclass_indoff_rwn_read_v();
if (auto_inc)
v |= host1x_uclass_indoff_autoinc_f(1);
return v;
}
static inline u32 host1x_opcode_setclass(
unsigned class_id, unsigned offset, unsigned mask)
{
return (0 << 28) | (offset << 16) | (class_id << 6) | mask;
}
static inline u32 host1x_opcode_incr(unsigned offset, unsigned count)
{
return (1 << 28) | (offset << 16) | count;
}
static inline u32 host1x_opcode_nonincr(unsigned offset, unsigned count)
{
return (2 << 28) | (offset << 16) | count;
}
static inline u32 host1x_opcode_mask(unsigned offset, unsigned mask)
{
return (3 << 28) | (offset << 16) | mask;
}
static inline u32 host1x_opcode_imm(unsigned offset, unsigned value)
{
return (4 << 28) | (offset << 16) | value;
}
static inline u32 host1x_opcode_imm_incr_syncpt(unsigned cond, unsigned indx)
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `function Copyright`, `function host1x_class_host_load_syncpt_base`, `function host1x_class_host_wait_syncpt_base`, `function host1x_class_host_incr_syncpt_base`, `function host1x_class_host_incr_syncpt`, `function host1x_class_host_indoff_reg_write`, `function host1x_class_host_indoff_reg_read`, `function host1x_opcode_setclass`, `function host1x_opcode_incr`, `function host1x_opcode_nonincr`.
- 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.