drm_dev_register(9) Register DRM device

SYNOPSIS

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

ARGUMENTS

dev

Device to register

flags

Flags passed to the driver's .load function

DESCRIPTION

Register the DRM device dev with the system, advertise device to user-space and start normal device operation. dev must be allocated via drm_dev_alloc previously. Right after drm_dev_register the driver should call drm_connector_register_all to register all connectors in sysfs. This is a separate call for backward compatibility with drivers still using the deprecated ->load callback, where connectors are registered from within the ->load callback.

Never call this twice on any device!

NOTE

To ensure backward compatibility with existing drivers method this function calls the ->load method after registering the device nodes, creating race conditions. Usage of the ->load methods is therefore deprecated, drivers must perform all initialization before calling drm_dev_register.

RETURNS

0 on success, negative error code on failure.

AUTHORS

Jesse Barnes <[email protected]>
Intel Corporation,         
        

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,         
        

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,         
        

Contributions all over the place

Lukas Wunner <[email protected]>

vga_switcheroo documentation

COPYRIGHT