|
XenevaOS
|
#include <drm_device.h>

struct drm_device - DRM device structure
This structure represent a complete card that may contain multiple heads.
| struct drm_minor* drm_device::accel |
@accel: Compute Acceleration node
| struct inode* drm_device::anon_inode |
@anon_inode: inode for private address-space
| struct list_head drm_device::client_sysrq_list |
@client_sysrq_list:
Entry into list of devices registered for sysrq. Allows in-kernel clients on this device to handle sysrq keys.
| struct list_head drm_device::clientlist |
@clientlist:
List of in-kernel clients. Protected by &clientlist_mutex.
| struct mutex drm_device::clientlist_mutex |
@clientlist_mutex:
Protects &clientlist access.
| struct dentry* drm_device::debugfs_root |
@debugfs_root:
Root directory for debugfs files.
| struct device* drm_device::dev |
@dev: Device structure of bus-device
| void* drm_device::dev_private |
@dev_private:
DRM driver private data. This is deprecated and should be left set to NULL.
Instead of using this pointer it is recommended that drivers use devm_drm_dev_alloc() and embed struct &drm_device in their larger per-device structure.
| struct device* drm_device::dma_dev |
@dma_dev:
Device for DMA operations. Only required if the device @dev cannot perform DMA by itself. Should be NULL otherwise. Call drm_dev_dma_dev() to get the DMA device instead of using this field directly. Call drm_dev_set_dma_dev() to set this field.
DRM devices are sometimes bound to virtual devices that cannot perform DMA by themselves. Drivers should set this field to the respective DMA controller.
Devices on USB and other peripheral busses also cannot perform DMA by themselves. The @dma_dev field should point the bus controller that does DMA on behalve of such a device. Required for importing buffers via dma-buf.
If set, the DRM core automatically releases the reference on the device.
| const struct drm_driver* drm_device::driver |
@driver: DRM driver managing the device
| u32 drm_device::driver_features |
@driver_features: per-device driver features
Drivers can clear specific flags here to disallow certain features on a per-device basis while still sharing a single &struct drm_driver instance across all devices.
| spinlock_t drm_device::event_lock |
@event_lock:
Protects @vblank_event_list and event delivery in general. See drm_send_event() and drm_send_event_locked().
| struct drm_fb_helper* drm_device::fb_helper |
@fb_helper:
Pointer to the fbdev emulation structure. Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
| struct list_head drm_device::filelist |
@filelist:
List of userspace clients, linked through &drm_file.lhead.
| struct list_head drm_device::filelist_internal |
@filelist_internal:
List of open DRM files for in-kernel clients. Protected by &filelist_mutex.
| struct mutex drm_device::filelist_mutex |
@filelist_mutex: Protects @filelist.
| void* drm_device::final_kfree |
@managed.final_kfree: pointer for final kfree() call
| struct mutex drm_device::gem_lru_mutex |
@gem_lru_mutex:
Lock protecting movement of GEM objects between LRUs.
| int drm_device::if_version |
@if_version: Highest interface version set
| spinlock_t drm_device::lock |
@managed.lock: protects @managed.resources
| struct { ... } drm_device::managed |
@managed:
Managed resources linked to the lifetime of this &drm_device as tracked by
| struct drm_master* drm_device::master |
@master:
Currently active master for this device. Protected by &master_mutex
| struct mutex drm_device::master_mutex |
@master_mutex:
Lock for &drm_minor.master and &drm_file.is_master
| u32 drm_device::max_vblank_count |
@max_vblank_count:
Maximum value of the vblank registers. This value +1 will result in a wrap-around of the vblank register. It is used by the vblank core to handle wrap-arounds.
If set to zero the vblank core will try to guess the elapsed vblanks between times when the vblank interrupt is disabled through high-precision timestamps. That approach is suffering from small races and imprecision over longer time periods, hence exposing a hardware vblank counter is always recommended.
This is the statically configured device wide maximum. The driver can instead choose to use a runtime configurable per-crtc value &drm_vblank_crtc.max_vblank_count, in which case @max_vblank_count must be left at zero. See drm_crtc_set_max_vblank_count() on how to use the per-crtc value.
If non-zero, &drm_crtc_funcs.get_vblank_counter must be set.
| struct drm_mode_config drm_device::mode_config |
@mode_config: Current mode config
| unsigned int drm_device::num_crtcs |
@num_crtcs: Number of CRTCs on this device
| struct idr drm_device::object_name_idr |
@object_name_idr: GEM information
| struct mutex drm_device::object_name_lock |
@object_name_lock: GEM information
| atomic_t drm_device::open_count |
@open_count:
Usage counter for outstanding files open, protected by drm_global_mutex
| struct drm_minor* drm_device::primary |
@primary:
Primary node. Drivers should not interact with this directly. debugfs interfaces can be registered with drm_debugfs_add_file(), and sysfs should be directly added on the hardware (and not character device node) struct device @dev.
| struct kref drm_device::ref |
Object ref-count
| bool drm_device::registered |
@registered:
Internally used by drm_dev_register() and drm_connector_register().
| struct drm_minor* drm_device::render |
@render:
Render node. Drivers should not interact with this directly ever. Drivers should not expose any additional interfaces in debugfs or sysfs on this node.
| struct list_head drm_device::resources |
@managed.resources: managed resources list
| enum switch_power_state drm_device::switch_power_state |
@switch_power_state:
Power state of the client. Used by drivers supporting the switcheroo driver. The state is maintained in the &vga_switcheroo_client_ops.set_gpu_state callback
| char* drm_device::unique |
@unique: Unique name of the device
| bool drm_device::unplugged |
@unplugged:
Flag to tell if the device has been unplugged. See drm_dev_enter() and drm_dev_is_unplugged().
| spinlock_t drm_device::vbl_lock |
@vbl_lock: Top-level vblank references lock, wraps the low-level @vblank_time_lock.
| struct drm_vblank_crtc* drm_device::vblank |
@vblank:
Array of vblank tracking structures, one per &struct drm_crtc. For historical reasons (vblank support predates kernel modesetting) this is free-standing and not part of &struct drm_crtc itself. It must be initialized explicitly by calling drm_vblank_init().
| bool drm_device::vblank_disable_immediate |
@vblank_disable_immediate:
If true, vblank interrupt will be disabled immediately when the refcount drops to zero, as opposed to via the vblank disable timer.
This can be set to true it the hardware has a working vblank counter with high-precision timestamping (otherwise there are races) and the driver uses drm_crtc_vblank_on() and drm_crtc_vblank_off() appropriately. Also, see @max_vblank_count, &drm_crtc_funcs.get_vblank_counter and &drm_vblank_crtc_config.disable_immediate.
| struct list_head drm_device::vblank_event_list |
@vblank_event_list: List of vblank events
| spinlock_t drm_device::vblank_time_lock |
@vblank_time_lock:
Protects vblank count and time updates during vblank enable/disable
| struct drm_vma_offset_manager* drm_device::vma_offset_manager |
@vma_offset_manager: GEM information
| struct drm_vram_mm* drm_device::vram_mm |
@vram_mm: VRAM MM memory manager