drivers/gpu/drm/vkms/vkms_configfs.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/vkms/vkms_configfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/vkms/vkms_configfs.c- Extension
.c- Size
- 22305 bytes
- Lines
- 844
- 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.
- 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/cleanup.hlinux/configfs.hlinux/mutex.hlinux/slab.hvkms_drv.hvkms_config.hvkms_configfs.hvkms_connector.h
Detected Declarations
struct vkms_configfs_devicestruct vkms_configfs_planestruct vkms_configfs_crtcstruct vkms_configfs_encoderstruct vkms_configfs_connectorfunction crtc_writeback_showfunction crtc_writeback_storefunction scoped_guardfunction crtc_releasefunction scoped_guardfunction scoped_guardfunction plane_possible_crtcs_allow_linkfunction scoped_guardfunction plane_possible_crtcs_drop_linkfunction plane_type_showfunction plane_type_storefunction scoped_guardfunction plane_releasefunction scoped_guardfunction scoped_guardfunction encoder_possible_crtcs_allow_linkfunction scoped_guardfunction encoder_possible_crtcs_drop_linkfunction encoder_releasefunction scoped_guardfunction scoped_guardfunction connector_status_showfunction connector_status_storefunction scoped_guardfunction connector_releasefunction scoped_guardfunction connector_possible_encoders_allow_linkfunction scoped_guardfunction connector_possible_encoders_drop_linkfunction scoped_guardfunction scoped_guardfunction device_enabled_showfunction device_enabled_storefunction scoped_guardfunction device_releasefunction vkms_configfs_registerfunction vkms_configfs_unregister
Annotated Snippet
struct vkms_configfs_device {
struct config_group group;
struct config_group planes_group;
struct config_group crtcs_group;
struct config_group encoders_group;
struct config_group connectors_group;
struct mutex lock;
struct vkms_config *config;
bool enabled;
};
/**
* struct vkms_configfs_plane - Configfs representation of a plane
*
* @group: Top level configuration group that represents a plane.
* Initialized when a new directory is created under "/config/vkms/planes"
* @possible_crtcs_group: Default subgroup of @group at "plane/possible_crtcs"
* @dev: The vkms_configfs_device this plane belongs to
* @config: Configuration of the VKMS plane
*/
struct vkms_configfs_plane {
struct config_group group;
struct config_group possible_crtcs_group;
struct vkms_configfs_device *dev;
struct vkms_config_plane *config;
};
/**
* struct vkms_configfs_crtc - Configfs representation of a CRTC
*
* @group: Top level configuration group that represents a CRTC.
* Initialized when a new directory is created under "/config/vkms/crtcs"
* @dev: The vkms_configfs_device this CRTC belongs to
* @config: Configuration of the VKMS CRTC
*/
struct vkms_configfs_crtc {
struct config_group group;
struct vkms_configfs_device *dev;
struct vkms_config_crtc *config;
};
/**
* struct vkms_configfs_encoder - Configfs representation of a encoder
*
* @group: Top level configuration group that represents a encoder.
* Initialized when a new directory is created under "/config/vkms/encoders"
* @possible_crtcs_group: Default subgroup of @group at "encoder/possible_crtcs"
* @dev: The vkms_configfs_device this encoder belongs to
* @config: Configuration of the VKMS encoder
*/
struct vkms_configfs_encoder {
struct config_group group;
struct config_group possible_crtcs_group;
struct vkms_configfs_device *dev;
struct vkms_config_encoder *config;
};
/**
* struct vkms_configfs_connector - Configfs representation of a connector
*
* @group: Top level configuration group that represents a connector.
* Initialized when a new directory is created under "/config/vkms/connectors"
* @possible_encoders_group: Default subgroup of @group at
* "connector/possible_encoders"
* @dev: The vkms_configfs_device this connector belongs to
* @config: Configuration of the VKMS connector
*/
struct vkms_configfs_connector {
struct config_group group;
struct config_group possible_encoders_group;
struct vkms_configfs_device *dev;
struct vkms_config_connector *config;
};
#define device_item_to_vkms_configfs_device(item) \
container_of(to_config_group((item)), struct vkms_configfs_device, \
group)
#define child_group_to_vkms_configfs_device(group) \
device_item_to_vkms_configfs_device((&(group)->cg_item)->ci_parent)
#define plane_item_to_vkms_configfs_plane(item) \
container_of(to_config_group((item)), struct vkms_configfs_plane, group)
#define plane_possible_crtcs_item_to_vkms_configfs_plane(item) \
container_of(to_config_group((item)), struct vkms_configfs_plane, \
possible_crtcs_group)
#define crtc_item_to_vkms_configfs_crtc(item) \
Annotation
- Immediate include surface: `linux/cleanup.h`, `linux/configfs.h`, `linux/mutex.h`, `linux/slab.h`, `vkms_drv.h`, `vkms_config.h`, `vkms_configfs.h`, `vkms_connector.h`.
- Detected declarations: `struct vkms_configfs_device`, `struct vkms_configfs_plane`, `struct vkms_configfs_crtc`, `struct vkms_configfs_encoder`, `struct vkms_configfs_connector`, `function crtc_writeback_show`, `function crtc_writeback_store`, `function scoped_guard`, `function crtc_release`, `function scoped_guard`.
- 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.