<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">
<p style="font-family:Arial;font-size:10pt;color:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Add:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Bug: <a href="https://bugzilla.kernel.org/show_bug.cgi?id=215600" id="LPlnk149304">
https://bugzilla.kernel.org/show_bug.cgi?id=215600</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
With that:<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com><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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken@gmail.com><br>
<b>Sent:</b> Monday, February 21, 2022 6:05 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Koenig, Christian <Christian.Koenig@amd.com><br>
<b>Subject:</b> [PATCH] drm/radeon: fix variable type</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">When we switch to dma_resv_wait_timeout() the returned type changes as<br>
well.<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
Fixes: 89aae41d740f ("drm/radeon: use dma_resv_wait_timeout() instead of manually waiting")<br>
---<br>
drivers/gpu/drm/radeon/radeon_uvd.c | 8 ++++----<br>
1 file changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c<br>
index 377f9cdb5b53..84013faa4756 100644<br>
--- a/drivers/gpu/drm/radeon/radeon_uvd.c<br>
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c<br>
@@ -470,8 +470,8 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,<br>
int32_t *msg, msg_type, handle;<br>
unsigned img_size = 0;<br>
void *ptr;<br>
-<br>
- int i, r;<br>
+ long r;<br>
+ int i;<br>
<br>
if (offset & 0x3F) {<br>
DRM_ERROR("UVD messages must be 64 byte aligned!\n");<br>
@@ -481,13 +481,13 @@ static int radeon_uvd_cs_msg(struct radeon_cs_parser *p, struct radeon_bo *bo,<br>
r = dma_resv_wait_timeout(bo->tbo.base.resv, false, false,<br>
MAX_SCHEDULE_TIMEOUT);<br>
if (r <= 0) {<br>
- DRM_ERROR("Failed waiting for UVD message (%d)!\n", r);<br>
+ DRM_ERROR("Failed waiting for UVD message (%ld)!\n", r);<br>
return r ? r : -ETIME;<br>
}<br>
<br>
r = radeon_bo_kmap(bo, &ptr);<br>
if (r) {<br>
- DRM_ERROR("Failed mapping the UVD message (%d)!\n", r);<br>
+ DRM_ERROR("Failed mapping the UVD message (%ld)!\n", r);<br>
return r;<br>
}<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>