tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 04fe99a8d936d46a310ca61b8b63dc270962bf01 commit: aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5 [4335/5418] drm/amdgpu/UAPI: add new PROFILE IOCTL config: parisc-randconfig-m031-20211207 (https://download.01.org/0day-ci/archive/20211208/202112080344.JKjDO0hY-lkp@xxxxxxxxx/config) compiler: hppa-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout aeae40911ee65eaebbba9ab6ded0a3da8e7ea8d5 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=parisc SHELL=/bin/bash drivers/gpu/drm/amd/amdgpu/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/amdgpu_profile.c:37:5: warning: no previous prototype for 'amdgpu_profile_ioctl' [-Wmissing-prototypes] 37 | int amdgpu_profile_ioctl(struct drm_device *dev, void *data, | ^~~~~~~~~~~~~~~~~~~~ vim +/amdgpu_profile_ioctl +37 drivers/gpu/drm/amd/amdgpu/amdgpu_profile.c 26 27 /** 28 * amdgpu_profile_ioctl - Manages settings for profiling. 29 * 30 * @dev: drm device pointer 31 * @data: drm_amdgpu_vm 32 * @filp: drm file pointer 33 * 34 * Returns: 35 * 0 for success, -errno for errors. 36 */ > 37 int amdgpu_profile_ioctl(struct drm_device *dev, void *data, 38 struct drm_file *filp) 39 { 40 union drm_amdgpu_profile *args = data; 41 struct amdgpu_device *adev = drm_to_adev(dev); 42 const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs; 43 enum amd_dpm_forced_level current_level, requested_level; 44 int r; 45 46 if (pp_funcs->get_performance_level) 47 current_level = amdgpu_dpm_get_performance_level(adev); 48 else 49 current_level = adev->pm.dpm.forced_level; 50 51 switch (args->in.op) { 52 case AMDGPU_PROFILE_OP_GET_STABLE_PSTATE: 53 if (args->in.flags) 54 return -EINVAL; 55 switch (current_level) { 56 case AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD: 57 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_STANDARD; 58 break; 59 case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK: 60 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_SCLK; 61 break; 62 case AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK: 63 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_MCLK; 64 break; 65 case AMD_DPM_FORCED_LEVEL_PROFILE_PEAK: 66 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_PEAK; 67 break; 68 default: 69 args->out.flags = AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_NONE; 70 break; 71 } 72 break; 73 case AMDGPU_PROFILE_OP_SET_STABLE_PSTATE: 74 if (args->in.flags & ~AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MASK) 75 return -EINVAL; 76 switch (args->in.flags & AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MASK) { 77 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_STANDARD: 78 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_STANDARD; 79 break; 80 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_SCLK: 81 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_SCLK; 82 break; 83 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_MIN_MCLK: 84 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_MIN_MCLK; 85 break; 86 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_PEAK: 87 requested_level = AMD_DPM_FORCED_LEVEL_PROFILE_PEAK; 88 break; 89 case AMDGPU_PROFILE_FLAGS_STABLE_PSTATE_NONE: 90 requested_level = AMD_DPM_FORCED_LEVEL_AUTO; 91 break; 92 default: 93 return -EINVAL; 94 } 95 96 if ((current_level != requested_level) && pp_funcs->force_performance_level) { 97 mutex_lock(&adev->pm.mutex); 98 r = amdgpu_dpm_force_performance_level(adev, requested_level); 99 if (!r) 100 adev->pm.dpm.forced_level = requested_level; 101 mutex_unlock(&adev->pm.mutex); 102 if (r) 103 return r; 104 } 105 break; 106 default: 107 return -EINVAL; 108 } 109 110 return 0; 111 } 112 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx