CC: [email protected] CC: [email protected] TO: Likun Gao <[email protected]> CC: Alex Deucher <[email protected]> CC: Hawking Zhang <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 15bc20c6af4ceee97a1f90b43c0e386643c071b4 commit: 157e72e831cb8f323108b5df6d0b148aef9507fb drm/amdgpu: add sdma ip block for sienna_cichlid (v5) date: 3 months ago :::::: branch date: 31 hours ago :::::: commit date: 3 months ago config: ia64-randconfig-m031-20200827 (attached as .config) compiler: ia64-linux-gcc (GCC) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> New smatch warnings: drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:130 sdma_v5_2_init_microcode() error: uninitialized symbol 'chip_name'. Old smatch warnings: drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:263 sdma_v5_2_ring_set_wptr() warn: should 'ring->wptr << 2' be a 64 bit type? drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:277 sdma_v5_2_ring_set_wptr() warn: should 'ring->wptr << 2' be a 64 bit type? # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=157e72e831cb8f323108b5df6d0b148aef9507fb git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 157e72e831cb8f323108b5df6d0b148aef9507fb vim +/chip_name +130 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c 157e72e831cb8f3 Likun Gao 2019-06-17 96 157e72e831cb8f3 Likun Gao 2019-06-17 97 /** 157e72e831cb8f3 Likun Gao 2019-06-17 98 * sdma_v5_2_init_microcode - load ucode images from disk 157e72e831cb8f3 Likun Gao 2019-06-17 99 * 157e72e831cb8f3 Likun Gao 2019-06-17 100 * @adev: amdgpu_device pointer 157e72e831cb8f3 Likun Gao 2019-06-17 101 * 157e72e831cb8f3 Likun Gao 2019-06-17 102 * Use the firmware interface to load the ucode images into 157e72e831cb8f3 Likun Gao 2019-06-17 103 * the driver (not loaded into hw). 157e72e831cb8f3 Likun Gao 2019-06-17 104 * Returns 0 on success, error on failure. 157e72e831cb8f3 Likun Gao 2019-06-17 105 */ 157e72e831cb8f3 Likun Gao 2019-06-17 106 157e72e831cb8f3 Likun Gao 2019-06-17 107 // emulation only, won't work on real chip 157e72e831cb8f3 Likun Gao 2019-06-17 108 // navi10 real chip need to use PSP to load firmware 157e72e831cb8f3 Likun Gao 2019-06-17 109 static int sdma_v5_2_init_microcode(struct amdgpu_device *adev) 157e72e831cb8f3 Likun Gao 2019-06-17 110 { 157e72e831cb8f3 Likun Gao 2019-06-17 111 const char *chip_name; 157e72e831cb8f3 Likun Gao 2019-06-17 112 char fw_name[40]; 157e72e831cb8f3 Likun Gao 2019-06-17 113 int err = 0, i; 157e72e831cb8f3 Likun Gao 2019-06-17 114 struct amdgpu_firmware_info *info = NULL; 157e72e831cb8f3 Likun Gao 2019-06-17 115 const struct common_firmware_header *header = NULL; 157e72e831cb8f3 Likun Gao 2019-06-17 116 const struct sdma_firmware_header_v1_0 *hdr; 157e72e831cb8f3 Likun Gao 2019-06-17 117 157e72e831cb8f3 Likun Gao 2019-06-17 118 DRM_DEBUG("\n"); 157e72e831cb8f3 Likun Gao 2019-06-17 119 157e72e831cb8f3 Likun Gao 2019-06-17 120 switch (adev->asic_type) { 157e72e831cb8f3 Likun Gao 2019-06-17 121 case CHIP_SIENNA_CICHLID: 157e72e831cb8f3 Likun Gao 2019-06-17 122 chip_name = "sienna_cichlid"; 157e72e831cb8f3 Likun Gao 2019-06-17 123 break; 157e72e831cb8f3 Likun Gao 2019-06-17 124 default: 157e72e831cb8f3 Likun Gao 2019-06-17 125 BUG(); 157e72e831cb8f3 Likun Gao 2019-06-17 126 } 157e72e831cb8f3 Likun Gao 2019-06-17 127 157e72e831cb8f3 Likun Gao 2019-06-17 128 for (i = 0; i < adev->sdma.num_instances; i++) { 157e72e831cb8f3 Likun Gao 2019-06-17 129 if (i == 0) 157e72e831cb8f3 Likun Gao 2019-06-17 @130 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma.bin", chip_name); 157e72e831cb8f3 Likun Gao 2019-06-17 131 else 157e72e831cb8f3 Likun Gao 2019-06-17 132 snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_sdma%d.bin", chip_name, i); 157e72e831cb8f3 Likun Gao 2019-06-17 133 err = request_firmware(&adev->sdma.instance[i].fw, fw_name, adev->dev); 157e72e831cb8f3 Likun Gao 2019-06-17 134 if (err) 157e72e831cb8f3 Likun Gao 2019-06-17 135 goto out; 157e72e831cb8f3 Likun Gao 2019-06-17 136 err = amdgpu_ucode_validate(adev->sdma.instance[i].fw); 157e72e831cb8f3 Likun Gao 2019-06-17 137 if (err) 157e72e831cb8f3 Likun Gao 2019-06-17 138 goto out; 157e72e831cb8f3 Likun Gao 2019-06-17 139 hdr = (const struct sdma_firmware_header_v1_0 *)adev->sdma.instance[i].fw->data; 157e72e831cb8f3 Likun Gao 2019-06-17 140 adev->sdma.instance[i].fw_version = le32_to_cpu(hdr->header.ucode_version); 157e72e831cb8f3 Likun Gao 2019-06-17 141 adev->sdma.instance[i].feature_version = le32_to_cpu(hdr->ucode_feature_version); 157e72e831cb8f3 Likun Gao 2019-06-17 142 if (adev->sdma.instance[i].feature_version >= 20) 157e72e831cb8f3 Likun Gao 2019-06-17 143 adev->sdma.instance[i].burst_nop = true; 157e72e831cb8f3 Likun Gao 2019-06-17 144 DRM_DEBUG("psp_load == '%s'\n", 157e72e831cb8f3 Likun Gao 2019-06-17 145 adev->firmware.load_type == AMDGPU_FW_LOAD_PSP ? "true" : "false"); 157e72e831cb8f3 Likun Gao 2019-06-17 146 157e72e831cb8f3 Likun Gao 2019-06-17 147 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { 157e72e831cb8f3 Likun Gao 2019-06-17 148 info = &adev->firmware.ucode[AMDGPU_UCODE_ID_SDMA0 + i]; 157e72e831cb8f3 Likun Gao 2019-06-17 149 info->ucode_id = AMDGPU_UCODE_ID_SDMA0 + i; 157e72e831cb8f3 Likun Gao 2019-06-17 150 info->fw = adev->sdma.instance[i].fw; 157e72e831cb8f3 Likun Gao 2019-06-17 151 header = (const struct common_firmware_header *)info->fw->data; 157e72e831cb8f3 Likun Gao 2019-06-17 152 adev->firmware.fw_size += 157e72e831cb8f3 Likun Gao 2019-06-17 153 ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE); 157e72e831cb8f3 Likun Gao 2019-06-17 154 } 157e72e831cb8f3 Likun Gao 2019-06-17 155 } 157e72e831cb8f3 Likun Gao 2019-06-17 156 out: 157e72e831cb8f3 Likun Gao 2019-06-17 157 if (err) { 157e72e831cb8f3 Likun Gao 2019-06-17 158 DRM_ERROR("sdma_v5_2: Failed to load firmware \"%s\"\n", fw_name); 157e72e831cb8f3 Likun Gao 2019-06-17 159 for (i = 0; i < adev->sdma.num_instances; i++) { 157e72e831cb8f3 Likun Gao 2019-06-17 160 release_firmware(adev->sdma.instance[i].fw); 157e72e831cb8f3 Likun Gao 2019-06-17 161 adev->sdma.instance[i].fw = NULL; 157e72e831cb8f3 Likun Gao 2019-06-17 162 } 157e72e831cb8f3 Likun Gao 2019-06-17 163 } 157e72e831cb8f3 Likun Gao 2019-06-17 164 return err; 157e72e831cb8f3 Likun Gao 2019-06-17 165 } 157e72e831cb8f3 Likun Gao 2019-06-17 166 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
