<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'll make that a tested-by. Thanks!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Alex<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Russell, Kent<br>
<b>Sent:</b> Monday, June 17, 2019 11:14 AM<br>
<b>To:</b> Alex Deucher; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Deucher, Alexander<br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This also worked. I don't think that I'm qualified enough to RB it, but you can add my<br>
<br>
Verified-By: Kent Russell <kent.russell@amd.com><br>
<br>
Kent<br>
<br>
-----Original Message-----<br>
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher<br>
Sent: Monday, June 17, 2019 10:45 AM<br>
To: amd-gfx@lists.freedesktop.org<br>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com><br>
Subject: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init<br>
<br>
We need the asic_funcs set for the get rom callbacks in some cases.<br>
<br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 24 ++++++++++++----------<br>
1 file changed, 13 insertions(+), 11 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index 4a836db1000f..e26303bc567e 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -1534,17 +1534,6 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)<br>
if (amdgpu_sriov_vf(adev))<br>
adev->pm.pp_feature &= ~PP_GFXOFF_MASK;<br>
<br>
- /* Read BIOS */<br>
- if (!amdgpu_get_bios(adev))<br>
- return -EINVAL;<br>
-<br>
- r = amdgpu_atombios_init(adev);<br>
- if (r) {<br>
- dev_err(adev->dev, "amdgpu_atombios_init failed\n");<br>
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);<br>
- return r;<br>
- }<br>
-<br>
for (i = 0; i < adev->num_ip_blocks; i++) {<br>
if ((amdgpu_ip_block_mask & (1 << i)) == 0) {<br>
DRM_ERROR("disabled ip block: %d <%s>\n", @@ -1566,6 +1555,19 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)<br>
adev->ip_blocks[i].status.valid = true;<br>
}<br>
}<br>
+ /* get the vbios after the asic_funcs are set up */<br>
+ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {<br>
+ /* Read BIOS */<br>
+ if (!amdgpu_get_bios(adev))<br>
+ return -EINVAL;<br>
+<br>
+ r = amdgpu_atombios_init(adev);<br>
+ if (r) {<br>
+ dev_err(adev->dev, "amdgpu_atombios_init failed\n");<br>
+ amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ATOMBIOS_INIT_FAIL, 0, 0);<br>
+ return r;<br>
+ }<br>
+ }<br>
}<br>
<br>
adev->cg_flags &= amdgpu_cg_mask;<br>
--<br>
2.20.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>