[agd5f:drm-next 135/157] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1111:59: error: 'struct dc_debug_options' has no member named 'dpia_debug'
From: kernel test robot
Date: Wed Oct 27 2021 - 22:52:17 EST
tree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next
head: 6a806feef1d2620abf7a5a9da871c5a3774c7497
commit: 707021dc0e16f676b58e6dc959bc24779c14496b [135/157] drm/amd/display: Enable dpia in dmub only for DCN31 B0
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-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
git remote add agd5f https://gitlab.freedesktop.org/agd5f/linux.git
git fetch --no-tags agd5f drm-next
git checkout 707021dc0e16f676b58e6dc959bc24779c14496b
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Note: the agd5f/drm-next HEAD 6a806feef1d2620abf7a5a9da871c5a3774c7497 builds fine.
It only hurts bisectability.
All errors (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/amdgpu_dm/amdgpu_dm.c:35:
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:2870:26: error: variable 'temp' set but not used [-Werror=unused-but-set-variable]
2870 | uint64_t temp;
| ^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_dmub_hw_init':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1111:59: error: 'struct dc_debug_options' has no member named 'dpia_debug'
1111 | hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia;
| ^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: At top level:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:11402:5: error: no previous prototype for 'amdgpu_dm_set_dmub_async_sync_status' [-Werror=missing-prototypes]
11402 | int amdgpu_dm_set_dmub_async_sync_status(bool is_cmd_aux, struct dc_context *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/perf_event.h:25,
from include/linux/trace_events.h:10,
from include/trace/trace_events.h:21,
from include/trace/define_trace.h:102,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_trace.h:669,
from drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:41:
arch/arc/include/asm/perf_event.h:126:27: error: 'arc_pmu_cache_map' defined but not used [-Werror=unused-const-variable=]
126 | static const unsigned int arc_pmu_cache_map[C(MAX)][C(OP_MAX)][C(RESULT_MAX)] = {
| ^~~~~~~~~~~~~~~~~
arch/arc/include/asm/perf_event.h:91:27: error: 'arc_pmu_ev_hw_map' defined but not used [-Werror=unused-const-variable=]
91 | static const char * const arc_pmu_ev_hw_map[] = {
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
vim +1111 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
1006
1007 static int dm_dmub_hw_init(struct amdgpu_device *adev)
1008 {
1009 const struct dmcub_firmware_header_v1_0 *hdr;
1010 struct dmub_srv *dmub_srv = adev->dm.dmub_srv;
1011 struct dmub_srv_fb_info *fb_info = adev->dm.dmub_fb_info;
1012 const struct firmware *dmub_fw = adev->dm.dmub_fw;
1013 struct dmcu *dmcu = adev->dm.dc->res_pool->dmcu;
1014 struct abm *abm = adev->dm.dc->res_pool->abm;
1015 struct dmub_srv_hw_params hw_params;
1016 enum dmub_status status;
1017 const unsigned char *fw_inst_const, *fw_bss_data;
1018 uint32_t i, fw_inst_const_size, fw_bss_data_size;
1019 bool has_hw_support;
1020 struct dc *dc = adev->dm.dc;
1021
1022 if (!dmub_srv)
1023 /* DMUB isn't supported on the ASIC. */
1024 return 0;
1025
1026 if (!fb_info) {
1027 DRM_ERROR("No framebuffer info for DMUB service.\n");
1028 return -EINVAL;
1029 }
1030
1031 if (!dmub_fw) {
1032 /* Firmware required for DMUB support. */
1033 DRM_ERROR("No firmware provided for DMUB.\n");
1034 return -EINVAL;
1035 }
1036
1037 status = dmub_srv_has_hw_support(dmub_srv, &has_hw_support);
1038 if (status != DMUB_STATUS_OK) {
1039 DRM_ERROR("Error checking HW support for DMUB: %d\n", status);
1040 return -EINVAL;
1041 }
1042
1043 if (!has_hw_support) {
1044 DRM_INFO("DMUB unsupported on ASIC\n");
1045 return 0;
1046 }
1047
1048 hdr = (const struct dmcub_firmware_header_v1_0 *)dmub_fw->data;
1049
1050 fw_inst_const = dmub_fw->data +
1051 le32_to_cpu(hdr->header.ucode_array_offset_bytes) +
1052 PSP_HEADER_BYTES;
1053
1054 fw_bss_data = dmub_fw->data +
1055 le32_to_cpu(hdr->header.ucode_array_offset_bytes) +
1056 le32_to_cpu(hdr->inst_const_bytes);
1057
1058 /* Copy firmware and bios info into FB memory. */
1059 fw_inst_const_size = le32_to_cpu(hdr->inst_const_bytes) -
1060 PSP_HEADER_BYTES - PSP_FOOTER_BYTES;
1061
1062 fw_bss_data_size = le32_to_cpu(hdr->bss_data_bytes);
1063
1064 /* if adev->firmware.load_type == AMDGPU_FW_LOAD_PSP,
1065 * amdgpu_ucode_init_single_fw will load dmub firmware
1066 * fw_inst_const part to cw0; otherwise, the firmware back door load
1067 * will be done by dm_dmub_hw_init
1068 */
1069 if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
1070 memcpy(fb_info->fb[DMUB_WINDOW_0_INST_CONST].cpu_addr, fw_inst_const,
1071 fw_inst_const_size);
1072 }
1073
1074 if (fw_bss_data_size)
1075 memcpy(fb_info->fb[DMUB_WINDOW_2_BSS_DATA].cpu_addr,
1076 fw_bss_data, fw_bss_data_size);
1077
1078 /* Copy firmware bios info into FB memory. */
1079 memcpy(fb_info->fb[DMUB_WINDOW_3_VBIOS].cpu_addr, adev->bios,
1080 adev->bios_size);
1081
1082 /* Reset regions that need to be reset. */
1083 memset(fb_info->fb[DMUB_WINDOW_4_MAILBOX].cpu_addr, 0,
1084 fb_info->fb[DMUB_WINDOW_4_MAILBOX].size);
1085
1086 memset(fb_info->fb[DMUB_WINDOW_5_TRACEBUFF].cpu_addr, 0,
1087 fb_info->fb[DMUB_WINDOW_5_TRACEBUFF].size);
1088
1089 memset(fb_info->fb[DMUB_WINDOW_6_FW_STATE].cpu_addr, 0,
1090 fb_info->fb[DMUB_WINDOW_6_FW_STATE].size);
1091
1092 /* Initialize hardware. */
1093 memset(&hw_params, 0, sizeof(hw_params));
1094 hw_params.fb_base = adev->gmc.fb_start;
1095 hw_params.fb_offset = adev->gmc.aper_base;
1096
1097 /* backdoor load firmware and trigger dmub running */
1098 if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP)
1099 hw_params.load_inst_const = true;
1100
1101 if (dmcu)
1102 hw_params.psp_version = dmcu->psp_version;
1103
1104 for (i = 0; i < fb_info->num_fb; ++i)
1105 hw_params.fb[i] = &fb_info->fb[i];
1106
1107 switch (adev->asic_type) {
1108 case CHIP_YELLOW_CARP:
1109 if (dc->ctx->asic_id.hw_internal_rev != YELLOW_CARP_A0) {
1110 hw_params.dpia_supported = true;
> 1111 hw_params.disable_dpia = dc->debug.dpia_debug.bits.disable_dpia;
1112 }
1113 break;
1114 default:
1115 break;
1116 }
1117
1118 status = dmub_srv_hw_init(dmub_srv, &hw_params);
1119 if (status != DMUB_STATUS_OK) {
1120 DRM_ERROR("Error initializing DMUB HW: %d\n", status);
1121 return -EINVAL;
1122 }
1123
1124 /* Wait for firmware load to finish. */
1125 status = dmub_srv_wait_for_auto_load(dmub_srv, 100000);
1126 if (status != DMUB_STATUS_OK)
1127 DRM_WARN("Wait for DMUB auto-load failed: %d\n", status);
1128
1129 /* Init DMCU and ABM if available. */
1130 if (dmcu && abm) {
1131 dmcu->funcs->dmcu_init(dmcu);
1132 abm->dmcu_is_running = dmcu->funcs->is_dmcu_initialized(dmcu);
1133 }
1134
1135 if (!adev->dm.dc->ctx->dmub_srv)
1136 adev->dm.dc->ctx->dmub_srv = dc_dmub_srv_create(adev->dm.dc, dmub_srv);
1137 if (!adev->dm.dc->ctx->dmub_srv) {
1138 DRM_ERROR("Couldn't allocate DC DMUB server!\n");
1139 return -ENOMEM;
1140 }
1141
1142 DRM_INFO("DMUB hardware initialized: version=0x%08X\n",
1143 adev->dm.dmcub_fw_version);
1144
1145 return 0;
1146 }
1147
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip