diff options
Diffstat (limited to 'drivers/gpu/drm/drm_drv.c')
-rw-r--r-- | drivers/gpu/drm/drm_drv.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index a5fe91b8c3c9..381581b01d48 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c | |||
@@ -264,14 +264,13 @@ void drm_minor_release(struct drm_minor *minor) | |||
264 | * DOC: driver instance overview | 264 | * DOC: driver instance overview |
265 | * | 265 | * |
266 | * A device instance for a drm driver is represented by &struct drm_device. This | 266 | * A device instance for a drm driver is represented by &struct drm_device. This |
267 | * is allocated with drm_dev_alloc(), usually from bus-specific ->probe() | 267 | * is initialized with drm_dev_init(), usually from bus-specific ->probe() |
268 | * callbacks implemented by the driver. The driver then needs to initialize all | 268 | * callbacks implemented by the driver. The driver then needs to initialize all |
269 | * the various subsystems for the drm device like memory management, vblank | 269 | * the various subsystems for the drm device like memory management, vblank |
270 | * handling, modesetting support and intial output configuration plus obviously | 270 | * handling, modesetting support and intial output configuration plus obviously |
271 | * initialize all the corresponding hardware bits. An important part of this is | 271 | * initialize all the corresponding hardware bits. Finally when everything is up |
272 | * also calling drm_dev_set_unique() to set the userspace-visible unique name of | 272 | * and running and ready for userspace the device instance can be published |
273 | * this device instance. Finally when everything is up and running and ready for | 273 | * using drm_dev_register(). |
274 | * userspace the device instance can be published using drm_dev_register(). | ||
275 | * | 274 | * |
276 | * There is also deprecated support for initalizing device instances using | 275 | * There is also deprecated support for initalizing device instances using |
277 | * bus-specific helpers and the &drm_driver.load callback. But due to | 276 | * bus-specific helpers and the &drm_driver.load callback. But due to |
@@ -287,9 +286,6 @@ void drm_minor_release(struct drm_minor *minor) | |||
287 | * Note that the lifetime rules for &drm_device instance has still a lot of | 286 | * Note that the lifetime rules for &drm_device instance has still a lot of |
288 | * historical baggage. Hence use the reference counting provided by | 287 | * historical baggage. Hence use the reference counting provided by |
289 | * drm_dev_get() and drm_dev_put() only carefully. | 288 | * drm_dev_get() and drm_dev_put() only carefully. |
290 | * | ||
291 | * It is recommended that drivers embed &struct drm_device into their own device | ||
292 | * structure, which is supported through drm_dev_init(). | ||
293 | */ | 289 | */ |
294 | 290 | ||
295 | /** | 291 | /** |
@@ -475,6 +471,9 @@ static void drm_fs_inode_free(struct inode *inode) | |||
475 | * The initial ref-count of the object is 1. Use drm_dev_get() and | 471 | * The initial ref-count of the object is 1. Use drm_dev_get() and |
476 | * drm_dev_put() to take and drop further ref-counts. | 472 | * drm_dev_put() to take and drop further ref-counts. |
477 | * | 473 | * |
474 | * It is recommended that drivers embed &struct drm_device into their own device | ||
475 | * structure. | ||
476 | * | ||
478 | * Drivers that do not want to allocate their own device struct | 477 | * Drivers that do not want to allocate their own device struct |
479 | * embedding &struct drm_device can call drm_dev_alloc() instead. For drivers | 478 | * embedding &struct drm_device can call drm_dev_alloc() instead. For drivers |
480 | * that do embed &struct drm_device it must be placed first in the overall | 479 | * that do embed &struct drm_device it must be placed first in the overall |
@@ -765,7 +764,7 @@ static void remove_compat_control_link(struct drm_device *dev) | |||
765 | * @flags: Flags passed to the driver's .load() function | 764 | * @flags: Flags passed to the driver's .load() function |
766 | * | 765 | * |
767 | * Register the DRM device @dev with the system, advertise device to user-space | 766 | * Register the DRM device @dev with the system, advertise device to user-space |
768 | * and start normal device operation. @dev must be allocated via drm_dev_alloc() | 767 | * and start normal device operation. @dev must be initialized via drm_dev_init() |
769 | * previously. | 768 | * previously. |
770 | * | 769 | * |
771 | * Never call this twice on any device! | 770 | * Never call this twice on any device! |
@@ -877,9 +876,9 @@ EXPORT_SYMBOL(drm_dev_unregister); | |||
877 | * @dev: device of which to set the unique name | 876 | * @dev: device of which to set the unique name |
878 | * @name: unique name | 877 | * @name: unique name |
879 | * | 878 | * |
880 | * Sets the unique name of a DRM device using the specified string. Drivers | 879 | * Sets the unique name of a DRM device using the specified string. This is |
881 | * can use this at driver probe time if the unique name of the devices they | 880 | * already done by drm_dev_init(), drivers should only override the default |
882 | * drive is static. | 881 | * unique name for backwards compatibility reasons. |
883 | * | 882 | * |
884 | * Return: 0 on success or a negative error code on failure. | 883 | * Return: 0 on success or a negative error code on failure. |
885 | */ | 884 | */ |