[PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device
Nirmoy
nirmodas at amd.com
Tue Mar 9 14:33:45 UTC 2021
On 3/9/21 1:39 PM, Christian König wrote:
> Am 09.03.21 um 09:46 schrieb Nirmoy Das:
>> FB BO should not be ttm_bo_type_kernel type and
>> amdgpufb_create_pinned_object() pins the FB BO anyway.
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
>> Acked-by: Christian König <christian.koenig at amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> index 51cd49c6f38f..24010cacf7d0 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
>> @@ -146,7 +146,7 @@ static int amdgpufb_create_pinned_object(struct
>> amdgpu_fbdev *rfbdev,
>> size = mode_cmd->pitches[0] * height;
>> aligned_size = ALIGN(size, PAGE_SIZE);
>> ret = amdgpu_gem_object_create(adev, aligned_size, 0, domain,
>> flags,
>> - ttm_bo_type_kernel, NULL, &gobj);
>> + ttm_bo_type_device, NULL, &gobj);
>
> Can you double check if we still need the ttm_bo_type_* parameter to
> amdgpu_gem_object_create() after aligning this?
We need that in only one place:
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c --> amdgpu_dma_buf_create_obj()
445: ret = amdgpu_gem_object_create(adev, dma_buf->size, PAGE_SIZE,
446- AMDGPU_GEM_DOMAIN_CPU, flags,
447- ttm_bo_type_sg, resv, &gobj);
Nirmoy
>
> Thanks,
> Christian.
>
>> if (ret) {
>> pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
>> return -ENOMEM;
>
More information about the amd-gfx
mailing list