Marek Szyprowski
07dc3678ba
drm/exynos: Fix cleanup of IOMMU related objects
Store the IOMMU mapping created by the device core of each Exynos DRM
sub-device and restore it when the Exynos DRM driver is unbound. This
fixes IOMMU initialization failure for the second time when a deferred
probe is triggered from the bind() callback of master's compound DRM
driver. This also fixes the following issue found using kmemleak
detector:
unreferenced object 0xc2137640 (size 64):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
50 a3 14 c2 80 a2 14 c2 01 00 00 00 20 00 00 00 P........... ...
00 10 00 00 00 80 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xc214a280 (size 128):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 a0 ec ed 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xedeca000 (size 4096):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
[<8cd12507>] 0x0
unreferenced object 0xc214a300 (size 128):
comm "swapper/0", pid 1, jiffies 4294937900 (age 3127.400s)
hex dump (first 32 bytes):
00 a3 14 c2 00 a3 14 c2 00 40 18 c2 00 80 18 c2 .........@......
02 00 02 00 ad 4e ad de ff ff ff ff ff ff ff ff .....N..........
backtrace:
[<08cbd8bc>] iommu_domain_alloc+0x24/0x50
[<b835abee>] arm_iommu_create_mapping+0xe4/0x134
[<3acd268d>] arch_setup_dma_ops+0x4c/0x104
[<9f7d2cce>] of_dma_configure+0x19c/0x3a4
[<ba07704b>] really_probe+0xb0/0x47c
[<4f510e4f>] driver_probe_device+0x78/0x1c4
[<7481a0cf>] device_driver_attach+0x58/0x60
[<0ff8f5c1>] __driver_attach+0xb8/0x158
[<86006144>] bus_for_each_dev+0x74/0xb4
[<10159dca>] bus_add_driver+0x1c0/0x200
[<8a265265>] driver_register+0x74/0x108
[<e0f3451a>] exynos_drm_init+0xb0/0x134
[<db3fc7ba>] do_one_initcall+0x90/0x458
[<6da35917>] kernel_init_freeable+0x188/0x200
[<db3f74d4>] kernel_init+0x8/0x110
[<1f3cddf9>] ret_from_fork+0x14/0x20
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2020-03-10 13:25:18 +09:00
..
2020-02-28 09:02:18 -08:00
2020-01-29 18:53:37 -08:00
2020-02-06 06:11:50 +00:00
2020-01-28 16:02:33 -08:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-02-29 09:58:47 -06:00
2020-01-24 19:57:53 +01:00
2020-02-15 10:33:19 -08:00
2020-02-24 15:06:07 -05:00
2020-02-17 20:47:06 +02:00
2020-02-08 14:17:27 -08:00
2020-02-08 14:17:27 -08:00
2020-02-27 08:57:48 +01:00
2020-02-08 14:04:19 -08:00
2020-01-28 16:02:33 -08:00
2020-01-16 09:52:27 -08:00
2020-02-24 11:14:29 +09:00
2020-02-08 13:58:44 -08:00
2020-02-27 18:01:58 +05:30
2020-02-13 13:29:41 +01:00
2020-02-08 14:04:19 -08:00
2020-02-10 13:45:49 -08:00
2020-02-10 13:54:17 +01:00
2020-03-10 13:25:18 +09:00
2020-02-27 11:13:27 -08:00
2020-02-03 14:42:03 +00:00
2020-02-21 09:16:24 -08:00
2020-01-21 16:16:36 -08:00
2020-02-13 09:29:30 +01:00
2020-02-24 15:06:07 -05:00
2020-02-03 11:57:18 +01:00
2020-02-04 07:17:41 +00:00
2020-02-22 11:00:52 -08:00
2020-02-15 16:49:25 -08:00
2020-02-19 12:03:21 +01:00
2020-02-09 15:47:37 -08:00
2020-02-04 03:05:26 +00:00
2020-01-22 21:08:24 +01:00
2020-02-29 21:13:22 +01:00
2020-02-16 12:35:52 -08:00
2020-02-04 07:17:41 +00:00
2020-01-16 10:45:44 -08:00
2020-01-19 22:10:04 +01:00
2020-02-04 07:17:41 +00:00
2020-02-11 11:12:47 +02:00
2020-01-27 13:03:00 -08:00
2020-02-04 03:05:27 +00:00
2020-02-27 12:29:09 -08:00
2020-02-19 11:09:27 -08:00
2020-01-31 10:30:37 -08:00
2020-02-28 01:32:14 +09:00
2020-02-07 12:54:13 -08:00
2020-02-08 14:04:19 -08:00
2020-01-27 13:03:00 -08:00
2020-02-04 03:05:26 +00:00
2020-02-27 08:06:20 -06:00
2020-02-10 18:14:46 +00:00
2020-02-04 03:05:27 +00:00
2020-02-04 03:05:24 +00:00
2020-02-11 09:10:36 +01:00
2020-02-04 03:05:26 +00:00
2020-02-08 13:55:25 -08:00
2020-01-19 22:10:04 +01:00
2020-01-20 15:40:49 +01:00
2020-02-03 14:51:57 +00:00
2020-01-24 09:34:07 -08:00
2020-01-20 10:29:56 -08:00
2020-02-04 07:17:41 +00:00
2020-02-29 09:58:47 -06:00
2020-02-24 15:06:07 -05:00
2020-01-14 21:46:53 +01:00
2020-01-14 21:46:48 +01:00
2020-02-11 15:00:15 -08:00
2020-01-16 17:34:38 +05:30
2020-02-04 03:05:27 +00:00
2020-02-10 13:16:04 +01:00
2020-02-10 10:32:38 -08:00
2020-02-14 17:13:54 -05:00
2020-01-31 11:28:31 -08:00
2020-02-24 11:40:23 -08:00
2020-01-31 14:39:21 -08:00
2020-02-13 04:59:30 -08:00
2020-02-13 12:10:07 -08:00
2020-02-17 10:44:43 +01:00
2020-02-03 22:22:05 +00:00
2020-02-22 21:41:42 -08:00
2020-03-06 21:06:34 +01:00
2020-02-06 03:40:27 -05:00
2020-01-29 10:35:54 -08:00
2020-01-29 10:35:54 -08:00
2020-02-28 09:02:18 -08:00
2020-02-21 16:10:10 -08:00
2020-02-09 16:05:50 -08:00