drm/amd/display: Don't pass invalid fw_bss_data pointer into DMUB srv
[Why] If bss_data_size is 0 then we shouldn't be passing down fw_bss_data into the DMUB service since the region isn't really "valid." [How] Pass NULL instead if the size is 0. Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> Reviewed-by: Zhan Liu <Zhan.Liu@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
08a512d4ab
commit
0922b899f3
|
@ -1228,10 +1228,10 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
|
|||
PSP_HEADER_BYTES - PSP_FOOTER_BYTES;
|
||||
region_params.bss_data_size = le32_to_cpu(hdr->bss_data_bytes);
|
||||
region_params.vbios_size = adev->bios_size;
|
||||
region_params.fw_bss_data =
|
||||
region_params.fw_bss_data = region_params.bss_data_size ?
|
||||
adev->dm.dmub_fw->data +
|
||||
le32_to_cpu(hdr->header.ucode_array_offset_bytes) +
|
||||
le32_to_cpu(hdr->inst_const_bytes);
|
||||
le32_to_cpu(hdr->inst_const_bytes) : NULL;
|
||||
region_params.fw_inst_const =
|
||||
adev->dm.dmub_fw->data +
|
||||
le32_to_cpu(hdr->header.ucode_array_offset_bytes) +
|
||||
|
|
Loading…
Reference in New Issue