diff options
author | Michael Witten <mfwitten@gmail.com> | 2011-08-25 13:18:08 -0400 |
---|---|---|
committer | Michael Witten <mfwitten@gmail.com> | 2011-08-25 13:18:08 -0400 |
commit | a78f6787a3dd7223bf185895fdcea661b408dc0a (patch) | |
tree | 6d75f9788541e0a18b148158f6af23d30182d0d5 /Documentation/DocBook/drm.tmpl | |
parent | caca9510ff4e5d842c0589110243d60927836222 (diff) |
DocBook/drm: Eradicate inappropriate uses of the future tense
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Diffstat (limited to 'Documentation/DocBook/drm.tmpl')
-rw-r--r-- | Documentation/DocBook/drm.tmpl | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index c2791589397..0527ff2be37 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
@@ -57,10 +57,10 @@ | |||
57 | existing drivers. | 57 | existing drivers. |
58 | </para> | 58 | </para> |
59 | <para> | 59 | <para> |
60 | First, we'll go over some typical driver initialization | 60 | First, we go over some typical driver initialization |
61 | requirements, like setting up command buffers, creating an | 61 | requirements, like setting up command buffers, creating an |
62 | initial output configuration, and initializing core services. | 62 | initial output configuration, and initializing core services. |
63 | Subsequent sections will cover core internals in more detail, | 63 | Subsequent sections cover core internals in more detail, |
64 | providing implementation notes and examples. | 64 | providing implementation notes and examples. |
65 | </para> | 65 | </para> |
66 | <para> | 66 | <para> |
@@ -74,7 +74,7 @@ | |||
74 | </para> | 74 | </para> |
75 | <para> | 75 | <para> |
76 | The core of every DRM driver is struct drm_driver. Drivers | 76 | The core of every DRM driver is struct drm_driver. Drivers |
77 | will typically statically initialize a drm_driver structure, | 77 | typically statically initialize a drm_driver structure, |
78 | then pass it to drm_init() at load time. | 78 | then pass it to drm_init() at load time. |
79 | </para> | 79 | </para> |
80 | 80 | ||
@@ -155,7 +155,7 @@ | |||
155 | <para> | 155 | <para> |
156 | In the example above, taken from the i915 DRM driver, the driver | 156 | In the example above, taken from the i915 DRM driver, the driver |
157 | sets several flags indicating what core features it supports. | 157 | sets several flags indicating what core features it supports. |
158 | We'll go over the individual callbacks in later sections. Since | 158 | We go over the individual callbacks in later sections. Since |
159 | flags indicate which features your driver supports to the DRM | 159 | flags indicate which features your driver supports to the DRM |
160 | core, you need to set most of them prior to calling drm_init(). Some, | 160 | core, you need to set most of them prior to calling drm_init(). Some, |
161 | like DRIVER_MODESET can be set later based on user supplied parameters, | 161 | like DRIVER_MODESET can be set later based on user supplied parameters, |
@@ -238,7 +238,7 @@ | |||
238 | </variablelist> | 238 | </variablelist> |
239 | <para> | 239 | <para> |
240 | In this specific case, the driver requires AGP and supports | 240 | In this specific case, the driver requires AGP and supports |
241 | IRQs. DMA, as we'll see, is handled by device specific ioctls | 241 | IRQs. DMA, as discussed later, is handled by device specific ioctls |
242 | in this case. It also supports the kernel mode setting APIs, though | 242 | in this case. It also supports the kernel mode setting APIs, though |
243 | unlike in the actual i915 driver source, this example unconditionally | 243 | unlike in the actual i915 driver source, this example unconditionally |
244 | exports KMS capability. | 244 | exports KMS capability. |
@@ -315,7 +315,7 @@ | |||
315 | <sect2> | 315 | <sect2> |
316 | <title>Configuring the device</title> | 316 | <title>Configuring the device</title> |
317 | <para> | 317 | <para> |
318 | Obviously, device configuration will be device specific. | 318 | Obviously, device configuration is device specific. |
319 | However, there are several common operations: finding a | 319 | However, there are several common operations: finding a |
320 | device's PCI resources, mapping them, and potentially setting | 320 | device's PCI resources, mapping them, and potentially setting |
321 | up an IRQ handler. | 321 | up an IRQ handler. |
@@ -326,7 +326,7 @@ | |||
326 | drm_get_resource_len() can be used to find BARs on the given | 326 | drm_get_resource_len() can be used to find BARs on the given |
327 | drm_device struct. Once those values have been retrieved, the | 327 | drm_device struct. Once those values have been retrieved, the |
328 | driver load function can call drm_addmap() to create a new | 328 | driver load function can call drm_addmap() to create a new |
329 | mapping for the BAR in question. Note you'll probably want a | 329 | mapping for the BAR in question. Note you probably want a |
330 | drm_local_map_t in your driver private structure to track any | 330 | drm_local_map_t in your driver private structure to track any |
331 | mappings you create. | 331 | mappings you create. |
332 | <!-- !Fdrivers/gpu/drm/drm_bufs.c drm_get_resource_* --> | 332 | <!-- !Fdrivers/gpu/drm/drm_bufs.c drm_get_resource_* --> |
@@ -357,7 +357,7 @@ | |||
357 | </para> | 357 | </para> |
358 | <!--!Fdrivers/char/drm/drm_irq.c drm_irq_install--> | 358 | <!--!Fdrivers/char/drm/drm_irq.c drm_irq_install--> |
359 | <para> | 359 | <para> |
360 | Once your interrupt handler is registered (it'll use your | 360 | Once your interrupt handler is registered (it uses your |
361 | drm_driver.irq_handler as the actual interrupt handling | 361 | drm_driver.irq_handler as the actual interrupt handling |
362 | function), you can safely enable interrupts on your device, | 362 | function), you can safely enable interrupts on your device, |
363 | assuming any other state your interrupt handler uses is also | 363 | assuming any other state your interrupt handler uses is also |
@@ -389,7 +389,7 @@ | |||
389 | should support a memory manager. | 389 | should support a memory manager. |
390 | </para> | 390 | </para> |
391 | <para> | 391 | <para> |
392 | If your driver supports memory management (it should!), you'll | 392 | If your driver supports memory management (it should!), you |
393 | need to set that up at load time as well. How you initialize | 393 | need to set that up at load time as well. How you initialize |
394 | it depends on which memory manager you're using, TTM or GEM. | 394 | it depends on which memory manager you're using, TTM or GEM. |
395 | </para> | 395 | </para> |
@@ -430,13 +430,13 @@ | |||
430 | have a type of TTM_GLOBAL_TTM_MEM. The size field for the global | 430 | have a type of TTM_GLOBAL_TTM_MEM. The size field for the global |
431 | object should be sizeof(struct ttm_mem_global), and the init and | 431 | object should be sizeof(struct ttm_mem_global), and the init and |
432 | release hooks should point at your driver specific init and | 432 | release hooks should point at your driver specific init and |
433 | release routines, which will probably eventually call | 433 | release routines, which probably eventually call |
434 | ttm_mem_global_init and ttm_mem_global_release respectively. | 434 | ttm_mem_global_init and ttm_mem_global_release respectively. |
435 | </para> | 435 | </para> |
436 | <para> | 436 | <para> |
437 | Once your global TTM accounting structure is set up and initialized | 437 | Once your global TTM accounting structure is set up and initialized |
438 | (done by calling ttm_global_item_ref on the global object you | 438 | (done by calling ttm_global_item_ref on the global object you |
439 | just created), you'll need to create a buffer object TTM to | 439 | just created), you need to create a buffer object TTM to |
440 | provide a pool for buffer object allocation by clients and the | 440 | provide a pool for buffer object allocation by clients and the |
441 | kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, | 441 | kernel itself. The type of this object should be TTM_GLOBAL_TTM_BO, |
442 | and its size should be sizeof(struct ttm_bo_global). Again, | 442 | and its size should be sizeof(struct ttm_bo_global). Again, |
@@ -455,8 +455,8 @@ | |||
455 | than TTM, but has no VRAM management capability. Core GEM | 455 | than TTM, but has no VRAM management capability. Core GEM |
456 | initialization is comprised of a basic drm_mm_init call to create | 456 | initialization is comprised of a basic drm_mm_init call to create |
457 | a GTT DRM MM object, which provides an address space pool for | 457 | a GTT DRM MM object, which provides an address space pool for |
458 | object allocation. In a KMS configuration, the driver will | 458 | object allocation. In a KMS configuration, the driver |
459 | need to allocate and initialize a command ring buffer following | 459 | needs to allocate and initialize a command ring buffer following |
460 | basic GEM initialization. Most UMA devices have a so-called | 460 | basic GEM initialization. Most UMA devices have a so-called |
461 | "stolen" memory region, which provides space for the initial | 461 | "stolen" memory region, which provides space for the initial |
462 | framebuffer and large, contiguous memory regions required by the | 462 | framebuffer and large, contiguous memory regions required by the |
@@ -464,16 +464,16 @@ | |||
464 | be initialized separately into its own DRM MM object. | 464 | be initialized separately into its own DRM MM object. |
465 | </para> | 465 | </para> |
466 | <para> | 466 | <para> |
467 | Initialization will be driver specific, and will depend on | 467 | Initialization is driver specific, and depends on |
468 | the architecture of the device. In the case of Intel | 468 | the architecture of the device. In the case of Intel |
469 | integrated graphics chips like 965GM, GEM initialization can | 469 | integrated graphics chips like 965GM, GEM initialization can |
470 | be done by calling the internal GEM init function, | 470 | be done by calling the internal GEM init function, |
471 | i915_gem_do_init(). Since the 965GM is a UMA device | 471 | i915_gem_do_init(). Since the 965GM is a UMA device |
472 | (i.e. it doesn't have dedicated VRAM), GEM will manage | 472 | (i.e. it doesn't have dedicated VRAM), GEM manages |
473 | making regular RAM available for GPU operations. Memory set | 473 | making regular RAM available for GPU operations. Memory set |
474 | aside by the BIOS (called "stolen" memory by the i915 | 474 | aside by the BIOS (called "stolen" memory by the i915 |
475 | driver) will be managed by the DRM memrange allocator; the | 475 | driver) is managed by the DRM memrange allocator; the |
476 | rest of the aperture will be managed by GEM. | 476 | rest of the aperture is managed by GEM. |
477 | <programlisting> | 477 | <programlisting> |
478 | /* Basic memrange allocator for stolen space (aka vram) */ | 478 | /* Basic memrange allocator for stolen space (aka vram) */ |
479 | drm_memrange_init(&dev_priv->vram, 0, prealloc_size); | 479 | drm_memrange_init(&dev_priv->vram, 0, prealloc_size); |
@@ -616,7 +616,7 @@ void intel_crt_init(struct drm_device *dev) | |||
616 | <para> | 616 | <para> |
617 | DRM_IOCTL_MODESET_CTL should be called by application level | 617 | DRM_IOCTL_MODESET_CTL should be called by application level |
618 | drivers before and after mode setting, since on many devices the | 618 | drivers before and after mode setting, since on many devices the |
619 | vertical blank counter will be reset at that time. Internally, | 619 | vertical blank counter is reset at that time. Internally, |
620 | the DRM snapshots the last vblank count when the ioctl is called | 620 | the DRM snapshots the last vblank count when the ioctl is called |
621 | with the _DRM_PRE_MODESET command so that the counter won't go | 621 | with the _DRM_PRE_MODESET command so that the counter won't go |
622 | backwards (which is dealt with when _DRM_POST_MODESET is used). | 622 | backwards (which is dealt with when _DRM_POST_MODESET is used). |
@@ -632,8 +632,8 @@ void intel_crt_init(struct drm_device *dev) | |||
632 | register. The enable and disable vblank callbacks should enable | 632 | register. The enable and disable vblank callbacks should enable |
633 | and disable vertical blank interrupts, respectively. In the | 633 | and disable vertical blank interrupts, respectively. In the |
634 | absence of DRM clients waiting on vblank events, the core DRM | 634 | absence of DRM clients waiting on vblank events, the core DRM |
635 | code will use the disable_vblank() function to disable | 635 | code uses the disable_vblank() function to disable |
636 | interrupts, which saves power. They'll be re-enabled again when | 636 | interrupts, which saves power. They are re-enabled again when |
637 | a client calls the vblank wait ioctl above. | 637 | a client calls the vblank wait ioctl above. |
638 | </para> | 638 | </para> |
639 | <para> | 639 | <para> |
@@ -699,14 +699,14 @@ void intel_crt_init(struct drm_device *dev) | |||
699 | performs any necessary flushing or synchronization to put the object | 699 | performs any necessary flushing or synchronization to put the object |
700 | into the desired coherency domain (note that the object may be busy, | 700 | into the desired coherency domain (note that the object may be busy, |
701 | i.e. an active render target; in that case the set domain function | 701 | i.e. an active render target; in that case the set domain function |
702 | will block the client and wait for rendering to complete before | 702 | blocks the client and waits for rendering to complete before |
703 | performing any necessary flushing operations). | 703 | performing any necessary flushing operations). |
704 | </para> | 704 | </para> |
705 | <para> | 705 | <para> |
706 | Perhaps the most important GEM function is providing a command | 706 | Perhaps the most important GEM function is providing a command |
707 | execution interface to clients. Client programs construct command | 707 | execution interface to clients. Client programs construct command |
708 | buffers containing references to previously allocated memory objects | 708 | buffers containing references to previously allocated memory objects |
709 | and submit them to GEM. At that point, GEM will take care to bind | 709 | and submit them to GEM. At that point, GEM takes care to bind |
710 | all the objects into the GTT, execute the buffer, and provide | 710 | all the objects into the GTT, execute the buffer, and provide |
711 | necessary synchronization between clients accessing the same buffers. | 711 | necessary synchronization between clients accessing the same buffers. |
712 | This often involves evicting some objects from the GTT and re-binding | 712 | This often involves evicting some objects from the GTT and re-binding |
@@ -767,7 +767,7 @@ void intel_crt_init(struct drm_device *dev) | |||
767 | <para> | 767 | <para> |
768 | In order to set a mode on a given CRTC, encoder and connector | 768 | In order to set a mode on a given CRTC, encoder and connector |
769 | configuration, clients need to provide a framebuffer object which | 769 | configuration, clients need to provide a framebuffer object which |
770 | will provide a source of pixels for the CRTC to deliver to the encoder(s) | 770 | provides a source of pixels for the CRTC to deliver to the encoder(s) |
771 | and ultimately the connector(s) in the configuration. A framebuffer | 771 | and ultimately the connector(s) in the configuration. A framebuffer |
772 | is fundamentally a driver specific memory object, made into an opaque | 772 | is fundamentally a driver specific memory object, made into an opaque |
773 | handle by the DRM addfb function. Once an fb has been created this | 773 | handle by the DRM addfb function. Once an fb has been created this |
@@ -789,7 +789,7 @@ void intel_crt_init(struct drm_device *dev) | |||
789 | <para> | 789 | <para> |
790 | The DRM core provides some suspend/resume code, but drivers | 790 | The DRM core provides some suspend/resume code, but drivers |
791 | wanting full suspend/resume support should provide save() and | 791 | wanting full suspend/resume support should provide save() and |
792 | restore() functions. These will be called at suspend, | 792 | restore() functions. These are called at suspend, |
793 | hibernate, or resume time, and should perform any state save or | 793 | hibernate, or resume time, and should perform any state save or |
794 | restore required by your device across suspend or hibernate | 794 | restore required by your device across suspend or hibernate |
795 | states. | 795 | states. |
@@ -823,7 +823,7 @@ void intel_crt_init(struct drm_device *dev) | |||
823 | </para> | 823 | </para> |
824 | <para> | 824 | <para> |
825 | Cover generic ioctls and sysfs layout here. Only need high | 825 | Cover generic ioctls and sysfs layout here. Only need high |
826 | level info, since man pages will cover the rest. | 826 | level info, since man pages should cover the rest. |
827 | </para> | 827 | </para> |
828 | </chapter> | 828 | </chapter> |
829 | 829 | ||