Skip to content

Conversation

yan-wyb
Copy link

@yan-wyb yan-wyb commented Aug 29, 2022

No description provided.

Signed-off-by: Yan Wang <[email protected]>
Change-Id: I4e6a44432afc7928586c23fb8c066aa7c3a9e39c
@numbqq numbqq merged commit 13ce80f into khadas:khadas-vims-5.4.y Aug 29, 2022
JacobZang pushed a commit to JacobZang/linux that referenced this pull request Aug 26, 2025
In the function drm_gem_fb_init_with_funcs, the framebuffer (fb) and
its corresponding object ID have already been registered.

So we need to do cleanup the drm framebuffer if the subsequent execution
of drm_gem_fb_afbc_init fails.

Or we will meet list_del corruption like bellow when userspace call
drm_mode_rmfb to remove all the previous created fb:

[  202.019304] list_del corruption. prev->next should be ffffff817eba4608, but was 0000000000000000. (prev=ffffff817eba5f08)
[  202.019340] kernel BUG at lib/list_debug.c:61!
[  202.019346] Internal error: Oops - BUG: 00000000f2000800 [khadas#1] PREEMPT SMP
[  202.021421] Modules linked in: bcmdhd(O) r8168
[  202.021884] CPU: 7 PID: 395 Comm: binder:339_3 Tainted: G W  O       6.1.118 khadas#59
[  202.022648] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[  202.023249] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  202.023925] pc : __list_del_entry_valid+0xbc/0xd0
[  202.024409] lr : __list_del_entry_valid+0xbc/0xd0
[  202.024889] sp : ffffffc00dd8bb40
[  202.025248] x29: ffffffc00dd8bb40 x28: 00000000000000af x27:ffffff81088ab600
[  202.025936] x26: 0000000000000004 x25: ffffff810880eac0 x24:ffffffc00962bc98
[  202.026623] x23: 0000000000000000 x22: ffffff81002be000 x21:ffffff817eba4608
[  202.027310] x20: ffffff817eba4600 x19: ffffff81002be218 x18:ffffffc00dbc5080
[  202.027998] x17: 20747562202c3830 x16: ffffffffffffffff x15:0000000000000004
[  202.028684] x14: ffffffc00a06c980 x13: 0000000000001d5a x12:0000000000000003
[  202.029372] x11: 000000010000dd5a x10: c00000010000dd5a x9 :02c01f0f68978400
[  202.030059] x8 : 02c01f0f68978400 x7 : 205b5d3430333931 x6 :302e32303220205b
[  202.030747] x5 : ffffffc00a493617 x4 : ffffffc00dd8b897 x3 :0000000000000000
[  202.031434] x2 : 0000000000000000 x1 : ffffffc00dd8b900 x0 :000000000000006d
[  202.032121] Call trace:
[  202.032395]  __list_del_entry_valid+0xbc/0xd0
[  202.032843]  drm_framebuffer_cleanup+0x34/0x80
[  202.033305]  __rockchip_drm_fb_destroy+0x18/0x1ec
[  202.033789]  rockchip_drm_fb_destroy+0x18/0x40
[  202.034247]  drm_framebuffer_free+0x30/0x40
[  202.034674]  drm_mode_object_put+0x60/0xac
[  202.035100]  drm_mode_rmfb+0x170/0x1a4
[  202.035493]  drm_mode_rmfb_ioctl+0x14/0x20
[  202.035920]  drm_ioctl_kernel+0x80/0xf8
[  202.036324]  drm_ioctl+0x2d4/0x554

Change-Id: I191e2b2a1b8229da1642ac58a6adc8fc3a3d71ea
Signed-off-by: Andy Yan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants