<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 17.01.2018 um 15:22 schrieb Deucher,
Alexander:<br>
</div>
<blockquote type="cite"
cite="mid:BN6PR12MB1652DE27EE111B57EC39AA78F7E90@BN6PR12MB1652.namprd12.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color:
rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif,
"EmojiFont", "Apple Color Emoji",
"Segoe UI Emoji", NotoColorEmoji, "Segoe UI
Symbol", "Android Emoji", EmojiSymbols;"
dir="ltr">
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt"
face="Calibri, sans-serif" color="#000000"><b>From:</b>
amd-gfx <a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx-bounces@lists.freedesktop.org"><amd-gfx-bounces@lists.freedesktop.org></a> on
behalf of Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:ckoenig.leichtzumerken@gmail.com"><ckoenig.leichtzumerken@gmail.com></a><br>
<b>Sent:</b> Wednesday, January 17, 2018 7:42 AM<br>
<b>To:</b> Alex Deucher<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> Re: [PATCH 10/21] drm/amdgpu: wire up
emit_wreg for UVD v6</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span
style="font-size:11pt;">
<div class="PlainText">Am 16.01.2018 um 21:01 schrieb
Alex Deucher:<br>
> On Tue, Jan 16, 2018 at 2:40 PM, Christian König<br>
> <a class="moz-txt-link-rfc2396E" href="mailto:ckoenig.leichtzumerken@gmail.com"><ckoenig.leichtzumerken@gmail.com></a> wrote:<br>
>> Needed for vm_flush unification.<br>
>><br>
>> Signed-off-by: Christian König
<a class="moz-txt-link-rfc2396E" href="mailto:christian.koenig@amd.com"><christian.koenig@amd.com></a><br>
>> ---<br>
>> drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 12
++++++++++++<br>
>> 1 file changed, 12 insertions(+)<br>
>><br>
>> diff --git
a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> index c6e22eff89e7..b48b843c66ae 100644<br>
>> --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c<br>
>> @@ -1059,6 +1059,17 @@ static void
uvd_v6_0_enc_ring_emit_ib(struct amdgpu_ring *ring,<br>
>> amdgpu_ring_write(ring,
ib->length_dw);<br>
>> }<br>
>><br>
>> +static void uvd_v6_0_ring_emit_wreg(struct
amdgpu_ring *ring,<br>
>> + uint32_t
reg, uint32_t val)<br>
>> +{<br>
>> + amdgpu_ring_write(ring,
PACKET0(mmUVD_GPCOM_VCPU_DATA0, 0));<br>
>> + amdgpu_ring_write(ring, reg <<
2);<br>
>> + amdgpu_ring_write(ring,
PACKET0(mmUVD_GPCOM_VCPU_DATA1, 0));<br>
>> + amdgpu_ring_write(ring, val);<br>
>> + amdgpu_ring_write(ring,
PACKET0(mmUVD_GPCOM_VCPU_CMD, 0));<br>
>> + amdgpu_ring_write(ring, 0x8);<br>
> Is this valid on UVD6?<br>
<br>
This is valid on the decode ring of UVD6, only the
HEVC UVD6 encode and <br>
VCE3 rings use different commands.<br>
<br>
> I think this may be a UVD7 thing. Looking at<br>
> the other UVD code, I think we just want:<br>
> amdgpu_ring_write(ring, PACKET0(reg,
0));<br>
> amdgpu_ring_write(ring, val);<br>
<br>
IIRC that won't work. The UVD RBC can only write to
UVD registers using <br>
the PACKET0 command.</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">We probably need to fix a bunch
of functions in uvd4,5,6,7 in that case which use
packet0 directly to write non-UVD registers.<br>
</div>
</span></font></div>
</div>
</div>
</blockquote>
<br>
Yeah, I see. I briefly remember that I questioned if this works or
not two years ago when we added the code.<br>
<br>
Going to wire things up correctly with the new wreg callback.<br>
<br>
Christian.<br>
<br>
<blockquote type="cite"
cite="mid:BN6PR12MB1652DE27EE111B57EC39AA78F7E90@BN6PR12MB1652.namprd12.prod.outlook.com">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color:
rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif,
"EmojiFont", "Apple Color Emoji",
"Segoe UI Emoji", NotoColorEmoji, "Segoe UI
Symbol", "Android Emoji", EmojiSymbols;"
dir="ltr">
<div style="color: rgb(0, 0, 0);">
<div class="BodyFragment"><font size="2"><span
style="font-size:11pt;">
<div class="PlainText">
</div>
<div class="PlainText"><br>
</div>
<div class="PlainText">Alex<br>
</div>
<div class="PlainText"><br>
<br>
Regards,<br>
Christian.<br>
<br>
><br>
> Alex<br>
><br>
><br>
>> +}<br>
>> +<br>
>> static void
uvd_v6_0_ring_emit_vm_flush(struct amdgpu_ring *ring,<br>
>>
unsigned vmid, unsigned pasid,<br>
>>
uint64_t pd_addr)<br>
>> @@ -1595,6 +1606,7 @@ static const struct
amdgpu_ring_funcs uvd_v6_0_ring_vm_funcs = {<br>
>> .pad_ib =
amdgpu_ring_generic_pad_ib,<br>
>> .begin_use =
amdgpu_uvd_ring_begin_use,<br>
>> .end_use = amdgpu_uvd_ring_end_use,<br>
>> + .emit_wreg = uvd_v6_0_ring_emit_wreg,<br>
>> };<br>
>><br>
>> static const struct amdgpu_ring_funcs
uvd_v6_0_enc_ring_vm_funcs = {<br>
>> --<br>
>> 2.14.1<br>
>><br>
>>
_______________________________________________<br>
>> amd-gfx mailing list<br>
>> <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
>> <a
href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
id="LPlnk963697" previewremoved="true"
moz-do-not-send="true">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
<a
href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx"
id="LPlnk476865" previewremoved="true"
moz-do-not-send="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</div>
</blockquote>
<br>
</body>
</html>