Displaying 2 results from an estimated 2 matches for "visible_vram_size".
2023 Jan 25
5
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
...buffer_object *bo)
if (bo->resource->mem_type != TTM_PL_VRAM)
return 0;
- offset = bo->resource->start << PAGE_SHIFT;
+ amdgpu_res_first(bo->resource, 0, bo->resource->size, &cursor);
+ offset = cursor.start;
if ((offset + bo->base.size) <= adev->gmc.visible_vram_size)
return 0;
@@ -1378,7 +1380,8 @@ vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
else if (unlikely(r))
return VM_FAULT_SIGBUS;
- offset = bo->resource->start << PAGE_SHIFT;
+ amdgpu_res_first(bo->resource, 0, bo->resource->size, &cursor);...
2023 Jan 25
0
[PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start
...resource->start << PAGE_SHIFT;
> + amdgpu_res_first(bo->resource, 0, bo->resource->size, &cursor);
> + offset = cursor.start;
That won't work like this. We use a virtual resource start for this
check here.
> if ((offset + bo->base.size) <= adev->gmc.visible_vram_size)
> return 0;
Just replace this whole test with calling amdgpu_bo_in_cpu_visible_vram().
>
> @@ -1378,7 +1380,8 @@ vm_fault_t amdgpu_bo_fault_reserve_notify(struct ttm_buffer_object *bo)
> else if (unlikely(r))
> return VM_FAULT_SIGBUS;
>
> - offset = bo->r...