Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    Tina Linux 如何卸载显示屏驱动模块

    D1系列-RISC-V
    1
    1
    185
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      suncw LV 4 last edited by YuzukiTsuru

      首先我想实现一下系统运行的状态下更换显示屏(热插拔),因为更换了屏幕,所以显示屏的相关参数都需要修改。但是fb_fix_screeninfo默认不支持修改。

      我想到的方法是将整个模块退出,修改参数,重新初始化显示模块。但是发现退出模块有问题,会打印堆栈。(直接调用disp_module_exit函数进行退出)

      请问我这个思路可行吗?或者大家有什么其他方法吗?(使用的硬件是哪吒开发板,全志D1的cpu。软件是linux 5.4)

      
      
        [  111.483761] lcd_panel_fun[0].cfg_close_flow is NULL
      
      [  111.494336] BUG: scheduling while atomic: lcdconfig/673/0x00000002
      
      [  111.501266] Modules linked in: cmd_server(O) xt_time xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG iptable_filter ipt_REJECT uvcvideo videobuf2_vmalloc videobuf2_memops fuse
      
      
      
      
      
      [  111.520413] Preemption disabled at:
      
      [  111.520430] [<ffffffdf80cba17a>] lcd_status_set+0x66/0xd2 [cmd_server]
      
      [  111.531635] CPU: 0 PID: 673 Comm: lcdconfig Tainted: G           O      5.4.61 #48
      
      [  111.540069] Call Trace:
      
      [  111.542826] [<ffffffe0000303ce>] walk_stackframe+0x0/0xa0
      
      [  111.548848] [<ffffffe0000305b0>] show_stack+0x2a/0x34
      
      [  111.554516] [<ffffffe000644cd2>] dump_stack+0x20/0x28
      
      [  111.560155] [<ffffffe00004dfda>] __schedule_bug+0x92/0xa4
      
      [  111.566205] [<ffffffe00065a4a8>] __schedule+0x2e0/0x384
      
      [  111.572053] [<ffffffe00065a57e>] schedule+0x32/0xb4
      
      [  111.577493] [<ffffffe00065da94>] schedule_timeout+0x12a/0x228
      
      [  111.583930] [<ffffffe000277658>] disp_delay_ms+0x22/0x2c
      
      [  111.589852] [<ffffffe00027409a>] disp_mgr_disable+0x96/0x1de
      
      [  111.596195] [<ffffffe00027192c>] disp_lcd_disable+0x182/0x388
      
      [  111.602632] [<ffffffe000261a8c>] disp_shutdown+0x54/0x72
      
      [  111.608553] [<ffffffe000267448>] disp_remove+0x30/0x1c6
      
      [  111.614406] [<ffffffe00030321a>] platform_drv_remove+0x1c/0x34
      
      [  111.620917] [<ffffffe000301db4>] device_release_driver_internal+0xb4/0x12a
      
      [  111.628609] [<ffffffe000301e96>] driver_detach+0x3c/0xb2
      
      [  111.634553] [<ffffffe000300d44>] bus_remove_driver+0x40/0x8a
      
      [  111.640863] [<ffffffe000302486>] driver_unregister+0x22/0x48
      
      [  111.647196] [<ffffffe0003032c0>] platform_driver_unregister+0x10/0x18
      
      [  111.654400] [<ffffffe000261fbc>] my_disp_exit+0x1a/0x4c
      
      [  111.660231] [<ffffffdf80cba18a>] lcd_status_set+0x76/0xd2 [cmd_server]
      
      [  111.667537] [<ffffffdf80cba230>] switch_cmd+0x1c/0x7e [cmd_server]
      
      [  111.674453] [<ffffffdf80cba2be>] recv_cmd_msg+0x2c/0x36 [cmd_server]
      
      [  111.681572] [<ffffffe0004d9a76>] netlink_unicast+0x10c/0x16a
      
      [  111.687884] [<ffffffe0004d9c22>] netlink_sendmsg+0x14e/0x2aa
      
      [  111.694229] [<ffffffe000491c3e>] ____sys_sendmsg+0x120/0x152
      
      [  111.700539] [<ffffffe000491cbc>] ___sys_sendmsg+0x4c/0x70
      
      [  111.706584] [<ffffffe0004928d6>] __sys_sendmsg+0x32/0x66
      
      [  111.712526] [<ffffffe00049291c>] sys_sendmsg+0x12/0x1a
      
      [  111.718256] [<ffffffe00002f00a>] ret_from_syscall+0x0/0xe
      
      [  111.724758] [DISP] display_fb_release,line:2204:
      
      [  111.724763] invalid paras fb_id:0 in display_fb_release
      
      [  111.735758] ------------[ cut here ]------------
      
      [  111.740922] WARNING: CPU: 0 PID: 673 at drivers/video/fbdev/core/fbmem.c:1681 unlink_framebuffer+0x16/0xb0
      
      [  111.751682] Modules linked in: cmd_server(O) xt_time xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG iptable_filter ipt_REJECT uvcvideo videobuf2_vmalloc videobuf2_memops fuse
      
      [  111.770810] CPU: 0 PID: 673 Comm: lcdconfig Tainted: G        W  O      5.4.61 #48
      
      [  111.779246] sepc: ffffffe00025e3be ra : ffffffe00025eb86 sp : ffffffe01d743950
      
      [  111.787295]  gp : ffffffe00091d3bc tp : ffffffe01d602040 t0 : ffffffe00092a930
      
      [  111.795343]  t1 : 0000000000000064 t2 : 0000000000000009 s0 : ffffffe01d743980
      
      [  111.803391]  s1 : ffffffe01dc8d000 a0 : ffffffe01dc8d000 a1 : 000000000000000a
      
      [  111.811439]  a2 : 00000000000000e6 a3 : ffffffe000888ea0 a4 : 0000000000000000
      
      [  111.819486]  a5 : 0000000000000000 a6 : 00000000000001b0 a7 : 0000000000000000
      
      [  111.827535]  s2 : 000000000000001f s3 : ffffffe00093b4d8 s4 : fffffffffffff000
      
      [  111.835582]  s5 : 0000000000000002 s6 : 0000000000000000 s7 : fffffffffffff000
      
      [  111.843630]  s8 : 0000000000000008 s9 : 000000002966f6b0 s10: ffffffffffffffff
      
      [  111.851678]  s11: 000000000000002d t3 : ffffffe000926b00 t4 : 0000000000002fb0
      
      [  111.859725]  t5 : 0000000000002fb0 t6 : ffffffe000927092
      
      [  111.865642] sstatus: 0000000200000100 sbadaddr: 0000000000000000 scause: 0000000000000003
      
      [  111.874755] ---[ end trace d9a44024af58bd5d ]---
      
      [  111.879906] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
      
      [  111.889697] Oops [#1]
      
      [  111.892223] Modules linked in: cmd_server(O) xt_time xt_multiport xt_mark xt_mac xt_limit xt_comment xt_TCPMSS xt_LOG iptable_filter ipt_REJECT uvcvideo videobuf2_vmalloc videobuf2_memops fuse
      
      [  111.911341] CPU: 0 PID: 673 Comm: lcdconfig Tainted: G        W  O      5.4.61 #48
      
      [  111.919777] sepc: ffffffe000261060 ra : ffffffe00025eb9c sp : ffffffe01d743980
      
      [  111.927825]  gp : ffffffe00091d3bc tp : ffffffe01d602040 t0 : ffffffe00092a930
      
      [  111.935873]  t1 : 0000000000000064 t2 : 0000000000000009 s0 : ffffffe01d7439a0
      
      [  111.943920]  s1 : ffffffe01dc8d000 a0 : ffffffe01dc8d298 a1 : 000000000000000a
      
      [  111.951968]  a2 : 00000000000000e6 a3 : ffffffe000888ea0 a4 : 0000000000000000
      
      [  111.960016]  a5 : 0000000000000000 a6 : 00000000000001b0 a7 : 0000000000000000
      
      [  111.968064]  s2 : ffffffe01dc8d000 s3 : ffffffe00093b5f0 s4 : fffffffffffff000
      
      [  111.976112]  s5 : 0000000000000002 s6 : 0000000000000000 s7 : fffffffffffff000
      
      [  111.984159]  s8 : 0000000000000008 s9 : 000000002966f6b0 s10: ffffffffffffffff
      
      [  111.992207]  s11: 000000000000002d t3 : ffffffe000926b00 t4 : 0000000000002fb0
      
      [  112.000254]  t5 : 0000000000002fb0 t6 : ffffffe000927092
      
      [  112.006170] sstatus: 0000000200000100 sbadaddr: 0000000000000000 scause: 000000000000000d
      
      [  112.015370] ---[ end trace d9a44024af58bd5e ]---
      
      [  112.020520] note: lcdconfig[673] exited with preempt_count 1
      
      Segmentation fault
      

      b844526e-8b9a-4e7a-aa55-b7ef153db800-image.png
      cfg_close_flow 初始化中有注册,应该不是空指针。另外将调用处删除后打印一样的堆栈信息,并且调用处有判断空指针,应该和那个空函数指针没关系)

      1 Reply Last reply Reply Quote Share 0
      • Moved from Linux by  xiaowenge xiaowenge 
      • 1 / 1
      • First post
        Last post

      Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

      行为准则 | 用户协议 | 隐私权政策