tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 9250d2f72dc46a808b6aa23bf50dd670f1f52ddc commit: 5d945cbcd4b16a29d6470a80dfb19738f9a4319f [11322/13276] drm/amd/display: Create a file dedicated to planes config: alpha-randconfig-r023-20220727 (https://download.01.org/0day-ci/archive/20220728/202207280116.k1TfngjQ-lkp@xxxxxxxxx/config) compiler: alpha-linux-gcc (GCC) 12.1.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=5d945cbcd4b16a29d6470a80dfb19738f9a4319f 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 5d945cbcd4b16a29d6470a80dfb19738f9a4319f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash drivers/gpu/drm/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:83:31: warning: no previous prototype for 'amd_get_format_info' [-Wmissing-prototypes] 83 | const struct drm_format_info *amd_get_format_info(const struct drm_mode_fb_cmd2 *cmd) | ^~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:88:6: warning: no previous prototype for 'fill_blending_from_plane_state' [-Wmissing-prototypes] 88 | void fill_blending_from_plane_state(const struct drm_plane_state *plane_state, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:152:6: warning: no previous prototype for 'modifier_has_dcc' [-Wmissing-prototypes] 152 | bool modifier_has_dcc(uint64_t modifier) | ^~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:157:10: warning: no previous prototype for 'modifier_gfx9_swizzle_mode' [-Wmissing-prototypes] 157 | unsigned modifier_gfx9_swizzle_mode(uint64_t modifier) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:752:5: warning: no previous prototype for 'fill_plane_buffer_attributes' [-Wmissing-prototypes] 752 | int fill_plane_buffer_attributes(struct amdgpu_device *adev, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:992:5: warning: no previous prototype for 'dm_plane_helper_check_state' [-Wmissing-prototypes] 992 | int dm_plane_helper_check_state(struct drm_plane_state *state, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1046:5: warning: no previous prototype for 'fill_dc_scaling_info' [-Wmissing-prototypes] 1046 | int fill_dc_scaling_info(struct amdgpu_device *adev, | ^~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1222:6: warning: no previous prototype for 'handle_cursor_update' [-Wmissing-prototypes] 1222 | void handle_cursor_update(struct drm_plane *plane, | ^~~~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:1575:5: warning: no previous prototype for 'amdgpu_dm_plane_init' [-Wmissing-prototypes] 1575 | int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, | ^~~~~~~~~~~~~~~~~~~~ In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:32, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_trace.h:41, from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c:36: 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 +/amd_get_format_info +83 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_plane.c 82 > 83 const struct drm_format_info *amd_get_format_info(const struct drm_mode_fb_cmd2 *cmd) 84 { 85 return amdgpu_lookup_format_info(cmd->pixel_format, cmd->modifier[0]); 86 } 87 > 88 void fill_blending_from_plane_state(const struct drm_plane_state *plane_state, 89 bool *per_pixel_alpha, bool *pre_multiplied_alpha, 90 bool *global_alpha, int *global_alpha_value) 91 { 92 *per_pixel_alpha = false; 93 *pre_multiplied_alpha = true; 94 *global_alpha = false; 95 *global_alpha_value = 0xff; 96 97 if (plane_state->plane->type != DRM_PLANE_TYPE_OVERLAY) 98 return; 99 100 if (plane_state->pixel_blend_mode == DRM_MODE_BLEND_PREMULTI || 101 plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE) { 102 static const uint32_t alpha_formats[] = { 103 DRM_FORMAT_ARGB8888, 104 DRM_FORMAT_RGBA8888, 105 DRM_FORMAT_ABGR8888, 106 }; 107 uint32_t format = plane_state->fb->format->format; 108 unsigned int i; 109 110 for (i = 0; i < ARRAY_SIZE(alpha_formats); ++i) { 111 if (format == alpha_formats[i]) { 112 *per_pixel_alpha = true; 113 break; 114 } 115 } 116 117 if (*per_pixel_alpha && plane_state->pixel_blend_mode == DRM_MODE_BLEND_COVERAGE) 118 *pre_multiplied_alpha = false; 119 } 120 121 if (plane_state->alpha < 0xffff) { 122 *global_alpha = true; 123 *global_alpha_value = plane_state->alpha >> 8; 124 } 125 } 126 127 static void add_modifier(uint64_t **mods, uint64_t *size, uint64_t *cap, uint64_t mod) 128 { 129 if (!*mods) 130 return; 131 132 if (*cap - *size < 1) { 133 uint64_t new_cap = *cap * 2; 134 uint64_t *new_mods = kmalloc(new_cap * sizeof(uint64_t), GFP_KERNEL); 135 136 if (!new_mods) { 137 kfree(*mods); 138 *mods = NULL; 139 return; 140 } 141 142 memcpy(new_mods, *mods, sizeof(uint64_t) * *size); 143 kfree(*mods); 144 *mods = new_mods; 145 *cap = new_cap; 146 } 147 148 (*mods)[*size] = mod; 149 *size += 1; 150 } 151 > 152 bool modifier_has_dcc(uint64_t modifier) 153 { 154 return IS_AMD_FMT_MOD(modifier) && AMD_FMT_MOD_GET(DCC, modifier); 155 } 156 > 157 unsigned modifier_gfx9_swizzle_mode(uint64_t modifier) 158 { 159 if (modifier == DRM_FORMAT_MOD_LINEAR) 160 return 0; 161 162 return AMD_FMT_MOD_GET(TILE, modifier); 163 } 164 -- 0-DAY CI Kernel Test Service https://01.org/lkp