2011-06-17 08:16:14     LCD driver removal failure

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-06-17 08:16:14     LCD driver removal failure

Chandrashekhar Lavania (INDIA)

Message: 101383   

 

Hi,

 

I am using 2010R1-RC5. I am using LCD LQ035Q1

 

I have built the lcd driver as a loadable module.

 

I am using a BF527 based board.

 

Now the command "modprobe bfin-lq035q1-fb" is successful and the module loads.

 

But, when I try to remove the module using "modprobe -r bfin-lq035q1-fb", the system hangs.

 

What can be the solution to this problem?

 

 

 

Regards,

 

Shekhar

QuoteReplyEditDelete

 

 

2011-06-17 18:04:09     Re: LCD driver removal failure

Mike Frysinger (UNITED STATES)

Message: 101397   

 

i dont think we've ever tested this on a BF52x system.  you can easily add printk's to the remove() func to see how far it gets.

QuoteReplyEditDelete

 

 

2011-06-23 06:17:26     Re: LCD driver removal failure

Chandrashekhar Lavania (INDIA)

Message: 101608   

 

Hi,

 

The Cleanup function of bfin-lq035q1-fb.c looks like this:

 

static void __exit bfin_lq035q1_driver_cleanup(void)

{

printk(KERN_ALERT "in LCD cleanup\n");

/*platform_driver_unregister(&bfin_lq035q1_driver);*/

}

module_exit(bfin_lq035q1_driver_cleanup);

 

I commented the platform_driver_unregister() call, and added a printk.

 

Now when I do "modprobe -r bfin-lq035q1-fb" it still hangs without throwing any message. This shows that the control did not rech the printk.

 

Also, once I have loaded the module and do lsmod, I get the following messages:

 

root:/> lsmod                                                                  

Module                         Size  Used by                                          

bfin_lq035q1_fb         5489  1                                                

cfbimgblt                      1472  1 bfin_lq035q1_fb                                

cfbfillrect                      2639  1 bfin_lq035q1_fb                                

cfbcopyarea                3027  1 bfin_lq035q1_fb                                

root:/>

 

The module was loaded immideately after boot.

 

As can be seen, the topmost entry above, shows that bfin-lq035q1-fb has a use count 1 (but unlike others, it does not show who is uusing it) . Hence, it hangs when we try to unload it. Any other way to remove this module?

 

Also, what may be some of the common modules which may use bfin-lq035q1-fb.

Note: There was a mapping of the console to tty0 which I removed.

 

Regards,

Chandrashekhar

QuoteReplyEditDelete

 

 

2011-06-23 10:50:17     Re: LCD driver removal failure

Mike Frysinger (UNITED STATES)

Message: 101615   

 

userspace opening the device would probably increment the use count

QuoteReplyEditDelete

 

 

2011-06-24 08:54:33     Re: LCD driver removal failure

Chandrashekhar Lavania (INDIA)

Message: 101658   

 

Hi,

 

Found the problem.

 

If the Framebuffer console support is enabled during image build, then the LCD driver will have use count 1, even though there is no mapping like console=tty0 in the ramargs.

 

Disabling this Framebuffer console support allows the LCD module to be unloaded.

 

 

 

Regards,

 

Shekhar

Attachments

    Outcomes