<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<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">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
<br>
<br>
<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 <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Friday, January 26, 2018 8:24 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix vcn_v1_0_dec_ring_emit_wreg</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">That got mixed up with the encode ring function.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 19 ++++++++++++++++++-<br>
1 file changed, 18 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
index 44c041a1fe68..24ebc3e296a6 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c<br>
@@ -880,6 +880,22 @@ static void vcn_v1_0_dec_ring_emit_vm_flush(struct amdgpu_ring *ring,<br>
vcn_v1_0_dec_vm_reg_wait(ring, data0, data1, mask);<br>
}<br>
<br>
+static void vcn_v1_0_dec_ring_emit_wreg(struct amdgpu_ring *ring,<br>
+ uint32_t reg, uint32_t val)<br>
+{<br>
+ struct amdgpu_device *adev = ring->adev;<br>
+<br>
+ amdgpu_ring_write(ring,<br>
+ PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_GPCOM_VCPU_DATA0), 0));<br>
+ amdgpu_ring_write(ring, reg << 2);<br>
+ amdgpu_ring_write(ring,<br>
+ PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_GPCOM_VCPU_DATA1), 0));<br>
+ amdgpu_ring_write(ring, val);<br>
+ amdgpu_ring_write(ring,<br>
+ PACKET0(SOC15_REG_OFFSET(UVD, 0, mmUVD_GPCOM_VCPU_CMD), 0));<br>
+ amdgpu_ring_write(ring, VCN_DEC_CMD_WRITE_REG << 1);<br>
+}<br>
+<br>
/**<br>
* vcn_v1_0_enc_ring_get_rptr - get enc read pointer<br>
*<br>
@@ -1097,7 +1113,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_dec_ring_vm_funcs = {<br>
.pad_ib = amdgpu_ring_generic_pad_ib,<br>
.begin_use = amdgpu_vcn_ring_begin_use,<br>
.end_use = amdgpu_vcn_ring_end_use,<br>
- .emit_wreg = vcn_v1_0_enc_ring_emit_wreg,<br>
+ .emit_wreg = vcn_v1_0_dec_ring_emit_wreg,<br>
};<br>
<br>
static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = {<br>
@@ -1124,6 +1140,7 @@ static const struct amdgpu_ring_funcs vcn_v1_0_enc_ring_vm_funcs = {<br>
.pad_ib = amdgpu_ring_generic_pad_ib,<br>
.begin_use = amdgpu_vcn_ring_begin_use,<br>
.end_use = amdgpu_vcn_ring_end_use,<br>
+ .emit_wreg = vcn_v1_0_enc_ring_emit_wreg,<br>
};<br>
<br>
static void vcn_v1_0_set_dec_ring_funcs(struct amdgpu_device *adev)<br>
-- <br>
2.14.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" id="LPlnk314177" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>