drivers/gpu/drm/v3d/v3d_regs.h
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/v3d/v3d_regs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/v3d/v3d_regs.h- Extension
.h- Size
- 28281 bytes
- Lines
- 545
- 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/bitops.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0+
/* Copyright (C) 2017-2018 Broadcom */
#ifndef V3D_REGS_H
#define V3D_REGS_H
#include <linux/bitops.h>
#define V3D_MASK(high, low) ((u32)GENMASK(high, low))
/* Using the GNU statement expression extension */
#define V3D_SET_FIELD(value, field) \
({ \
u32 fieldval = (value) << field##_SHIFT; \
WARN_ON((fieldval & ~field##_MASK) != 0); \
fieldval & field##_MASK; \
})
#define V3D_SET_FIELD_VER(value, field, ver) \
({ \
typeof(ver) _ver = (ver); \
u32 fieldval = (value) << field##_SHIFT(_ver); \
WARN_ON((fieldval & ~field##_MASK(_ver)) != 0); \
fieldval & field##_MASK(_ver); \
})
#define V3D_GET_FIELD(word, field) (((word) & field##_MASK) >> \
field##_SHIFT)
/* Hub registers for shared hardware between V3D cores. */
#define V3D_HUB_AXICFG 0x00000
# define V3D_HUB_AXICFG_MAX_LEN_MASK V3D_MASK(3, 0)
# define V3D_HUB_AXICFG_MAX_LEN_SHIFT 0
#define V3D_HUB_UIFCFG 0x00004
#define V3D_HUB_IDENT0 0x00008
#define V3D_HUB_IDENT1 0x0000c
# define V3D_HUB_IDENT1_WITH_MSO BIT(19)
# define V3D_HUB_IDENT1_WITH_TSY BIT(18)
# define V3D_HUB_IDENT1_WITH_TFU BIT(17)
# define V3D_HUB_IDENT1_WITH_L3C BIT(16)
# define V3D_HUB_IDENT1_NHOSTS_MASK V3D_MASK(15, 12)
# define V3D_HUB_IDENT1_NHOSTS_SHIFT 12
# define V3D_HUB_IDENT1_NCORES_MASK V3D_MASK(11, 8)
# define V3D_HUB_IDENT1_NCORES_SHIFT 8
# define V3D_HUB_IDENT1_REV_MASK V3D_MASK(7, 4)
# define V3D_HUB_IDENT1_REV_SHIFT 4
# define V3D_HUB_IDENT1_TVER_MASK V3D_MASK(3, 0)
# define V3D_HUB_IDENT1_TVER_SHIFT 0
#define V3D_HUB_IDENT2 0x00010
# define V3D_HUB_IDENT2_WITH_MMU BIT(8)
# define V3D_HUB_IDENT2_L3C_NKB_MASK V3D_MASK(7, 0)
# define V3D_HUB_IDENT2_L3C_NKB_SHIFT 0
#define V3D_HUB_IDENT3 0x00014
# define V3D_HUB_IDENT3_IPREV_MASK V3D_MASK(15, 8)
# define V3D_HUB_IDENT3_IPREV_SHIFT 8
# define V3D_HUB_IDENT3_IPIDX_MASK V3D_MASK(7, 0)
# define V3D_HUB_IDENT3_IPIDX_SHIFT 0
#define V3D_HUB_INT_STS 0x00050
#define V3D_HUB_INT_SET 0x00054
#define V3D_HUB_INT_CLR 0x00058
#define V3D_HUB_INT_MSK_STS 0x0005c
#define V3D_HUB_INT_MSK_SET 0x00060
#define V3D_HUB_INT_MSK_CLR 0x00064
# define V3D_V7_HUB_INT_GMPV BIT(6)
# define V3D_HUB_INT_MMU_WRV BIT(5)
# define V3D_HUB_INT_MMU_PTI BIT(4)
# define V3D_HUB_INT_MMU_CAP BIT(3)
# define V3D_HUB_INT_MSO BIT(2)
# define V3D_HUB_INT_TFUC BIT(1)
# define V3D_HUB_INT_TFUF BIT(0)
/* GCA registers only exist in V3D < 41 */
#define V3D_GCA_CACHE_CTRL 0x0000c
# define V3D_GCA_CACHE_CTRL_FLUSH BIT(0)
#define V3D_GCA_SAFE_SHUTDOWN 0x000b0
# define V3D_GCA_SAFE_SHUTDOWN_EN BIT(0)
#define V3D_GCA_SAFE_SHUTDOWN_ACK 0x000b4
# define V3D_GCA_SAFE_SHUTDOWN_ACK_ACKED 3
# define V3D_TOP_GR_BRIDGE_REVISION 0x00000
# define V3D_TOP_GR_BRIDGE_MAJOR_MASK V3D_MASK(15, 8)
# define V3D_TOP_GR_BRIDGE_MAJOR_SHIFT 8
# define V3D_TOP_GR_BRIDGE_MINOR_MASK V3D_MASK(7, 0)
# define V3D_TOP_GR_BRIDGE_MINOR_SHIFT 0
Annotation
- Immediate include surface: `linux/bitops.h`.
- 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.