Skip to contentSkip to conversation

drm/amd/display: add kernel docs for dc_stream_forward_crc_window

PATCH In review Sagar Vashnav 3 participants 3 messages Oct 25, 2023 – Oct 30, 2023

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

PATCH 1/1 drm/amd/display: add kernel docs for dc_stream_forward_crc_window

Add kernel documentation for the dc_stream_forward_crc_window

---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +13 -0
index 1729fb727..5ab35e482 100644
@@ -528,6 +528,19 @@ dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu,
 		dmcu->funcs->forward_crc_window(dmcu, rect, mux_mapping);
 }
 
+/**
+ * dc_stream_forward_crc_window() - Forward CRC window configuration to DMUB or DMCU.
+ * @stream: The stream state to forward CRC window configuration for.
+ * @rect: Pointer to the rectangle defining the CRC window coordinates.
+ * @is_stop: Flag indicating whether the CRC capture should be stopped.
+
+ * This function is responsible for forwarding the CRC window configuration
+ * for a given stream to either the DMUB or DMCU, depending on their availability.
+
+ * Return:
+ * %true if the CRC window configuration was successfully forwarded;
+ * %false if the stream was not found or CRC forwarding is not supported.
+ */
 bool
 dc_stream_forward_crc_window(struct dc_stream_state *stream,
 		struct rect *rect, bool is_stop)
Signature · 1 line
2.34.1
#1 lore raw
kernel test robot noticed the following build warnings:

Hi Sagar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master v6.6-rc7 next-20231025] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Sagar-Vashnav/drm-amd-display-add-kernel-docs-for-dc_stream_forward_crc_window/20231026-001250
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20231025140419.21180-1-sagarvashnav72427%40gmail.com
patch subject: [PATCH] drm/amd/display: add kernel docs for dc_stream_forward_crc_window
config: csky-randconfig-002-20231026 (https://download.01.org/0day-ci/archive/20231026/[email protected]/config)
compiler: csky-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231026/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:536: warning: bad line: 

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:539: warning: bad line:

vim +536 drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c

530
531 /**
532 * dc_stream_forward_crc_window() - Forward CRC window configuration to DMUB or DMCU.
533 * @stream: The stream state to forward CRC window configuration for.
534 * @rect: Pointer to the rectangle defining the CRC window coordinates.
535 * @is_stop: Flag indicating whether the CRC capture should be stopped.

 > 536	

537 * This function is responsible for forwarding the CRC window configuration
538 * for a given stream to either the DMUB or DMCU, depending on their availability.
539
540 * Return:
541 * %true if the CRC window configuration was successfully forwarded;
542 * %false if the stream was not found or CRC forwarding is not supported.
543 */
544 bool
545 dc_stream_forward_crc_window(struct dc_stream_state *stream,
546 struct rect *rect, bool is_stop)
547 {
548 struct dmcu *dmcu;
549 struct dc_dmub_srv *dmub_srv;
550 struct otg_phy_mux mux_mapping;
551 struct pipe_ctx *pipe;
552 int i;
553 struct dc *dc = stream->ctx->dc;
554
555 for (i = 0; i < MAX_PIPES; i++) {
556 pipe = &dc->current_state->res_ctx.pipe_ctx[i];
557 if (pipe->stream == stream && !pipe->top_pipe && !pipe->prev_odm_pipe)
558 break;
559 }
560
561 /* Stream not found */
562 if (i == MAX_PIPES)
563 return false;
564
565 mux_mapping.phy_output_num = stream->link->link_enc_hw_inst;
566 mux_mapping.otg_output_num = pipe->stream_res.tg->inst;
567
568 dmcu = dc->res_pool->dmcu;
569 dmub_srv = dc->ctx->dmub_srv;
570
571 /* forward to dmub */
572 if (dmub_srv)
573 dc_stream_forward_dmub_crc_window(dmub_srv, rect, &mux_mapping, is_stop);
574 /* forward to dmcu */
575 else if (dmcu && dmcu->funcs->is_dmcu_initialized(dmcu))
576 dc_stream_forward_dmcu_crc_window(dmcu, rect, &mux_mapping, is_stop);
577 else
578 return false;
579
580 return true;
581 }
582 #endif /* CONFIG_DRM_AMD_SECURE_DISPLAY */
583

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#2 lore raw
In reply to Sagar Vashnav

Hi Sagar,

First of all, thanks for your patch.

Quoted 12 lines · Sagar Vashnav

Add kernel documentation for the dc_stream_forward_crc_window

---
  drivers/gpu/drm/amd/display/dc/core/dc.c | 13 +++++++++++++
  1 file changed, 13 insertions(+)
drivers/gpu/drm/amd/display/dc/core/dc.c +0 -0
index 1729fb727..5ab35e482 100644

drivers/gpu/drm/amd/display/dc/core/dc.c dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu, · line 532

Quoted 5 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +2 -0
@@ -528,6 +528,19 @@ dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu,
  		dmcu->funcs->forward_crc_window(dmcu, rect, mux_mapping);
  }
 
+/**
+ * dc_stream_forward_crc_window() - Forward CRC window configuration to DMUB or DMCU.

Add an empty comment line between the summary and the parameter description.

drivers/gpu/drm/amd/display/dc/core/dc.c dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu, · line 536

Quoted 4 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +4 -0
+ * @stream: The stream state to forward CRC window configuration for.
+ * @rect: Pointer to the rectangle defining the CRC window coordinates.
+ * @is_stop: Flag indicating whether the CRC capture should be stopped.
+

You need to add * in the above line.

drivers/gpu/drm/amd/display/dc/core/dc.c dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu, · line 539

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
+ * This function is responsible for forwarding the CRC window configuration
+ * for a given stream to either the DMUB or DMCU, depending on their availability.
+

Same as my previous comment.

drivers/gpu/drm/amd/display/dc/core/dc.c dc_stream_forward_dmcu_crc_window(struct dmcu *dmcu, · line 542

Quoted 3 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +3 -0
+ * Return:
+ * %true if the CRC window configuration was successfully forwarded;
+ * %false if the stream was not found or CRC forwarding is not supported.

Afaik, we don't use % in the kernel-doc. Maybe just use 'True' and 'False'?

Thanks
Siqueira

Quoted 4 lines
drivers/gpu/drm/amd/display/dc/core/dc.c +1 -0
+ */
  bool
  dc_stream_forward_crc_window(struct dc_stream_state *stream,
  		struct rect *rect, bool is_stop)