Re: [PATCH 3/5] drm/amdgpu: fb BO should be ttm_bo_type_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 08.03.21 um 21:34 schrieb Alex Deucher:
On Mon, Mar 8, 2021 at 3:20 PM Christian König <christian.koenig@xxxxxxx> 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@xxxxxxx>
Acked-by: Christian König <christian.koenig@xxxxxxx>

---
   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@xxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux