[Mesa-dev] [PATCH] radeonsi: set SLC for atomics and coherent ops on APUs
Alex Deucher
alexdeucher at gmail.com
Fri Apr 15 14:15:16 UTC 2016
On Thu, Apr 14, 2016 at 5:55 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> On 14.04.2016 10:36, Nicolai Hähnle wrote:
>>
>> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>>
>> ---
>> Hi Michel,
>>
>> perhaps we have to set the SLC (system level coherent) bit for images and
>> buffers that may be accessed via GTT. Could you give this patch a try?
>
>
> This change may or may not be needed, but it is insufficient for fixing the
> problems on my Carrizo.
Maybe adjust the setting of mmSH_MEM_CONFIG in the kernel?
Alex
>
> Cheers,
> Nicolai
>
>
>>
>> Thanks,
>> Nicolai
>> ---
>> src/gallium/drivers/radeonsi/si_shader.c | 12 ++++++++++--
>> 1 file changed, 10 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/gallium/drivers/radeonsi/si_shader.c
>> b/src/gallium/drivers/radeonsi/si_shader.c
>> index c58467d..53e9adb 100644
>> --- a/src/gallium/drivers/radeonsi/si_shader.c
>> +++ b/src/gallium/drivers/radeonsi/si_shader.c
>> @@ -2939,7 +2939,11 @@ static void image_append_args(
>> inst->Memory.Qualifier & (TGSI_MEMORY_COHERENT |
>> TGSI_MEMORY_VOLATILE) ?
>> i1true : i1false; /* glc */
>> }
>> - emit_data->args[emit_data->arg_count++] = i1false; /* slc */
>> + emit_data->args[emit_data->arg_count++] =
>> + !ctx->screen->b.info.has_dedicated_vram &&
>> + (atomic ||
>> + (inst->Memory.Qualifier & (TGSI_MEMORY_COHERENT |
>> TGSI_MEMORY_VOLATILE))) ?
>> + i1true : i1false; /* slc */
>> }
>>
>> /**
>> @@ -2988,7 +2992,11 @@ static void buffer_append_args(
>> inst->Memory.Qualifier & (TGSI_MEMORY_COHERENT |
>> TGSI_MEMORY_VOLATILE) ?
>> i1true : i1false; /* glc */
>> }
>> - emit_data->args[emit_data->arg_count++] = i1false; /* slc */
>> + emit_data->args[emit_data->arg_count++] =
>> + !ctx->screen->b.info.has_dedicated_vram &&
>> + (atomic ||
>> + (inst->Memory.Qualifier & (TGSI_MEMORY_COHERENT |
>> TGSI_MEMORY_VOLATILE))) ?
>> + i1true : i1false; /* slc */
>> }
>>
>> static void load_fetch_args(
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list