Skip to contentSkip to conversation

gpu: host1x: Document the get, put, mmap and munmap operations

PATCH New TAKANO Mitsuhiro 1 participant 1 message Nov 25

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: host1x: Document the get, put, mmap and munmap operations

struct host1x_bo_ops documents its pin and unpin operations but not the four that take a reference on a bo and map it into the kernel address space, so kernel-doc reports each of them as undescribed:

include/linux/host1x.h:159 struct member 'get' not described in 'host1x_bo_ops' include/linux/host1x.h:159 struct member 'put' not described in 'host1x_bo_ops' include/linux/host1x.h:159 struct member 'mmap' not described in 'host1x_bo_ops' include/linux/host1x.h:159 struct member 'munmap' not described in 'host1x_bo_ops'

Describe them from what the implementations do: get takes a reference and returns the bo, put drops the reference, mmap maps the bo into the kernel address space and returns the address, munmap unmaps the address that mmap returned.

kernel-doc on the file prints eight warnings before the change and none after it.

Written with Hermes Agent, an LLM assistant; the author reviewed it and ran kernel-doc on the file with and without the change.

---
 include/linux/host1x.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/host1x.h +4 -0
index e7ba601b2afb..411a1c84eb61 100644
@@ -146,8 +146,12 @@ static inline struct host1x_bo_mapping *to_host1x_bo_mapping(struct kref *ref)
 /**
  * struct host1x_bo_ops - operations implemented by a host1x_bo provider
  *
+ * @get: take a reference on the bo and return it.
+ * @put: drop a reference on the bo.
  * @pin: create a DMA mapping. Implementation must not touch the bo's refcount.
  * @unpin: destroy a DMA mapping. Implementation must not touch the bo's refcount.
+ * @mmap: map the bo into the kernel address space and return the address.
+ * @munmap: unmap the address @mmap returned.
  */
 struct host1x_bo_ops {
 	struct host1x_bo *(*get)(struct host1x_bo *bo);

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f

Signature · 1 line
2.53.0