Add kernel-doc to some important elements from DC struct that might help
to understand DC sequence.

Reviewed-by: Aurabindo Pillai <[email protected]>
Acked-by: Rodrigo Siqueira <[email protected]>
Signed-off-by: Rodrigo Siqueira <[email protected]>
---
 .../gpu/drm/amd/display/dc/core/dc_resource.c |  5 ++-
 drivers/gpu/drm/amd/display/dc/dc_link.h      |  8 ++++
 .../gpu/drm/amd/display/dc/inc/core_types.h   | 38 ++++++++++++++-----
 3 files changed, 40 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index d99f1c4b9584..7caf3139fabc 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -2562,9 +2562,12 @@ enum dc_status resource_map_pool_resources(
 
 /**
  * dc_resource_state_copy_construct_current() - Creates a new dc_state from 
existing state
- * Is a shallow copy.  Increments refcounts on existing streams and planes.
+ *
  * @dc: copy out of dc->current_state
  * @dst_ctx: copy into this
+ *
+ * This function makes a shallow copy of the current DC state and increments
+ * refcounts on existing streams and planes.
  */
 void dc_resource_state_copy_construct_current(
                const struct dc *dc,
diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h 
b/drivers/gpu/drm/amd/display/dc/dc_link.h
index 17f080f8af6c..edb4532eaa39 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_link.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_link.h
@@ -166,6 +166,14 @@ struct dc_link {
        enum dc_irq_source irq_source_hpd_rx;/* aka DP Short Pulse  */
        bool is_hpd_filter_disabled;
        bool dp_ss_off;
+
+       /**
+        * @link_state_valid:
+        *
+        * If there is no link and local sink, this variable should be set to
+        * false. Otherwise, it should be set to true; usually, the function
+        * core_link_enable_stream sets this field to true.
+        */
        bool link_state_valid;
        bool aux_access_disabled;
        bool sync_lt_in_progress;
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h 
b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index 295845d49cb9..fe34cfde22a6 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -514,29 +514,47 @@ struct bw_context {
        union bw_output bw;
        struct display_mode_lib dml;
 };
+
 /**
- * struct dc_state - The full description of a state requested by a user
- *
- * @streams: Stream properties
- * @stream_status: The planes on a given stream
- * @res_ctx: Persistent state of resources
- * @bw_ctx: The output from bandwidth and watermark calculations and the DML
- * @pp_display_cfg: PowerPlay clocks and settings
- * @dcn_bw_vars: non-stack memory to support bandwidth calculations
- *
+ * struct dc_state - The full description of a state requested by users
  */
 struct dc_state {
+       /**
+        * @streams: Stream state properties
+        */
        struct dc_stream_state *streams[MAX_PIPES];
+
+       /**
+        * @stream_status: Planes status on a given stream
+        */
        struct dc_stream_status stream_status[MAX_PIPES];
+
+       /**
+        * @stream_count: Total of streams in use
+        */
        uint8_t stream_count;
        uint8_t stream_mask;
 
+       /**
+        * @res_ctx: Persistent state of resources
+        */
        struct resource_context res_ctx;
 
+       /**
+        * @bw_ctx: The output from bandwidth and watermark calculations and 
the DML
+        */
        struct bw_context bw_ctx;
 
-       /* Note: these are big structures, do *not* put on stack! */
+       /**
+        * @pp_display_cfg: PowerPlay clocks and settings
+        * Note: this is a big struct, do *not* put on stack!
+        */
        struct dm_pp_display_configuration pp_display_cfg;
+
+       /**
+        * @dcn_bw_vars: non-stack memory to support bandwidth calculations
+        * Note: this is a big struct, do *not* put on stack!
+        */
        struct dcn_bw_internal_vars dcn_bw_vars;
 
        struct clk_mgr *clk_mgr;
-- 
2.35.1

Reply via email to