lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 6 Sep 2022 11:48:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alvin Lee <Alvin.Lee2@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Alex Deucher <alexander.deucher@....com>,
        Jun Lei <Jun.Lei@....com>
Subject: drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:549:6:
 warning: no previous prototype for 'dc_dmub_setup_subvp_dmub_command'

Hi Alvin,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   53e99dcff61e1523ec1c3628b2d564ba15d32eb7
commit: 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1 drm/amd/display: Add SubVP required code
date:   9 weeks ago
config: i386-buildonly-randconfig-r004-20220905
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpu/drm/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:549:6: warning: no previous prototype for 'dc_dmub_setup_subvp_dmub_command' [-Wmissing-prototypes]
     549 | void dc_dmub_setup_subvp_dmub_command(struct dc *dc,
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
                    from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c:31:
   drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:137:22: warning: 'SYNAPTICS_DEVICE_ID' defined but not used [-Wunused-const-variable=]
     137 | static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
         |                      ^~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:134:17: warning: 'DP_SINK_BRANCH_DEV_NAME_7580' defined but not used [-Wunused-const-variable=]
     134 | static const u8 DP_SINK_BRANCH_DEV_NAME_7580[] = "7580\x80u";
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:132:22: warning: 'DP_SINK_DEVICE_STR_ID_2' defined but not used [-Wunused-const-variable=]
     132 | static const uint8_t DP_SINK_DEVICE_STR_ID_2[] = {7, 1, 8, 7, 5, 0};
         |                      ^~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:131:22: warning: 'DP_SINK_DEVICE_STR_ID_1' defined but not used [-Wunused-const-variable=]
     131 | static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3, 0};
         |                      ^~~~~~~~~~~~~~~~~~~~~~~


vim +/dc_dmub_setup_subvp_dmub_command +549 drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.c

   533	
   534	/**
   535	 * ***************************************************************************************
   536	 * dc_dmub_setup_subvp_dmub_command: Populate the DMCUB SubVP command
   537	 *
   538	 * This function loops through each pipe and populates the DMUB
   539	 * SubVP CMD info based on the pipe (e.g. SubVP, VBLANK).
   540	 *
   541	 * @param [in] dc: current dc state
   542	 * @param [in] context: new dc state
   543	 * @param [in] cmd: DMUB cmd to be populated with SubVP info
   544	 *
   545	 * @return: void
   546	 *
   547	 * ***************************************************************************************
   548	 */
 > 549	void dc_dmub_setup_subvp_dmub_command(struct dc *dc,
   550			struct dc_state *context,
   551			bool enable)
   552	{
   553		uint8_t cmd_pipe_index = 0;
   554		uint32_t i, pipe_idx;
   555		uint8_t subvp_count = 0;
   556		union dmub_rb_cmd cmd;
   557		struct pipe_ctx *subvp_pipes[2];
   558		uint32_t wm_val_refclk = 0;
   559	
   560		memset(&cmd, 0, sizeof(cmd));
   561		// FW command for SUBVP
   562		cmd.fw_assisted_mclk_switch_v2.header.type = DMUB_CMD__FW_ASSISTED_MCLK_SWITCH;
   563		cmd.fw_assisted_mclk_switch_v2.header.sub_type = DMUB_CMD__HANDLE_SUBVP_CMD;
   564		cmd.fw_assisted_mclk_switch_v2.header.payload_bytes =
   565				sizeof(cmd.fw_assisted_mclk_switch_v2) - sizeof(cmd.fw_assisted_mclk_switch_v2.header);
   566	
   567		for (i = 0; i < dc->res_pool->pipe_count; i++) {
   568			struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
   569	
   570			if (!pipe->stream)
   571				continue;
   572	
   573			if (pipe->plane_state && !pipe->top_pipe &&
   574					pipe->stream->mall_stream_config.type == SUBVP_MAIN)
   575				subvp_pipes[subvp_count++] = pipe;
   576		}
   577	
   578		if (enable) {
   579			// For each pipe that is a "main" SUBVP pipe, fill in pipe data for DMUB SUBVP cmd
   580			for (i = 0, pipe_idx = 0; i < dc->res_pool->pipe_count; i++) {
   581				struct pipe_ctx *pipe = &context->res_ctx.pipe_ctx[i];
   582	
   583				if (!pipe->stream)
   584					continue;
   585	
   586				if (pipe->plane_state && pipe->stream->mall_stream_config.paired_stream &&
   587						pipe->stream->mall_stream_config.type == SUBVP_MAIN) {
   588					populate_subvp_cmd_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++);
   589				} else if (pipe->plane_state && pipe->stream->mall_stream_config.type == SUBVP_NONE) {
   590					// Don't need to check for ActiveDRAMClockChangeMargin < 0, not valid in cases where
   591					// we run through DML without calculating "natural" P-state support
   592					populate_subvp_cmd_vblank_pipe_info(dc, context, &cmd, pipe, cmd_pipe_index++);
   593	
   594				}
   595				pipe_idx++;
   596			}
   597			if (subvp_count == 2) {
   598				update_subvp_prefetch_end_to_mall_start(dc, context, &cmd, subvp_pipes);
   599			}
   600			cmd.fw_assisted_mclk_switch_v2.config_data.pstate_allow_width_us = dc->caps.subvp_pstate_allow_width_us;
   601			cmd.fw_assisted_mclk_switch_v2.config_data.vertical_int_margin_us = dc->caps.subvp_vertical_int_margin_us;
   602	
   603			// Store the original watermark value for this SubVP config so we can lower it when the
   604			// MCLK switch starts
   605			wm_val_refclk = context->bw_ctx.bw.dcn.watermarks.a.cstate_pstate.pstate_change_ns *
   606					dc->res_pool->ref_clocks.dchub_ref_clock_inKhz / 1000 / 1000;
   607	
   608			cmd.fw_assisted_mclk_switch_v2.config_data.watermark_a_cache = wm_val_refclk < 0xFFFF ? wm_val_refclk : 0xFFFF;
   609		}
   610		dc_dmub_srv_cmd_queue(dc->ctx->dmub_srv, &cmd);
   611		dc_dmub_srv_cmd_execute(dc->ctx->dmub_srv);
   612		dc_dmub_srv_wait_idle(dc->ctx->dmub_srv);
   613	}
   614	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (211979 bytes)

Powered by blists - more mailing lists