[PATCH 1/2] drm/exynos: add more condition to check iommu support

2015-03-13 Thread Inki Dae
On 2015년 03월 12일 13:36, Hyungwon Hwang wrote:
> Checking whether the iommu mapping allocated is not enough to determine
> whether iommu is supported properly or not. Even though there is mapping,
> the kernel is going to be panicked without the iommu being allocated.
> So this patch adds the additional condition to check whether iommu is
> really supported or not.
> 
> [0.960859] [drm] Initialized drm 1.1.0 20060810
> [1.016344] [ cut here ]
> [1.016453] kernel BUG at drivers/iommu/exynos-iommu.c:481!
> [1.020877] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
> [1.026693] Modules linked in:
> [1.029736] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 
> 4.0.0-rc1-00089-gb7abcc2-dirty #13
> [1.037802] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
> [1.043880] task: db0c ti: db0a6000 task.ti: db0a6000
> [1.049268] PC is at __exynos_sysmmu_enable+0x188/0x214
> [1.054470] LR is at exynos_iommu_attach_device+0x44/0x118
> [1.059940] pc : []lr : []psr: 6193
> [1.059940] sp : db0a7cd8  ip :   fp : 
> [1.071394] r10: a113  r9 :   r8 : db355f90
> [1.076603] r7 : db25b210  r6 : db355640  r5 :   r4 : 
> [1.083113] r3 :   r2 : db355640  r1 : 5b244000  r0 : db25b210
> [1.089624] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
> kernel
> [1.097001] Control: 10c5387d  Table: 4000406a  DAC: 0015
> [1.102729] Process swapper/0 (pid: 1, stack limit = 0xdb0a6210)
> [1.108719] Stack: (0xdb0a7cd8 to 0xdb0a8000)
> [1.113060] 7cc0:   
>  db355f80
> [1.121223] 7ce0:  db355640 db25b210 db355f90  a113 
>  c02bf1a0
> [1.129383] 7d00: a113 c0115974 00200200 5b244000 db25b210 db25b210 
> da822c10 db157800
> [1.137542] 7d20: c0846540  c07ea3f4 c02bc8e8 db25b210 db278b40 
> da822c10 c001eb48
> [1.145701] 7d40: da822e10 db25b210 da822c10 c02ef444 da822e10 0001 
> 0001 c02f0af4
> [1.153860] 7d60: da822e10 db2b0640 db2b25c0 db2b0640  c02f3850 
> db157800 
> [1.162019] 7d80: db157800   db278900  c02eb7d8 
> db157800 
> [1.170179] 7da0:  c08267b8  c02d4a44 c08e69f4 da822c00 
> db157800 c02d62c4
> [1.178337] 7dc0:  c07ea3f4  c02faf6c db2b07e0 db2b07e0 
> 0002 db2b0640
> [1.186497] 7de0: db2b07d0 c02f33f0 db2b0640  c0827130 c05a5230 
> da822c10 c02f34dc
> [1.194656] 7e00: c08268c8 da822c10 0001 c08268c8 c0826774 c02eb97c 
> da822c10 da8c0cd0
> [1.202815] 7e20:  c08e6ab0 da822c10 c0826774 fdfb c02f9acc 
> c08e6ab0 da822c10
> [1.210974] 7e40: c08466d8  c0826774 c02f7ea4 db2b8f80 c02491a0 
> db2b7a80 da822c10
> [1.219134] 7e60: c0826774 da822c44 c0827458 db2b7a80 007d c02f81cc 
>  c0826774
> [1.227293] 7e80: c02f8140 c02f61b0 db11205c db2b93b4 c0826774 db2b8f80 
>  c02f7540
> [1.235452] 7ea0: c070a3ac  c08e6a84 c0826774  c08e6a84 
>  c02f8a48
> [1.243611] 7ec0:   c08e6a84 c02eb6f0  c070a3ac 
>  
> [1.251770] 7ee0:       
> c08095a0 c08095a0
> [1.259930] 7f00: c02eb628 c0008a3c c0584ad4 c078395c 007d dfeff9b0 
>  dfeff9af
> [1.268089] 7f20:  db0a7f38 dfeffb46 dfeffb37 c0584ad4 c0040f40 
> 395c 
> [1.276248] 7f40: c0716918 dfeffb57 0006 0006 c080d618 dfeff980 
> c07fee24 0006
> [1.284408] 7f60: c07ea3ec c0851c80 c0851c80 007d c07ea3f4 c07aee28 
> 0006 0006
> [1.292566] 7f80: c07ae5ac c0047e88 1c80 c03c   
>  
> [1.300725] 7fa0:  c048  c000f390   
>  
> [1.308884] 7fc0:       
>  
> [1.317044] 7fe0:     0013  
>  ffdf
> [1.325220] [] (__exynos_sysmmu_enable) from [] 
> (exynos_iommu_attach_device+0x44/0x118)
> [1.334928] [] (exynos_iommu_attach_device) from [] 
> (iommu_attach_device+0x1c/0xc8)
> [1.344305] [] (iommu_attach_device) from [] 
> (arm_iommu_attach_device+0x18/0x50)
> [1.353420] [] (arm_iommu_attach_device) from [] 
> (drm_iommu_attach_device+0x4c/0xcc)
> [1.362880] [] (drm_iommu_attach_device) from [] 
> (fimd_bind+0x124/0x198)
> [1.371298] [] (fimd_bind) from [] 
> (component_bind_all+0xc4/0x228)
> [1.379195] [] (component_bind_all) from [] 
> (exynos_drm_load+0xa0/0x148)
> [1.387618] [] (exynos_drm_load) from [] 
> (drm_dev_register+0xa8/0x104)
> [1.395864] [] (drm_dev_register) from [] 
> (drm_platform_init+0x44/0xdc)
> [1.404195] [] (drm_platform_init) from [] 
> 

