Hi All,
     I have a logical question when create buffer object in the amdgpu kernel 
driver code. My ARM64 architecture don't support WC memory , but in the driver 
, the VRAM BO still set WC flags.
At file: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
In function amdgpu_bo_do_create ,
it determine the bo->flags by the architectures like below:
         if (!drm_arch_can_wc_memory())
                   bo->flags &= ~AMDGPU_GEM_CREATE_CPU_GTT_USWC;
but then in the function : amdgpu_ttm_placement_from_domain(bo, domain); it 
still set  TTM_PL_FLAG_WC for the VRAM bo:

         if (domain & AMDGPU_GEM_DOMAIN_VRAM) {
                   unsigned visible_pfn = adev->mc.visible_vram_size >> 
PAGE_SHIFT;

                   places[c].fpfn = 0;
                   places[c].lpfn = 0;
                   places[c].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED |
                            TTM_PL_FLAG_VRAM;
                  ......
}

     I want to know why vram always with WC flag even if the architecture don't 
support WC memory,  And in the architecture which are not support WC memory,  
vram bo with WC flag may cause some unpredicted  results ?



_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to