[PATCH] dmr/amdgpu: Fix wrongly unref of BO

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

 



Hi Christian,


I read amdgpu_ttm_io_mem_reserve() and amdgpu_ttm_io_mem_free() and relevant codes from amdgpu_vram_scratch_init and amdgpu_vram_scratch_fini.


No. For the current source code, I think the premap and no-op is not working.


I add printk to prove. You can see bo_kmap_type is an invalid value. ioremap_wc is really called to map the IO range into vmalloc space.


...

Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759623] entering amdgpu_vram_scratch_init.
Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759631] scratch ioremap_wc
Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759631] bo_kmap_type = 129
Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759632] bus address =           (null)
Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759632] is_iomem = 1
Apr 20 16:31:18 axie-System-Product-Name kernel: [  106.759633] leaving amdgpu_vram_scratch_init.
...

I don't have log on rmmod AMDGPU yet. There are quite some settings to make that happen in my computer.
I think they are symemtric. Both mapping and unmapping are not no-op.

Here is the printk patch for your reference.


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

  Powered by Linux