Skip to contentSkip to conversation

drm/doc: use proper cross-references for sections

PATCH In review Simon Ser 3 participants 4 messages Aug 3, 2023

Subsystems (3)
lore
Share & tools
lore

Simon Ser

author
#0 lore raw

PATCH 1/1 drm/doc: use proper cross-references for sections

When I originally wrote these docs, I couldn't manage to insert a cross-reference to a section. Here's how it can be done.

Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 Documentation/gpu/drm-kms.rst | 2 ++
 Documentation/gpu/drm-mm.rst  | 2 ++
 include/uapi/drm/drm.h        | 9 ++++-----
 3 files changed, 8 insertions(+), 5 deletions(-)
Documentation/gpu/drm-kms.rst +2 -0
index c92d425cb2dd..ca9210e47266 100644
@@ -360,6 +360,8 @@ Format Functions Reference
 .. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
    :export:
 
+.. _kms_dumb_buffer_objects:
+
 Dumb Buffer Objects
 ===================
 
Documentation/gpu/drm-mm.rst +2 -0
index 3d5dc9dc1bfe..513197359aba 100644
@@ -517,6 +517,8 @@ DRM Cache Handling and Fast WC memcpy()
 .. kernel-doc:: drivers/gpu/drm/drm_cache.c
    :export:
 
+.. _drm_sync_objects:
+
 DRM Sync Objects
 ===========================
 
include/uapi/drm/drm.h +4 -5
index 863e47200911..75ec985d95e5 100644
@@ -673,8 +673,8 @@ struct drm_gem_open {
  * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
  * and &DRM_PRIME_CAP_EXPORT.
  *
- * PRIME buffers are exposed as dma-buf file descriptors. See
- * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".
+ * PRIME buffers are exposed as dma-buf file descriptors.
+ * See :ref:`prime_buffer_sharing`.
  */
 #define DRM_CAP_PRIME			0x5
 /**
@@ -756,15 +756,14 @@ struct drm_gem_open {
 /**
  * DRM_CAP_SYNCOBJ
  *
- * If set to 1, the driver supports sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * If set to 1, the driver supports sync objects. See :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ		0x13
 /**
  * DRM_CAP_SYNCOBJ_TIMELINE
  *
  * If set to 1, the driver supports timeline operations on sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ_TIMELINE	0x14
 
Signature · 1 line
2.41.0
Acked-by me on v1 1/1
#1 lore raw
Quoted 7 lines · Simon Ser

When I originally wrote these docs, I couldn't manage to insert a cross-reference to a section. Here's how it can be done.

Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
Acked-by me
Quoted 69 lines
---
 Documentation/gpu/drm-kms.rst | 2 ++
 Documentation/gpu/drm-mm.rst  | 2 ++
 include/uapi/drm/drm.h        | 9 ++++-----
 3 files changed, 8 insertions(+), 5 deletions(-)
Documentation/gpu/drm-kms.rst +2 -0
index c92d425cb2dd..ca9210e47266 100644
@@ -360,6 +360,8 @@ Format Functions Reference
 .. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
    :export:
 
+.. _kms_dumb_buffer_objects:
+
 Dumb Buffer Objects
 ===================
 
Documentation/gpu/drm-mm.rst +2 -0
index 3d5dc9dc1bfe..513197359aba 100644
@@ -517,6 +517,8 @@ DRM Cache Handling and Fast WC memcpy()
 .. kernel-doc:: drivers/gpu/drm/drm_cache.c
    :export:
 
+.. _drm_sync_objects:
+
 DRM Sync Objects
 ===========================
 
include/uapi/drm/drm.h +4 -6
index 863e47200911..75ec985d95e5 100644
@@ -673,8 +673,8 @@ struct drm_gem_open {
  * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
  * and &DRM_PRIME_CAP_EXPORT.
  *
- * PRIME buffers are exposed as dma-buf file descriptors. See
- * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".
+ * PRIME buffers are exposed as dma-buf file descriptors.
+ * See :ref:`prime_buffer_sharing`.
  */
 #define DRM_CAP_PRIME                  0x5
 /**
@@ -756,15 +756,14 @@ struct drm_gem_open {
 /**
  * DRM_CAP_SYNCOBJ
  *
- * If set to 1, the driver supports sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * If set to 1, the driver supports sync objects. See :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ                0x13
 /**
  * DRM_CAP_SYNCOBJ_TIMELINE
  *
  * If set to 1, the driver supports timeline operations on sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ_TIMELINE       0x14
 
--

2.41.0

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Reviewed-by on v1 1/1
#2 lore raw
In reply to Simon Ser
Quoted 30 lines · Simon Ser

When I originally wrote these docs, I couldn't manage to insert a cross-reference to a section. Here's how it can be done.

Cc Daniel Vetter <[email protected]>
Cc Pekka Paalanen <[email protected]>
---
 Documentation/gpu/drm-kms.rst | 2 ++
 Documentation/gpu/drm-mm.rst  | 2 ++
 include/uapi/drm/drm.h        | 9 ++++-----
 3 files changed, 8 insertions(+), 5 deletions(-)
Documentation/gpu/drm-kms.rst +2 -0
index c92d425cb2dd..ca9210e47266 100644
@@ -360,6 +360,8 @@ Format Functions Reference
 .. kernel-doc:: drivers/gpu/drm/drm_fourcc.c
    :export:
 
+.. _kms_dumb_buffer_objects:
+
 Dumb Buffer Objects
 ===================
 
Documentation/gpu/drm-mm.rst +0 -0
index 3d5dc9dc1bfe..513197359aba 100644

Documentation/gpu/drm-mm.rst DRM Cache Handling and Fast WC memcpy() · line 523

Quoted 7 lines
Documentation/gpu/drm-mm.rst +2 -0
@@ -517,6 +517,8 @@ DRM Cache Handling and Fast WC memcpy()
 .. kernel-doc:: drivers/gpu/drm/drm_cache.c
    :export:
 
+.. _drm_sync_objects:
+
 DRM Sync Objects
 ===========================

Care to fix that title underline too, in a separate patch, please?

This one's

Quoted 33 lines
include/uapi/drm/drm.h +4 -5
index 863e47200911..75ec985d95e5 100644
@@ -673,8 +673,8 @@ struct drm_gem_open {
  * Bitfield of supported PRIME sharing capabilities. See &DRM_PRIME_CAP_IMPORT
  * and &DRM_PRIME_CAP_EXPORT.
  *
- * PRIME buffers are exposed as dma-buf file descriptors. See
- * Documentation/gpu/drm-mm.rst, section "PRIME Buffer Sharing".
+ * PRIME buffers are exposed as dma-buf file descriptors.
+ * See :ref:`prime_buffer_sharing`.
  */
 #define DRM_CAP_PRIME			0x5
 /**
@@ -756,15 +756,14 @@ struct drm_gem_open {
 /**
  * DRM_CAP_SYNCOBJ
  *
- * If set to 1, the driver supports sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * If set to 1, the driver supports sync objects. See :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ		0x13
 /**
  * DRM_CAP_SYNCOBJ_TIMELINE
  *
  * If set to 1, the driver supports timeline operations on sync objects. See
- * Documentation/gpu/drm-mm.rst, section "DRM Sync Objects".
+ * :ref:`drm_sync_objects`.
  */
 #define DRM_CAP_SYNCOBJ_TIMELINE	0x14
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
author
#3 lore raw
Quoted 4 lines · Jani Nikula
Quoted 2 lines

DRM Sync Objects
===========================

Care to fix that title underline too, in a separate patch, please?

Sure, submitted!

Quoted 3 lines

This one's

Thank you!