MLK-21274-2 drm/bridge: sec-dsim: remove bridge assign for encoder
authorFancy Fang <chen.fang@nxp.com>
Thu, 28 Mar 2019 14:56:29 +0000 (22:56 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit1fa72a0eb79a19f1329f74e32e293ac3af61fadb
tree9b35194e03747eb5bf6ee51551de3357b4e37e76
parent6bd418356fde8e30db72d7a26b4996d992383dbf
MLK-21274-2 drm/bridge: sec-dsim: remove bridge assign for encoder

Remove the bridge assignment for encoder before the bridge
attach during the sec dsim bind stage, since if the bridge
attach succeeds, the assignment will be done in the attach,
or if attach fails, the encoder's bridge field should be
set to NULL, otherwise below warning message printed:

[    1.034614] WARNING: CPU: 1 PID: 1 at drivers/gpu/drm/drm_bridge.c:150 drm_bridge_detach+0x4c/0x54
[    1.043570] Modules linked in:
[    1.046630] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.19.30-03537-g02a6fac0da96 #338
[    1.054544] Hardware name: FSL i.MX8MM EVK board (DT)
[    1.059595] pstate: 60000005 (nZCv daif -PAN -UAO)
[    1.064386] pc : drm_bridge_detach+0x4c/0x54
[    1.068657] lr : drm_encoder_cleanup+0x28/0xa4
[    1.073099] sp : ffff00000807b9d0
[    1.076412] x29: ffff00000807b9d0 x28: ffff80007ab3ba80
[    1.081725] x27: 0000000000000039 x26: ffff80007a8a3080
[    1.087039] x25: ffff80007ab3ba88 x24: ffff80007ab6c800
[    1.092352] x23: 00000000ffffffed x22: ffff000008f1c518
[    1.097665] x21: ffff80007ab6c800 x20: ffff80007ab3ba88
[    1.102978] x19: 0000000000000000 x18: 0000000000000000
[    1.108291] x17: 0000000000000001 x16: 00000000000000fc
[    1.113604] x15: 0000000000000000 x14: 64697262206d6973
[    1.118917] x13: 642063657320646e x12: 6962206f74206465
[    1.124230] x11: ffffffffffffffff x10: 0000000000000006
[    1.129543] x9 : 0000000000000005 x8 : 000000000000068e
[    1.134856] x7 : 7320646e6962206f x6 : ffff000008668de4
[    1.140169] x5 : 0000000000000000 x4 : 0000000000000000
[    1.145481] x3 : ffffffffffffffff x2 : 0000000000000000
[    1.150794] x1 : 31cae07dd51c2b00 x0 : ffff80007a7bd580
[    1.156107] Call trace:
[    1.158555]  drm_bridge_detach+0x4c/0x54
[    1.162478]  drm_encoder_cleanup+0x28/0xa4
[    1.166574]  imx_sec_dsim_bind+0x1c4/0x1f8
[    1.170673]  component_bind_all+0xfc/0x24c
[    1.174770]  imx_drm_bind+0xa0/0x134
[    1.178346]  try_to_bring_up_master+0x148/0x1a8
[    1.182877]  component_add+0x9c/0x174
[    1.186539]  lcdif_crtc_probe+0x20/0x3c
[    1.190376]  platform_drv_probe+0x4c/0xb0
[    1.194385]  really_probe+0x21c/0x2b4
[    1.198047]  driver_probe_device+0xa8/0xfc
[    1.202143]  __driver_attach+0xd4/0xd8
[    1.205892]  bus_for_each_dev+0x64/0xc0
[    1.209728]  driver_attach+0x20/0x28
[    1.213303]  bus_add_driver+0x1c0/0x224
[    1.217140]  driver_register+0x68/0x120
[    1.220976]  __platform_driver_register+0x4c/0x54
[    1.225682]  lcdif_crtc_driver_init+0x18/0x20
[    1.230040]  do_one_initcall+0x58/0x168
[    1.233877]  kernel_init_freeable+0x1b4/0x274
[    1.238235]  kernel_init+0x10/0x104
[    1.241724]  ret_from_fork+0x10/0x18
[    1.245300] ---[ end trace a1ee52d990264440 ]---

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
drivers/gpu/drm/bridge/sec-dsim.c