[PATCH 1/2] drm/exynos: add more condition to check iommu support

2015-03-12 Thread Hyungwon Hwang
Checking whether the iommu mapping allocated is not enough to determine
whether iommu is supported properly or not. Even though there is mapping,
the kernel is going to be panicked without the iommu being allocated.
So this patch adds the additional condition to check whether iommu is
really supported or not.

[0.960859] [drm] Initialized drm 1.1.0 20060810
[1.016344] [ cut here ]
[1.016453] kernel BUG at drivers/iommu/exynos-iommu.c:481!
[1.020877] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[1.026693] Modules linked in:
[1.029736] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 
4.0.0-rc1-00089-gb7abcc2-dirty #13
[1.037802] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
[1.043880] task: db0c ti: db0a6000 task.ti: db0a6000
[1.049268] PC is at __exynos_sysmmu_enable+0x188/0x214
[1.054470] LR is at exynos_iommu_attach_device+0x44/0x118
[1.059940] pc : []lr : []psr: 6193
[1.059940] sp : db0a7cd8  ip :   fp : 
[1.071394] r10: a113  r9 :   r8 : db355f90
[1.076603] r7 : db25b210  r6 : db355640  r5 :   r4 : 
[1.083113] r3 :   r2 : db355640  r1 : 5b244000  r0 : db25b210
[1.089624] Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
kernel
[1.097001] Control: 10c5387d  Table: 4000406a  DAC: 0015
[1.102729] Process swapper/0 (pid: 1, stack limit = 0xdb0a6210)
[1.108719] Stack: (0xdb0a7cd8 to 0xdb0a8000)
[1.113060] 7cc0:   
 db355f80
[1.121223] 7ce0:  db355640 db25b210 db355f90  a113 
 c02bf1a0
