<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Thanks, I need to get familiar with all of the tags <span style="font-family:"Segoe UI Emoji",sans-serif">
😊</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Kent<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Deucher, Alexander <Alexander.Deucher@amd.com> <br>
<b>Sent:</b> Monday, June 17, 2019 11:24 AM<br>
<b>To:</b> Russell, Kent <Kent.Russell@amd.com>; Alex Deucher <alexdeucher@gmail.com>; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">I'll make that a tested-by.  Thanks!<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Alex<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Russell, Kent<br>
<b>Sent:</b> Monday, June 17, 2019 11:14 AM<br>
<b>To:</b> Alex Deucher; <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<b>Cc:</b> Deucher, Alexander<br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: wait to fetch the vbios until after common init</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal">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 <<a href="mailto:kent.russell@amd.com">kent.russell@amd.com</a>><br>
<br>
 Kent<br>
<br>
-----Original Message-----<br>
From: amd-gfx <<a href="mailto:amd-gfx-bounces@lists.freedesktop.org">amd-gfx-bounces@lists.freedesktop.org</a>> On Behalf Of Alex Deucher<br>
Sent: Monday, June 17, 2019 10:45 AM<br>
To: <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>><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 <<a href="mailto:alexander.deucher@amd.com">alexander.deucher@amd.com</a>><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>
<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>