public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Umang Jain <umang.jain@ideasonboard.com>
To: Stefan Wahren <wahrenst@gmx.net>, linux-staging@lists.linux.dev
Cc: Dan Carpenter <error27@gmail.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Phil Elwell <phil@raspberrypi.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Greg KH <greg@kroah.com>
Subject: Re: [PATCH 0/5] staging: vc04_services: Address module cleanup
Date: Thu, 21 Mar 2024 17:00:08 +0530	[thread overview]
Message-ID: <dea39969-606d-4f4d-a702-e96eb73a5270@ideasonboard.com> (raw)
In-Reply-To: <22dd25ed-1dae-4276-b734-b6f531fe43a3@gmx.net>

Hi Stefan,

On 17/03/24 5:38 pm, Stefan Wahren wrote:
> Hi Umang,
>
> Am 15.03.24 um 11:56 schrieb Umang Jain:
>> The series addresses the following TODO item:
>>
>> ```
>> * Fix kernel module support
>>
>> Even the VPU firmware doesn't support a VCHI re-connect, the driver
>> should properly handle a module unload. This also includes that all
>> resources must be freed (kthreads, debugfs entries, ...) and global
>> variables avoided.
>> ```
>>
>> Patch 1/5 to 3/5 are log cleanups spotted during the reading of the
>> driver.
>>
>> Patch 4/5 implements .remove() function vptr so that individual
>> devices(bcm2835-audio, bcm2835-camera, bcm2835-isp etc.)
>> can run their cleanup when removed from the vchiq_bus, during their
>> own module unload.
>>
>> Patch 5/5 stops the kthreads started by vchiq - on shutdown path.
>>
>> Rest of the module cleanup (debugfs entries, deregister char device
>> etc.) is already done as part of vchiq_remove().
>
> great work!

:-)
>
>>
>> Testing on RPi4 for vchiq module unload:
>>
>> ```
>> uajain@ATX:~$ uname -r
>> 6.8.0-rc1-00128-gab2b09f632fa-dirty
>> uajain@ATX:~$ dmesg | grep vchiq
>> [   21.401426] vchiq: module is from the staging directory, the 
>> quality is unknown, you have been warned.
>> uajain@ATX:~$ sudo modprobe bcm2835_mmal_vchiq
>> sudo: unable to resolve host ATX: Temporary failure in name resolution
>> uajain@ATX:~$ dmesg | grep vchiq
>> [   21.401426] vchiq: module is from the staging directory, the 
>> quality is unknown, you have been warned.
>> [   96.388148] bcm2835_mmal_vchiq: module is from the staging 
>> directory, the quality is unknown, you have been warned.
>> uajain@ATX:~$ lsmod | grep vchiq
>> bcm2835_mmal_vchiq     40960  0
>> vchiq                 581632  1 bcm2835_mmal_vchiq
>> uajain@ATX:~$ sudo rmmod bcm2835_mmal_vchiq vchiq
>> sudo: unable to resolve host ATX: Temporary failure in name resolution
>> uajain@ATX:~$ lsmod | grep vchiq
>> uajain@ATX:~$ dmesg | grep vchiq
>> [   21.401426] vchiq: module is from the staging directory, the 
>> quality is unknown, you have been warned.
>> [   96.388148] bcm2835_mmal_vchiq: module is from the staging 
>> directory, the quality is unknown, you have been warned.
>> uajain@ATX:~$
>
> What happens if you run "sudo modprobe bcm2835_mmal_vchiq" again?

Just seeing this right now - at bottom of the mail thread.

So trying to re-load the module fails :

[  207.665281] bcm2835_vchiq fe00b840.mailbox: failed to set channelbase 
(response: ffffffff)
[  207.674245] bcm2835_vchiq fe00b840.mailbox: arm: Could not initialize 
vchiq platform
[  223.527580] bcm2835_mmal_vchiq: module is from the staging directory, 
the quality is unknown, you.
[  223.539469] bcm2835_mmal_vchiq: unknown parameter 'vchiq' ignored

which is known as vchiq doesn't support re-connect.


      reply	other threads:[~2024-03-21 11:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 10:56 [PATCH 0/5] staging: vc04_services: Address module cleanup Umang Jain
2024-03-15 10:56 ` [PATCH 1/5] staging: vc04_services: Remove unused function declarations Umang Jain
2024-03-15 11:00   ` Laurent Pinchart
2024-03-16 10:33   ` Kieran Bingham
2024-03-15 10:56 ` [PATCH 2/5] staging: vc04_services: vchiq_arm: Use appropriate dev_* log helpers Umang Jain
2024-03-16 10:28   ` Kieran Bingham
2024-03-21 12:10     ` Umang Jain
2024-03-15 10:56 ` [PATCH 3/5] staging: vc04_services: Do not log error on kzalloc() Umang Jain
2024-03-16  8:36   ` Dan Carpenter
2024-03-15 10:56 ` [PATCH 4/5] staging: vc04_services: Implement vchiq_bus .remove Umang Jain
2024-03-16 10:30   ` Kieran Bingham
2024-03-15 10:56 ` [PATCH 5/5] staging: vc04_services: vchiq_core: Stop kthreads on shutdown Umang Jain
2024-03-16 10:33   ` Kieran Bingham
2024-03-17 12:08 ` [PATCH 0/5] staging: vc04_services: Address module cleanup Stefan Wahren
2024-03-21 11:30   ` Umang Jain [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dea39969-606d-4f4d-a702-e96eb73a5270@ideasonboard.com \
    --to=umang.jain@ideasonboard.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=error27@gmail.com \
    --cc=greg@kroah.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@raspberrypi.com \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox