XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Enumerations | Functions
drm_drv.h File Reference
#include <linux/list.h>
#include <linux/irqreturn.h>
#include <linux/capability.h>
#include <video/nomodeset.h>
#include <drm/drm_device.h>
Include dependency graph for drm_drv.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  drm_driver
 

Macros

#define devm_drm_dev_alloc(parent, driver, type, member)
 

Enumerations

enum  drm_driver_feature {
  DRIVER_GEM = BIT(0) , DRIVER_MODESET = BIT(1) , DRIVER_RENDER = BIT(3) , DRIVER_ATOMIC = BIT(4) ,
  DRIVER_SYNCOBJ = BIT(5) , DRIVER_SYNCOBJ_TIMELINE = BIT(6) , DRIVER_COMPUTE_ACCEL = BIT(7) , DRIVER_GEM_GPUVA = BIT(8) ,
  DRIVER_CURSOR_HOTSPOT = BIT(9) , DRIVER_USE_AGP = BIT(25) , DRIVER_LEGACY = BIT(26) , DRIVER_PCI_DMA = BIT(27) ,
  DRIVER_SG = BIT(28) , DRIVER_HAVE_DMA = BIT(29) , DRIVER_HAVE_IRQ = BIT(30)
}
 

Functions

void * __devm_drm_dev_alloc (struct device *parent, const struct drm_driver *driver, size_t size, size_t offset)
 
struct dmem_cgroup_region * drmm_cgroup_register_region (struct drm_device *dev, const char *region_name, u64 size)
 
struct drm_device * drm_dev_alloc (const struct drm_driver *driver, struct device *parent)
 
void * __drm_dev_alloc (struct device *parent, const struct drm_driver *driver, size_t size, size_t offset)
 
int drm_dev_register (struct drm_device *dev, unsigned long flags)
 
void drm_dev_unregister (struct drm_device *dev)
 
void drm_dev_get (struct drm_device *dev)
 
void drm_dev_put (struct drm_device *dev)
 
void drm_put_dev (struct drm_device *dev)
 
bool drm_dev_enter (struct drm_device *dev, int *idx)
 
void drm_dev_exit (int idx)
 
void drm_dev_unplug (struct drm_device *dev)
 
int drm_dev_wedged_event (struct drm_device *dev, unsigned long method, struct drm_wedge_task_info *info)
 

Macro Definition Documentation

◆ devm_drm_dev_alloc

#define devm_drm_dev_alloc (   parent,
  driver,
  type,
  member 
)
Value:
((type *) __devm_drm_dev_alloc(parent, driver, sizeof(type), \
offsetof(type, member)))
void * __devm_drm_dev_alloc(struct device *parent, const struct drm_driver *driver, size_t size, size_t offset)
struct kobject * parent
Definition kobject.h:91

devm_drm_dev_alloc - Resource managed allocation of a &drm_device instance @parent: Parent device object @driver: DRM driver @type: the type of the struct which contains struct &drm_device @member: the name of the &drm_device within @type.

This allocates and initialize a new DRM device. No device registration is done. Call drm_dev_register() to advertice the device to user space and register it with other core subsystems. This should be done last in the device initialization sequence to make sure userspace can't access an inconsistent state.

The initial ref-count of the object is 1. Use drm_dev_get() and drm_dev_put() to take and drop further ref-counts.

It is recommended that drivers embed &struct drm_device into their own device structure.

Note that this manages the lifetime of the resulting &drm_device automatically using devres. The DRM device initialized with this function is automatically put on driver detach using drm_dev_put().

RETURNS: Pointer to new DRM device, or ERR_PTR on failure.

Enumeration Type Documentation

◆ drm_driver_feature

enum drm_driver_feature - feature flags

See &drm_driver.driver_features, drm_device.driver_features and drm_core_check_feature().

Enumerator
DRIVER_GEM 

@DRIVER_GEM:

Driver use the GEM memory manager. This should be set for all modern drivers.

DRIVER_MODESET 

@DRIVER_MODESET:

Driver supports mode setting interfaces (KMS).

DRIVER_RENDER 

@DRIVER_RENDER:

