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.

Dependency Surface

Detected Declarations

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

Implementation Notes