<div dir="ltr">Just a quick update: things a getting into shape slowly since my paternal vacancy is over, but I'm still progressing. I'm debugging things as I can. I managed to work around the missing header with the current firmware after analyzing what it contains and where it is used.<div><br></div><div>I'm more interested than ever to have VCE and UVD ported to amdgpu, since we now have cards from the 300 series at work (one based on GCN 1, the other on GCN 2).</div><div><br></div><div>By the way, the R7 360 (based on GCN 2, Bonaire Pro) fails to load the amdgpu driver because of an error in VCE 2 implementation.</div><div><br></div><div>I'll keep you up to date.</div><div><br></div><div>Alexandre</div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, 14 Jun 2017 at 14:22 Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_4865710171043609442WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alexandre Demers [mailto:<a href="mailto:alexandre.f.demers@gmail.com" target="_blank">alexandre.f.demers@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, June 14, 2017 1:30 PM<br>
<b>To:</b> Deucher, Alexander; Christian König; Freedesktop - AMD-gfx</span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4865710171043609442WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""><br>
<b>Subject:</b> Re: Question about porting VCE1 to amdgpu<u></u><u></u></span></p></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4865710171043609442WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div>
<div>
<p class="MsoNormal">On Wed, 14 Jun 2017 at 13:09 Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com" target="_blank">Alexander.Deucher@amd.com</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> amd-gfx [mailto:<a href="mailto:amd-gfx-bounces@lists.freedesktop.org" target="_blank">amd-gfx-bounces@lists.freedesktop.org</a>]
<b>On Behalf Of </b>Christian König<br>
<b>Sent:</b> Wednesday, June 14, 2017 12:37 PM<br>
<b>To:</b> Alexandre Demers; Freedesktop - AMD-gfx<br>
<b>Subject:</b> Re: Question about porting VCE1 to amdgpu</span><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">- Would we need a different firmware version with a different "hdr" for the amdgpu driver?<u></u><u></u></p>
</blockquote>
<p class="MsoNormal" style="margin-bottom:12.0pt">Yes, we should probably release the latest one instead of reusing the one used with radeon.<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Actually, we should probably stick the same one as radeon for now until we can verify the new firmware
 in general.  Easier to start with a known working case.</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4865710171043609442WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div><div>
<p class="MsoNormal">OK. Then,  is it expected to have a validation failure with the current firmware? Is the header compatible with how the validation is done under VCE2 and others or should I keep how it was done under radeon?<u></u><u></u></p>
</div></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4865710171043609442WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">There is no header on the multi-media firmware from radeon, so you'd need to add one.  The header is documented in amdgpu_ucode.h,  All you'd need to do is
 prepend the header to the existing firmware image.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Alex<u></u><u></u></span></p>
</div></div></div></div></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_4865710171043609442WordSection1"><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
BTW: Does VCE work on CIK? Alex, don't we run into the same issue there as well?<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">VCE works on CIK.  We ported VCE and UVD to CIK as part of the initial amdgpu bring up.</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I've been using VCE2 port as my template for VCE1. My initial intention was to work on UVD, but I ended up plugging in VCE in the first place. UVD is on my todo list right next, I was expecting to working on it after fixing the VCE part.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Alex</span><u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">- Wouldn't it be better to continue loading the driver while having VCE disabled IF we fail when loading or validating the FW? Completely failing to load the driver for this reason
 seems overkill IMO, since nothing has been loaded in memory and no registry have been modified up to that point.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">UVD and VCE are actually needed for correct power management. When the blocks fail to initialize you usually sooner or later run into problems with power management (e.g. stuck inside
 a certain power level).<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">OK, but right now it is disabled, so the situation wouldn't be worst isn't it?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">- Would it be a good idea to send a patch as a RFC so some of you could help me finish the job and maybe pinpoint where the last modifications need to be done?<u></u><u></u></p>
</div>
<p class="MsoNormal">Well you could, but to be honest without AMD releasing new firmware that is most likely a futile effort.<u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I'll send a patch then, and we'll navigate from there. This will allow me to work on UVD in parallel.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Alexandre Demers<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<p class="MsoNormal"><br>
Regards,<br>
Christian.<br>
<br>
Am 14.06.2017 um 18:22 schrieb Alexandre Demers:<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">Hi,
<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I've been working on porting VCE1 from radeon to amdgpu in the last few weeks. I'm pretty much done and I've enabled the functionality to see how it goes. However, I ended up with
 an error on the firmware validation (size doesn't seem to fit), thus failing completely in loading the driver. I'm testing on a R9 280X (Tahiti).<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Three questions then:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Would we need a different firmware version with a different "hdr" for the amdgpu driver?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Wouldn't it be better to continue loading the driver while having VCE disabled IF we fail when loading or validating the FW? Completely failing to load the driver for this reason
 seems overkill IMO, since nothing has been loaded in memory and no registry have been modified up to that point.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">- Would it be a good idea to send a patch as a RFC so some of you could help me finish the job and maybe pinpoint where the last modifications need to be done?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you!<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Alexandre Demers<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<u></u><u></u></p>
<pre>_______________________________________________<u></u><u></u></pre>
<pre>amd-gfx mailing list<u></u><u></u></pre>
<pre><a href="mailto:amd-gfx@lists.freedesktop.org" target="_blank">amd-gfx@lists.freedesktop.org</a><u></u><u></u></pre>
<pre><a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><u></u><u></u></pre>
</blockquote>
<p> <u></u><u></u></p>
</div>
</div>
</div>
</blockquote>
</div></div></div></div></div></blockquote></div>