I am trying to get my way around on graphics driver development, in this case for modifications on a DRM kernel module, called gma500_gfx.
Every time when I have made a change to this driver, I start a script which compiles and replaces the previous kernel module (by a cp command), and restarts the Linux distro (Lubuntu).
I am unable to reload this graphics driver module without restarting Linux (yet). The commands modprobe and rmmod always give me a 'module in use' error.
modprobe gma500_gfx -r
modprobe: FATAL: Module gma500_gfx is in use.
When I look at the dependencies I get the following list.
gma500_gfx 185579 2
drm_kms_helper 48716 1 gma500_gfx
drm 298219 3 drm_kms_helper,gma500_gfx
video 19370 2 acer_wmi,gma500_gfx
i2c_algo_bit 13413 1 gma500_gfx
I am also unable to unload any of these dependencies, which give the same error. Other things that I have tried before the modprobe, but which are unsuccesful:
- Go to a single user environment by "init 1"
- Shutdown lightdm by "/etc/init.d/lightdm stop" (which reduces the refcount by 1 to 1)
Does anybody know a faster way to reload the graphics driver module than restarting the Linux distribution?