All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Nirmoy Das <nirmoy.das@amd.com>,
	amd-gfx list <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device
Date: Mon, 8 Mar 2021 21:36:40 +0100	[thread overview]
Message-ID: <632651ac-d622-f34c-6af5-aa787dce44be@amd.com> (raw)
In-Reply-To: <CADnq5_NJJu3h==aqvhx4Cb+ScD4Yk6PtktYOxWxreBa8trL5oQ@mail.gmail.com>

Am 08.03.21 um 21:34 schrieb Alex Deucher:
> On Mon, Mar 8, 2021 at 3:20 PM Christian König <christian.koenig@amd.com> wrote:
>> Am 08.03.21 um 16:37 schrieb Nirmoy Das:
>>> FB BO should not be ttm_bo_type_kernel type and
>>> amdgpufb_create_pinned_object() pins the FB BO anyway.
>> Mhm, why the heck was that a kernel object?
> Maybe because the fbcon was the main user for this historically and
> the code was copied from radeon which also still sets it to kernel.

That's most likely wrong for radeon as well.

All BOs which can be mapped using mmap() into an userspace process 
should be of type device if I'm not completely mistaken.

Going to double check that stuff when I have time.

Thanks for pointing this out Nirmoy.

Christian.

>
> Alex
>
>>> 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);
>>>        if (ret) {
>>>                pr_err("failed to allocate framebuffer (%d)\n", aligned_size);
>>>                return -ENOMEM;
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cchristian.koenig%40amd.com%7Cbe4189aa363c4f65f38208d8e271949e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637508324745711394%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=NYv5BaFhU7hahVnN4e086QFv71GAXEZLeFnn2esK04o%3D&amp;reserved=0

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

  reply	other threads:[~2021-03-08 20:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 15:37 [PATCH 1/5] drm/amdgpu: allow variable BO struct creation Nirmoy Das
2021-03-08 15:37 ` [PATCH 2/5] drm/amdgpu: introduce struct amdgpu_bo_user Nirmoy Das
2021-03-08 20:24   ` Christian König
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 [this message]
2021-03-08 15:37 ` [PATCH 4/5] drm/amdgpu: use amdgpu_bo_create_user() for when possible Nirmoy Das
2021-03-08 15:37 ` [PATCH 5/5] drm/amdgpu: use amdgpu_bo_user bo for metadata and tiling flag Nirmoy Das
2021-03-08 20:23   ` Christian König
2021-03-08 18:12 ` [PATCH 1/5] drm/amdgpu: allow variable BO struct creation Christian König
2021-03-09  8:46 [PATCH v2 " Nirmoy Das
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

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=632651ac-d622-f34c-6af5-aa787dce44be@amd.com \
    --to=christian.koenig@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --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.