提交 65cef153 编写于 作者: S Shirish S 提交者: Zheng Zengkai

drm/amdgpu/display: fix DMUB firmware version info

stable inclusion
from stable-5.10.58
commit dd3f7c5c890450ab2ad6f269a3fdf7bcd6fc2908
bugzilla: 176984 https://gitee.com/openeuler/kernel/issues/I4E2P4

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=dd3f7c5c890450ab2ad6f269a3fdf7bcd6fc2908

--------------------------------

commit 0e99e960 upstream.

DMUB firmware info is printed before it gets initialized.
Correct this order to ensure true value is conveyed.
Signed-off-by: NShirish S <shirish.s@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e68773bc
...@@ -1301,6 +1301,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) ...@@ -1301,6 +1301,7 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
} }
hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data; hdr = (const struct dmcub_firmware_header_v1_0 *)adev->dm.dmub_fw->data;
adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id = adev->firmware.ucode[AMDGPU_UCODE_ID_DMCUB].ucode_id =
...@@ -1314,7 +1315,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev) ...@@ -1314,7 +1315,6 @@ static int dm_dmub_sw_init(struct amdgpu_device *adev)
adev->dm.dmcub_fw_version); adev->dm.dmcub_fw_version);
} }
adev->dm.dmcub_fw_version = le32_to_cpu(hdr->header.ucode_version);
adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL); adev->dm.dmub_srv = kzalloc(sizeof(*adev->dm.dmub_srv), GFP_KERNEL);
dmub_srv = adev->dm.dmub_srv; dmub_srv = adev->dm.dmub_srv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册