On 10/01/2019 16:16, Ard Biesheuvel wrote:
> On Thu, 10 Jan 2019 at 17:14, Carsten Haitzler <carsten.haitz...@arm.com> 
> wrote:
>> On 09/01/2019 21:10, Ard Biesheuvel wrote:
>>
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> @@ -180,7 +180,9 @@ void amdgpu_bo_placement_from_domain(struct
>> amdgpu_bo *abo, u32 domain)
>>                 places[c].fpfn = 0;
>>                 places[c].lpfn = 0;
>>                 places[c].flags = TTM_PL_FLAG_SYSTEM;
>> -               if (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC)
>> +               if (!IS_ENABLED(CONFIG_ARM64) &&
>> +                   !IS_ENABLED(CONFIG_ARM) &&
>> +                   (flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC))
>>                         places[c].flags |= TTM_PL_FLAG_WC |
>>                                 TTM_PL_FLAG_UNCACHED;
>>                 else
>>
>> Patch fails against my mainline Linux tree. which section does it modify?
>>
>>         if (domain & AMDGPU_GEM_DOMAIN_GTT) {
>>
>> or
>>
>>         if (domain & AMDGPU_GEM_DOMAIN_CPU) {
>>
>> it looks like it should be the latter. You'd need similar changes to radeon 
>> as well right?
>>
> This is the radeon change that fixes things for me carried over to amdgpu.
>
> Instead, you could test the patch I posted, which amounts to the same
> thing (i.e., ignore the WC flag, since afaict, it is only ever used to
> downgrade from cached mappings, rather than upgrade from uncached)

That's precisely what I was doing (copy and paste to a tmp txt file, fix
the spurious line wrap after that) and the patch failed, so I asked what
it was meant to patch to make sure I manually edit the right if () in
the amdgpu driver since patching fails.

I also know the radeon code has similar code in it too and that also
probably would need fixes if that driver also were to be fixed as the
shared function that I patched no longer alters behavior over in radeon
land if all I do is apply the patch you pasted and undo my patch as you
indicated. I asked to make sure we're on the same page on this.

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
cross-distro mailing list
cross-distro@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/cross-distro

Reply via email to