Commit 059c7a5a authored by Liviu Dudau's avatar Liviu Dudau Committed by Daniel Vetter

Documentation/gpu: drm-mm.rst: fix formatting for struct vm_operations_struct

drm-mm.rst contains some unformatted dump of the vm_operations_struct
structure. Add some C formatting around it and some context for the
dump. While there, update the structure to resemble the new signature
for the fault handler after commit 25d3db7600b8 (mm, fs: reduce fault,
page_mkwrite, and pfn_mkwrite to take only vmf).
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170131174109.13690-1-Liviu.Dudau@arm.com
parent 8f2e045e
...@@ -291,10 +291,17 @@ To use :c:func:`drm_gem_mmap()`, drivers must fill the struct ...@@ -291,10 +291,17 @@ To use :c:func:`drm_gem_mmap()`, drivers must fill the struct
:c:type:`struct drm_driver <drm_driver>` gem_vm_ops field :c:type:`struct drm_driver <drm_driver>` gem_vm_ops field
with a pointer to VM operations. with a pointer to VM operations.
struct vm_operations_struct \*gem_vm_ops struct The VM operations is a :c:type:`struct vm_operations_struct <vm_operations_struct>`
vm_operations_struct { void (\*open)(struct vm_area_struct \* area); made up of several fields, the more interesting ones being:
void (\*close)(struct vm_area_struct \* area); int (\*fault)(struct
vm_area_struct \*vma, struct vm_fault \*vmf); }; .. code-block:: c
struct vm_operations_struct {
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
int (*fault)(struct vm_fault *vmf);
};
The open and close operations must update the GEM object reference The open and close operations must update the GEM object reference
count. Drivers can use the :c:func:`drm_gem_vm_open()` and count. Drivers can use the :c:func:`drm_gem_vm_open()` and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment