From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Nirmoy <nirmodas@amd.com>, Nirmoy Das <nirmoy.das@amd.com>,
Christian.Koenig@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device
Date: Tue, 9 Mar 2021 16:08:15 +0100 [thread overview]
Message-ID: <c9c9d0cc-b970-c1e0-e158-eaf8177ff1f1@gmail.com> (raw)
In-Reply-To: <889d26bb-4281-f9be-6f72-a96f7359b572@amd.com>
Am 09.03.21 um 15:33 schrieb Nirmoy:
>
> 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@amd.com>
>>> Acked-by: Christian König <christian.koenig@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);
Ah, of course that makese sense.
Thanks,
Christian.
>
>
>
> Nirmoy
>
>>
>> Thanks,
>> Christian.
>>
>>> if (ret) {
>>> pr_err("failed to allocate framebuffer (%d)\n",
>>> aligned_size);
>>> return -ENOMEM;
>>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-03-09 15:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 8:46 [PATCH v2 1/5] drm/amdgpu: allow variable BO struct creation Nirmoy Das
2021-03-09 8:46 ` [PATCH v2 2/5] drm/amdgpu: introduce struct amdgpu_bo_user Nirmoy Das
2021-03-09 12:37 ` Christian König
2021-03-09 8:46 ` [PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device Nirmoy Das
2021-03-09 12:39 ` Christian König
2021-03-09 14:33 ` Nirmoy
2021-03-09 15:08 ` Christian König [this message]
2021-03-09 8:46 ` [PATCH 4/5] drm/amdgpu: use amdgpu_bo_create_user() for when possible Nirmoy Das
2021-03-09 12:40 ` Christian König
2021-03-09 8:46 ` [PATCH v3 5/5] drm/amdgpu: use amdgpu_bo_user bo for metadata and tiling flag Nirmoy Das
2021-03-09 12:42 ` Christian König
2021-03-09 12:36 ` [PATCH v2 1/5] drm/amdgpu: allow variable BO struct creation Christian König
2021-03-10 22:17 ` Felix Kuehling
-- strict thread matches above, loose matches on Subject: below --
2021-03-08 15:37 [PATCH " Nirmoy Das
2021-03-08 15:37 ` [PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device Nirmoy Das
2021-03-08 20:20 ` Christian König
2021-03-08 20:34 ` Alex Deucher
2021-03-08 20:36 ` Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9c9d0cc-b970-c1e0-e158-eaf8177ff1f1@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Christian.Koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=nirmodas@amd.com \
--cc=nirmoy.das@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.