Driver supports dedicated render nodes. See also the :ref:section on render nodes <drm_render_node> for details.

DRIVER_ATOMIC 

@DRIVER_ATOMIC:

Driver supports the full atomic modesetting userspace API. Drivers which only use atomic internally, but do not support the full userspace API (e.g. not all properties converted to atomic, or multi-plane updates are not guaranteed to be tear-free) should not set this flag.

DRIVER_SYNCOBJ 

@DRIVER_SYNCOBJ:

Driver supports &drm_syncobj for explicit synchronization of command submission.

DRIVER_SYNCOBJ_TIMELINE 

@DRIVER_SYNCOBJ_TIMELINE:

Driver supports the timeline flavor of &drm_syncobj for explicit synchronization of command submission.

DRIVER_COMPUTE_ACCEL 

@DRIVER_COMPUTE_ACCEL:

Driver supports compute acceleration devices. This flag is mutually exclusive with @DRIVER_RENDER and @DRIVER_MODESET. Devices that support both graphics and compute acceleration should be handled by two drivers that are connected using auxiliary bus.

DRIVER_GEM_GPUVA 

@DRIVER_GEM_GPUVA:

Driver supports user defined GPU VA bindings for GEM objects.

DRIVER_CURSOR_HOTSPOT 

@DRIVER_CURSOR_HOTSPOT:

Driver supports and requires cursor hotspot information in the cursor plane (e.g. cursor plane has to actually track the mouse cursor and the clients are required to set hotspot in order for the cursor planes to work correctly).

DRIVER_USE_AGP 

@DRIVER_USE_AGP:

Set up DRM AGP support, see drm_agp_init(), the DRM core will manage AGP resources. New drivers don't need this.

DRIVER_LEGACY 

@DRIVER_LEGACY:

Denote a legacy driver using shadow attach. Do not use.

DRIVER_PCI_DMA 

@DRIVER_PCI_DMA:

Driver is capable of PCI DMA, mapping of PCI DMA buffers to userspace will be enabled. Only for legacy drivers. Do not use.

DRIVER_SG 

@DRIVER_SG:

Driver can perform scatter/gather DMA, allocation and mapping of scatter/gather buffers will be enabled. Only for legacy drivers. Do not use.

DRIVER_HAVE_DMA 

@DRIVER_HAVE_DMA:

Driver supports DMA, the userspace DMA API will be supported. Only for legacy drivers. Do not use.

DRIVER_HAVE_IRQ 

@DRIVER_HAVE_IRQ:

Legacy irq support. Only for legacy drivers. Do not use.

Function Documentation

◆ __devm_drm_dev_alloc()

void * __devm_drm_dev_alloc ( struct device *  parent,
const struct drm_driver *  driver,
size_t  size,
size_t  offset 
)

◆ __drm_dev_alloc()

void * __drm_dev_alloc ( struct device *  parent,
const struct drm_driver *  driver,
size_t  size,
size_t  offset 
)

◆ drm_dev_alloc()

struct drm_device * drm_dev_alloc ( const struct drm_driver *  driver,
struct device *  parent 
)

◆ drm_dev_enter()

bool drm_dev_enter ( struct drm_device *  dev,
int *  idx 
)

◆ drm_dev_exit()

void drm_dev_exit ( int  idx)

◆ drm_dev_get()

void drm_dev_get ( struct drm_device *  dev)

◆ drm_dev_put()

void drm_dev_put ( struct drm_device *  dev)

◆ drm_dev_register()

int drm_dev_register ( struct drm_device *  dev,
unsigned long  flags 
)

◆ drm_dev_unplug()

void drm_dev_unplug ( struct drm_device *  dev)

◆ drm_dev_unregister()

void drm_dev_unregister ( struct drm_device *  dev)

◆ drm_dev_wedged_event()

int drm_dev_wedged_event ( struct drm_device *  dev,
unsigned long  method,
struct drm_wedge_task_info *  info 
)

◆ drm_put_dev()

void drm_put_dev ( struct drm_device *  dev)

◆ drmm_cgroup_register_region()

struct dmem_cgroup_region * drmm_cgroup_register_region ( struct drm_device *  dev,
const char *  region_name,
u64  size 
)