drm/amd/display: Add kernel doc to some of the dc fields
authorRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Thu, 20 Oct 2022 15:47:00 +0000 (11:47 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Oct 2022 18:45:51 +0000 (14:45 -0400)
Add kernel-doc to some important elements from DC struct that might help
to understand DC sequence.

Tested-by: Mark Broadworth <mark.broadworth@amd.com>
Reviewed-by: Aurabindo Pillai <Aurabindo.Pillai@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc_link.h
drivers/gpu/drm/amd/display/dc/inc/core_types.h

index d99f1c4..7caf313 100644 (file)
@@ -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,
index 17f080f..edb4532 100644 (file)
@@ -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;
index 295845d..fe34cfd 100644 (file)
@@ -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;