XenevaOS
Loading...
Searching...
No Matches
Public Attributes | List of all members
drm_device Struct Reference

#include <drm_device.h>

Collaboration diagram for drm_device:
Collaboration graph
[legend]

Public Attributes

int if_version
 
struct kref ref
 
struct device * dev
 
struct device * dma_dev
 
struct { 
 
   struct list_head   resources 
 
   void *   final_kfree 
 
   spinlock_t   lock 
 
} managed 
 
const struct drm_driver * driver
 
void * dev_private
 
struct drm_minor * primary
 
struct drm_minor * render
 
struct drm_minor * accel
 
bool registered
 
struct drm_master * master
 
u32 driver_features
 
bool unplugged
 
struct inode * anon_inode
 
char * unique
 
struct mutex master_mutex
 
atomic_t open_count
 
struct mutex filelist_mutex
 
struct list_head filelist
 
struct list_head filelist_internal
 
struct mutex clientlist_mutex
 
struct list_head clientlist
 
struct list_head client_sysrq_list
 
bool vblank_disable_immediate
 
struct drm_vblank_crtc * vblank
 
spinlock_t vblank_time_lock
 
spinlock_t vbl_lock
 
u32 max_vblank_count
 
struct list_head vblank_event_list
 
spinlock_t event_lock
 
unsigned int num_crtcs
 
struct drm_mode_config mode_config
 
struct mutex object_name_lock
 
struct idr object_name_idr
 
struct drm_vma_offset_manager * vma_offset_manager
 
struct drm_vram_mm * vram_mm
 
enum switch_power_state switch_power_state
 
struct drm_fb_helper * fb_helper
 
struct dentry * debugfs_root
 
struct mutex gem_lru_mutex
 

Detailed Description

struct drm_device - DRM device structure

This structure represent a complete card that may contain multiple heads.

Member Data Documentation

◆ accel

struct drm_minor* drm_device::accel

@accel: Compute Acceleration node

◆ anon_inode

struct inode* drm_device::anon_inode

@anon_inode: inode for private address-space

◆ client_sysrq_list

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.

◆ clientlist

struct list_head drm_device::clientlist

@clientlist:

List of in-kernel clients. Protected by &clientlist_mutex.

◆ clientlist_mutex

struct mutex drm_device::clientlist_mutex

@clientlist_mutex:

Protects &clientlist access.

◆ debugfs_root

struct dentry* drm_device::debugfs_root

@debugfs_root:

Root directory for debugfs files.

◆ dev

struct device* drm_device::dev

@dev: Device structure of bus-device

◆ dev_private

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.

◆ dma_dev

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.

◆ driver

const struct drm_driver* drm_device::driver

@driver: DRM driver managing the device

◆ driver_features

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.

◆ event_lock

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().

◆ fb_helper

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().

◆ filelist

struct list_head drm_device::filelist

@filelist:

List of userspace clients, linked through &drm_file.lhead.

◆ filelist_internal

struct list_head drm_device::filelist_internal

@filelist_internal:

List of open DRM files for in-kernel clients. Protected by &filelist_mutex.

◆ filelist_mutex

struct mutex drm_device::filelist_mutex

@filelist_mutex: Protects @filelist.

◆ final_kfree

void* drm_device::final_kfree

@managed.final_kfree: pointer for final kfree() call

◆ gem_lru_mutex

struct mutex drm_device::gem_lru_mutex

@gem_lru_mutex:

Lock protecting movement of GEM objects between LRUs.

◆ if_version

int drm_device::if_version

@if_version: Highest interface version set

◆ lock

spinlock_t drm_device::lock

@managed.lock: protects @managed.resources

◆ [struct]

struct { ... } drm_device::managed

@managed:

Managed resources linked to the lifetime of this &drm_device as tracked by

◆ master

struct drm_master* drm_device::master

@master:

Currently active master for this device. Protected by &master_mutex

◆ master_mutex

struct mutex drm_device::master_mutex

@master_mutex:

Lock for &drm_minor.master and &drm_file.is_master

◆ max_vblank_count

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.

◆ mode_config

struct drm_mode_config drm_device::mode_config

@mode_config: Current mode config

◆ num_crtcs

unsigned int drm_device::num_crtcs

@num_crtcs: Number of CRTCs on this device

◆ object_name_idr

struct idr drm_device::object_name_idr

@object_name_idr: GEM information

◆ object_name_lock

struct mutex drm_device::object_name_lock

@object_name_lock: GEM information

◆ open_count

atomic_t drm_device::open_count

@open_count:

Usage counter for outstanding files open, protected by drm_global_mutex

◆ primary

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.

◆ ref

struct kref drm_device::ref

Object ref-count

◆ registered

bool drm_device::registered

@registered:

Internally used by drm_dev_register() and drm_connector_register().

◆ render

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.

◆ resources

struct list_head drm_device::resources

@managed.resources: managed resources list

◆ switch_power_state

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

◆ unique

char* drm_device::unique

@unique: Unique name of the device

◆ unplugged

bool drm_device::unplugged

@unplugged:

Flag to tell if the device has been unplugged. See drm_dev_enter() and drm_dev_is_unplugged().

◆ vbl_lock

spinlock_t drm_device::vbl_lock

@vbl_lock: Top-level vblank references lock, wraps the low-level @vblank_time_lock.

◆ vblank

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().

◆ vblank_disable_immediate

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.

◆ vblank_event_list

struct list_head drm_device::vblank_event_list

@vblank_event_list: List of vblank events

◆ vblank_time_lock

spinlock_t drm_device::vblank_time_lock

@vblank_time_lock:

Protects vblank count and time updates during vblank enable/disable

◆ vma_offset_manager

struct drm_vma_offset_manager* drm_device::vma_offset_manager

@vma_offset_manager: GEM information

◆ vram_mm

struct drm_vram_mm* drm_device::vram_mm

@vram_mm: VRAM MM memory manager


The documentation for this struct was generated from the following file: