<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 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> Wednesday, February 20, 2019 7:47 AM<br>
<b>To:</b> michael.d.labriola@gmail.com; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> [PATCH] drm/amdgpu: fix dma mask check in gmc_v6_0.c</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This got messed up by "drm: change func to better detect wether swiotlb<br>
is needed".<br>
<br>
Signed-off-by: Christian König <christian.koenig@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
index 9fc3296592fe..98fd9208877f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c<br>
@@ -886,7 +886,7 @@ static int gmc_v6_0_sw_init(void *handle)<br>
                 pci_set_consistent_dma_mask(adev->pdev, DMA_BIT_MASK(32));<br>
                 dev_warn(adev->dev, "amdgpu: No coherent DMA available.\n");<br>
         }<br>
-       adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);<br>
+       adev->need_swiotlb = drm_need_swiotlb(dma_bits);<br>
 <br>
         r = gmc_v6_0_init_microcode(adev);<br>
         if (r) {<br>
-- <br>
2.17.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">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>