tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip head: 6a77c1ba182d156a8b0b4057e23e8a01d9f451a7 commit: d49f1308cd52389f3ba64b0cd98c7a50ed83932a [62/85] drm/amdgpu:add VCN booting with firmware loaded by PSP reproduce: # apt-get install sparse git checkout d49f1308cd52389f3ba64b0cd98c7a50ed83932a make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:109:25: sparse: cast to restricted __le32 >> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:109:25: sparse: cast to restricted __le32 >> drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:109:25: sparse: cast to restricted __le32 vim +109 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c 67 68 /** 69 * vcn_v1_0_sw_init - sw init for VCN block 70 * 71 * @handle: amdgpu_device pointer 72 * 73 * Load firmware and sw initialization 74 */ 75 static int vcn_v1_0_sw_init(void *handle) 76 { 77 struct amdgpu_ring *ring; 78 int i, r; 79 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 80 81 /* VCN DEC TRAP */ 82 r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN, VCN_1_0__SRCID__UVD_SYSTEM_MESSAGE_INTERRUPT, &adev->vcn.irq); 83 if (r) 84 return r; 85 86 /* VCN ENC TRAP */ 87 for (i = 0; i < adev->vcn.num_enc_rings; ++i) { 88 r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN, i + VCN_1_0__SRCID__UVD_ENC_GENERAL_PURPOSE, 89 &adev->vcn.irq); 90 if (r) 91 return r; 92 } 93 94 /* VCN JPEG TRAP */ 95 r = amdgpu_irq_add_id(adev, SOC15_IH_CLIENTID_VCN, 126, &adev->vcn.irq); 96 if (r) 97 return r; 98 99 r = amdgpu_vcn_sw_init(adev); 100 if (r) 101 return r; 102 103 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { 104 const struct common_firmware_header *hdr; 105 hdr = (const struct common_firmware_header *)adev->vcn.fw->data; 106 adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].ucode_id = AMDGPU_UCODE_ID_VCN; 107 adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw; 108 adev->firmware.fw_size += > 109 ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE); 110 DRM_INFO("PSP loading VCN firmware\n"); 111 } 112 113 r = amdgpu_vcn_resume(adev); 114 if (r) 115 return r; 116 117 ring = &adev->vcn.ring_dec; 118 sprintf(ring->name, "vcn_dec"); 119 r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.irq, 0); 120 if (r) 121 return r; 122 123 for (i = 0; i < adev->vcn.num_enc_rings; ++i) { 124 ring = &adev->vcn.ring_enc[i]; 125 sprintf(ring->name, "vcn_enc%d", i); 126 r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.irq, 0); 127 if (r) 128 return r; 129 } 130 131 ring = &adev->vcn.ring_jpeg; 132 sprintf(ring->name, "vcn_jpeg"); 133 r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.irq, 0); 134 if (r) 135 return r; 136 137 return r; 138 } 139 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel