<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:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Thanks, I'll push this today after I get a RB/ACK/NAK on the last two cleanups</p>
<p><br>
</p>
<p><a href="https://lists.freedesktop.org/archives/amd-gfx/2016-September/002039.html" class="OWAAutoLink" id="LPlnk756299">https://lists.freedesktop.org/archives/amd-gfx/2016-September/002039.html</a><br>
</p>
<p><br>
</p>
<p>(note: I changed one of the dev_warn to dev_err to match the original message type)</p>
<p><br>
</p>
<p>and</p>
<p><br>
</p>
<p><a href="https://lists.freedesktop.org/archives/amd-gfx/2016-September/002042.html" class="OWAAutoLink" id="LPlnk212711">https://lists.freedesktop.org/archives/amd-gfx/2016-September/002042.html</a><br>
</p>
<p><br>
</p>
<p>Tom</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Christian König <deathsimple@vodafone.de><br>
<b>Sent:</b> Wednesday, September 7, 2016 08:33<br>
<b>To:</b> Tom St Denis; amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> StDenis, Tom<br>
<b>Subject:</b> Re: [PATCH] drm/amd/amdgpu: Remove double lock from gfx v6</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Am 07.09.2016 um 14:07 schrieb Tom St Denis:<br>
> The function gfx_v6_0_get_cu_info() was taking the<br>
> grbm_idx_mutex which was then taken by a dependent<br>
> function gfx_v6_0_get_cu_active_bitmap().<br>
><br>
> This patch removes the select from the parent function<br>
> to avoid the double lock.<br>
><br>
> Signed-off-by: Tom St Denis <tom.stdenis@amd.com><br>
<br>
Reviewed-by: Christian König <christian.koenig@amd.com><br>
<br>
> ---<br>
>   drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c | 4 ----<br>
>   1 file changed, 4 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
> index a6b76170b9c5..a1484b8f7eb2 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c<br>
> @@ -3193,13 +3193,11 @@ static void gfx_v6_0_get_cu_info(struct amdgpu_device *adev)<br>
>   <br>
>        memset(cu_info, 0, sizeof(*cu_info));<br>
>   <br>
> -     mutex_lock(&adev->grbm_idx_mutex);<br>
>        for (i = 0; i < adev->gfx.config.max_shader_engines; i++) {<br>
>                for (j = 0; j < adev->gfx.config.max_sh_per_se; j++) {<br>
>                        mask = 1;<br>
>                        ao_bitmap = 0;<br>
>                        counter = 0;<br>
> -                     gfx_v6_0_select_se_sh(adev, i, j, 0xffffffff);<br>
>                        bitmap = gfx_v6_0_get_cu_active_bitmap(adev, i, j);<br>
>                        cu_info->bitmap[i][j] = bitmap;<br>
>   <br>
> @@ -3215,8 +3213,6 @@ static void gfx_v6_0_get_cu_info(struct amdgpu_device *adev)<br>
>                        ao_cu_mask |= (ao_bitmap << (i * 16 + j * 8));<br>
>                }<br>
>        }<br>
> -     gfx_v6_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);<br>
> -     mutex_unlock(&adev->grbm_idx_mutex);<br>
>   <br>
>        cu_info->number = active_cu_number;<br>
>        cu_info->ao_cu_mask = ao_cu_mask;<br>
<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>