[1.129383] 7d00: a113 c0115974 00200200 5b244000 db25b210 db25b210 
da822c10 db157800
[1.137542] 7d20: c0846540  c07ea3f4 c02bc8e8 db25b210 db278b40 
da822c10 c001eb48
[1.145701] 7d40: da822e10 db25b210 da822c10 c02ef444 da822e10 0001 
0001 c02f0af4
[1.153860] 7d60: da822e10 db2b0640 db2b25c0 db2b0640  c02f3850 
db157800 
[1.162019] 7d80: db157800   db278900  c02eb7d8 
db157800 
[1.170179] 7da0:  c08267b8  c02d4a44 c08e69f4 da822c00 
db157800 c02d62c4
[1.178337] 7dc0:  c07ea3f4  c02faf6c db2b07e0 db2b07e0 
0002 db2b0640
[1.186497] 7de0: db2b07d0 c02f33f0 db2b0640  c0827130 c05a5230 
da822c10 c02f34dc
[1.194656] 7e00: c08268c8 da822c10 0001 c08268c8 c0826774 c02eb97c 
da822c10 da8c0cd0
[1.202815] 7e20:  c08e6ab0 da822c10 c0826774 fdfb c02f9acc 
c08e6ab0 da822c10
[1.210974] 7e40: c08466d8  c0826774 c02f7ea4 db2b8f80 c02491a0 
db2b7a80 da822c10
[1.219134] 7e60: c0826774 da822c44 c0827458 db2b7a80 007d c02f81cc 
 c0826774
[1.227293] 7e80: c02f8140 c02f61b0 db11205c db2b93b4 c0826774 db2b8f80 
 c02f7540
[1.235452] 7ea0: c070a3ac  c08e6a84 c0826774  c08e6a84 
 c02f8a48
[1.243611] 7ec0:   c08e6a84 c02eb6f0  c070a3ac 
 
[1.251770] 7ee0:       
c08095a0 c08095a0
[1.259930] 7f00: c02eb628 c0008a3c c0584ad4 c078395c 007d dfeff9b0 
 dfeff9af
[1.268089] 7f20:  db0a7f38 dfeffb46 dfeffb37 c0584ad4 c0040f40 
395c 
[1.276248] 7f40: c0716918 dfeffb57 0006 0006 c080d618 dfeff980 
c07fee24 0006
[1.284408] 7f60: c07ea3ec c0851c80 c0851c80 007d c07ea3f4 c07aee28 
0006 0006
[1.292566] 7f80: c07ae5ac c0047e88 1c80 c03c   
 
[1.300725] 7fa0:  c048  c000f390   
 
[1.308884] 7fc0:       
 
[1.317044] 7fe0:     0013  
 ffdf
[1.325220] [] (__exynos_sysmmu_enable) from [] 
(exynos_iommu_attach_device+0x44/0x118)
[1.334928] [] (exynos_iommu_attach_device) from [] 
(iommu_attach_device+0x1c/0xc8)
[1.344305] [] (iommu_attach_device) from [] 
(arm_iommu_attach_device+0x18/0x50)
[1.353420] [] (arm_iommu_attach_device) from [] 
(drm_iommu_attach_device+0x4c/0xcc)
[1.362880] [] (drm_iommu_attach_device) from [] 
(fimd_bind+0x124/0x198)
[1.371298] [] (fimd_bind) from [] 
(component_bind_all+0xc4/0x228)
[1.379195] [] (component_bind_all) from [] 
(exynos_drm_load+0xa0/0x148)
[1.387618] [] (exynos_drm_load) from [] 
(drm_dev_register+0xa8/0x104)
[1.395864] [] (drm_dev_register) from [] 
(drm_platform_init+0x44/0xdc)
[1.404195] [] (drm_platform_init) from [] 
(try_to_bring_up_master.part.2+0xc8/0x108)
[1.413741] [] (try_to_bring_up_master.part.2) from [] 
(component_master_add_with_match+0xac/0x124)
[1.424505] [] (component_master_add_with_match) from [] 
(exynos_drm_platform_probe+0xfc/0x128)
[1.434925] []