[agd5f:drm-next 67/96] drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:618:6: warning: no previous prototype for 'dcn31_set_low_power_state'

From: kernel test robot
Date: Sat Apr 02 2022 - 08:18:57 EST


tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: e45422695c196dbc665a95526c85ff4b8752aff2
commit: 06bab5897c51e15d9a6b7ec11b1eacc4f2e1a145 [67/96] drm/amd/display: Power down hardware if timer not trigger
config: powerpc64-randconfig-s032-20220402 (https://download.01.org/0day-ci/archive/20220402/202204022040.87CAsqVS-lkp@xxxxxxxxx/config)
compiler: powerpc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout 06bab5897c51e15d9a6b7ec11b1eacc4f2e1a145
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=powerpc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from drivers/gpu/drm/amd/amdgpu/../display/dmub/dmub_srv.h:67,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_dmub_srv.h:30,
from drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:49:
drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h: In function 'dmub_rb_flush_pending':
drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:3049:26: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
3049 | uint64_t temp;
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c: At top level:
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:618:6: warning: no previous prototype for 'dcn31_set_low_power_state' [-Wmissing-prototypes]
618 | void dcn31_set_low_power_state(struct clk_mgr *clk_mgr_base)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/resource.h:28,
from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/hw/clk_mgr_internal.h:36,
from drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:29:
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:129:22: warning: 'SYNAPTICS_DEVICE_ID' defined but not used [-Wunused-const-variable=]
129 | static const uint8_t SYNAPTICS_DEVICE_ID[] = "SYNA";
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/ddc_service_types.h:126:22: warning: 'DP_SINK_DEVICE_STR_ID_2' defined but not used [-Wunused-const-variable=]
126 | 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:125:22: warning: 'DP_SINK_DEVICE_STR_ID_1' defined but not used [-Wunused-const-variable=]
125 | static const uint8_t DP_SINK_DEVICE_STR_ID_1[] = {7, 1, 8, 7, 3, 0};
| ^~~~~~~~~~~~~~~~~~~~~~~


vim +/dcn31_set_low_power_state +618 drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c

617
> 618 void dcn31_set_low_power_state(struct clk_mgr *clk_mgr_base)
619 {
620 int display_count;
621 struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
622 struct dc *dc = clk_mgr_base->ctx->dc;
623 struct dc_state *context = dc->current_state;
624
625 if (clk_mgr_base->clks.pwr_state != DCN_PWR_STATE_LOW_POWER) {
626 display_count = dcn31_get_active_display_cnt_wa(dc, context);
627 /* if we can go lower, go lower */
628 if (display_count == 0) {
629 union display_idle_optimization_u idle_info = { 0 };
630
631 idle_info.idle_info.df_request_disabled = 1;
632 idle_info.idle_info.phy_ref_clk_off = 1;
633 idle_info.idle_info.s0i2_rdy = 1;
634 dcn31_smu_set_display_idle_optimization(clk_mgr, idle_info.data);
635 /* update power state */
636 clk_mgr_base->clks.pwr_state = DCN_PWR_STATE_LOW_POWER;
637 }
638 }
639 }
640

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