VIMC module not available (CONFIG_VIDEO_VIMC not set)

Bug #1831482 reported by Kieran Bingham on 2019-06-03
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Status tracked in Eoan
Bionic
Undecided
Po-Hsu Lin
Disco
Undecided
Po-Hsu Lin
Eoan
Undecided
Po-Hsu Lin

Bug Description

== SRU Justification ==
VIMC is a virtual media controller that can emulate a real media device.
This is useful for automated tests, and development of multimedia frameworks.

== Fix ==
Enable VIMC as a module in B/D/E kernel configs.

== Test ==
Test kernels could be found here:
https://people.canonical.com/~phlin/kernel/lp-1831482-cfg-vimc/

User has reported that the Eoan kernel works as expected.
I have also smoke tested the B/D kernel to make sure the VIMC modules
can be loaded properly.

== Regression Potential ==
Low, this patchset enables the VIMC module support, we might see some
bug reports against this module in the future. However the acutal impact
for a non-vimc user should be minimum.

There is a null pointer deference issue was found while inserting the
vimc module on some system (lp:1840028), it will be handled in that bug.

== Original Bug report ==
The Multimedia VIMC module provides a test interface for the linux-media media controller framework.

This is useful for automated tests, and development of multimedia frameworks.
Other components similar to this such as VIVID (CONFIG_VIDEO_VIVID=m) are enabled, but VIMC is missing from the linux-modules packages:

$ grep VIMC /boot/config-*
/boot/config-4.15.0-32-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.17.9-041709-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.18.4-041804-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-4.18.7-041807-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-5.0.0-13-generic:# CONFIG_VIDEO_VIMC is not set
/boot/config-5.0.0-15-generic:# CONFIG_VIDEO_VIMC is not set

Could this be enabled in future releases as a module please?

I'm running Ubuntu 19.04, with Ubuntu 5.0.0-13.14-generic 5.0.6, however I believe this issue affects all current Ubuntu kernel releases.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1831482

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bionic
Kieran Bingham (kieranbingham) wrote :

Log files are irrelevant. This is not a bug in the running kernel, just an issue with the kernel config used to build the modules.

Issue changed to confirmed.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Kieran Bingham (kieranbingham) wrote :

for reference, CONFIG_VIDEO_VIMC was added in v4.11-rc5-253-gf2fe89061d79, which made it into Linux v4.12

Po-Hsu Lin (cypressyew) on 2019-07-26
Changed in linux (Ubuntu):
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Disco):
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew) on 2019-07-26
tags: added: disco
Po-Hsu Lin (cypressyew) wrote :

Hi,
can you give this kernel a try?
https://people.canonical.com/~phlin/kernel/lp-1831482-cfg-vimc/

It looks ok on my side.

ubuntu@moe:~$ grep VIMC /boot/config-5.0.0-22-generic
CONFIG_VIDEO_VIMC=m
ubuntu@moe:~$ sudo modprobe vimc
ubuntu@moe:~$ lsmod | grep vimc
vimc_capture 20480 0
vimc_streamer 16384 1 vimc_capture
vimc_debayer 20480 0
vimc_sensor 20480 0
videobuf2_vmalloc 20480 1 vimc_capture
v4l2_tpg 61440 1 vimc_sensor
vimc_scaler 20480 0
videobuf2_v4l2 24576 1 vimc_capture
videobuf2_common 49152 2 videobuf2_v4l2,vimc_capture
vimc_common 16384 10 vimc_scaler,vimc_debayer,vimc_sensor,vimc_capture
vimc 20480 0
videodev 200704 6 vimc_common,videobuf2_v4l2,vimc,videobuf2_common,vimc_sensor,vimc_capture
media 53248 7 vimc_common,videodev,vimc_streamer,videobuf2_v4l2,vimc,videobuf2_common,vimc_capture

Po-Hsu Lin (cypressyew) on 2019-07-26
Changed in linux (Ubuntu Bionic):
status: New → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Po-Hsu Lin (cypressyew) on 2019-07-26
Changed in linux (Ubuntu Eoan):
status: Confirmed → In Progress
Kieran Bingham (kieranbingham) wrote :

Thanks I'm running the 5.2 kernel that you built now and confirm it has VIMC support.

Po-Hsu Lin (cypressyew) wrote :

This is the test result for 4.15 kernel.
ubuntu@curly:~$ uname -a
Linux curly 4.15.0-56-generic #62 SMP Thu Aug 1 02:58:31 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@curly:~$ grep VIMC /boot/config-4.15.0-56-generic
CONFIG_VIDEO_VIMC=m
ubuntu@curly:~$ lsmod | grep vimc
vimc_capture 16384 0
vimc_streamer 16384 1 vimc_capture
videobuf2_vmalloc 16384 1 vimc_capture
videobuf2_v4l2 24576 1 vimc_capture
vimc_debayer 16384 0
vimc_scaler 16384 0
videobuf2_core 40960 2 videobuf2_v4l2,vimc_capture
vimc_sensor 16384 0
v4l2_tpg 65536 1 vimc_sensor
vimc_common 16384 10 vimc_scaler,vimc_debayer,vimc_sensor,vimc_capture
vimc 16384 0
videodev 184320 5 vimc_common,videobuf2_core,videobuf2_v4l2,vimc,vimc_capture
media 40960 5 vimc_common,videodev,vimc_streamer,vimc,vimc_capture

description: updated
Po-Hsu Lin (cypressyew) wrote :

Hi Kieran,
Thanks for checking, I have this sent to the mailing list:
https://lists.ubuntu.com/archives/kernel-team/2019-August/102713.html

tags: added: eoan
Po-Hsu Lin (cypressyew) wrote :

I found there will be a null pointer dereference issue when inserting the vimc module on a bare-metal system:

ubuntu@amaura:~$ sudo modprobe vimc
Killed

Bug 1840028.

Fix for Bionic has been tested with positive test result, next is Disco.
When it's done, the patch review can proceed.

Kieran Bingham (kieranbingham) wrote :

Has the fix been picked up by the linux-stable trees?

Po-Hsu Lin (cypressyew) on 2019-08-14
description: updated
Po-Hsu Lin (cypressyew) wrote :

I can't find it on the stable tree. It will be cherry-picked into Ubuntu kernel if no objections. Patch https://github.com/torvalds/linux/commit/ee1c71a8e1456ab53fe667281d855849edf26a4d#diff-4764248de66b484b364df935156b7e92

V2 for this config patch sent to kernel-team ML:
https://lists.ubuntu.com/archives/kernel-team/2019-August/103089.html

Seth Forshee (sforshee) on 2019-08-20
Changed in linux (Ubuntu Eoan):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :
Download full text (12.7 KiB)

This bug was fixed in the package linux - 5.2.0-15.16

---------------
linux (5.2.0-15.16) eoan; urgency=medium

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis

  * Change kernel compression method to improve boot speed (LP: #1840934)
    - [Packaging] add build dependencies for compression algorithms

linux (5.2.0-14.15) eoan; urgency=medium

  * eoan/linux: 5.2.0-14.15 -proposed tracker (LP: #1841159)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis

  * Eoan update: v5.2.9 upstream stable release (LP: #1841110)
    - Revert "PCI: Add missing link delays required by the PCIe spec"
    - IIO: Ingenic JZ47xx: Set clock divider on probe
    - iio: cros_ec_accel_legacy: Fix incorrect channel setting
    - iio: imu: mpu6050: add missing available scan masks
    - iio: adc: gyroadc: fix uninitialized return code
    - iio: adc: max9611: Fix misuse of GENMASK macro
    - staging: gasket: apex: fix copy-paste typo
    - staging: wilc1000: flush the workqueue before deinit the host
    - staging: android: ion: Bail out upon SIGKILL when allocating memory.
    - Staging: fbtft: Fix probing of gpio descriptor
    - Staging: fbtft: Fix reset assertion when using gpio descriptor
    - crypto: ccp - Fix oops by properly managing allocated structures
    - crypto: ccp - Add support for valid authsize values less than 16
    - crypto: ccp - Ignore tag length when decrypting GCM ciphertext
    - driver core: platform: return -ENXIO for missing GpioInt
    - usb: usbfs: fix double-free of usb memory upon submiturb error
    - Revert "USB: rio500: simplify locking"
    - usb: iowarrior: fix deadlock on disconnect
    - sound: fix a memory leak bug
    - mmc: cavium: Set the correct dma max segment size for mmc_host
    - mmc: cavium: Add the missing dma unmap when the dma has finished.
    - loop: set PF_MEMALLOC_NOIO for the worker thread
    - bdev: Fixup error handling in blkdev_get()
    - Input: usbtouchscreen - initialize PM mutex before using it
    - Input: elantech - enable SMBus on new (2018+) systems
    - Input: synaptics - enable RMI mode for HP Spectre X360
    - coresight: Fix DEBUG_LOCKS_WARN_ON for uninitialized attribute
    - perf annotate: Fix s390 gap between kernel end and module start
    - perf db-export: Fix thread__exec_comm()
    - perf record: Fix module size on s390
    - x86/purgatory: Do not use __builtin_memcpy and __builtin_memset
    - x86/purgatory: Use CFLAGS_REMOVE rather than reset KBUILD_CFLAGS
    - genirq/affinity: Create affinity mask for single vector
    - gfs2: gfs2_walk_metadata fix
    - usb: host: xhci-rcar: Fix timeout in xhci_suspend()
    - usb: yurex: Fix use-after-free in yurex_delete
    - usb: typec: ucsi: ccg: Fix uninitilized symbol error
    - usb: typec: tcpm: free log buf memory when remove debug file
    - usb: typec: tcpm: remove tcpm dir if no children
    - usb: typec: tcpm: Add NULL check before dereferencing config
    - usb: typec: tcpm: Ignore unsupported/unknown alternate mode requests
    - can: rcar_canfd: fix possible IRQ storm on high load
    - can: flexcan: fix stop mode acknowledgment
    - can: flexcan: fix an use-after-free in flexcan_setup...

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Disco):
status: In Progress → Fix Committed

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-disco' to 'verification-done-disco'. If the problem still exists, change the tag 'verification-needed-disco' to 'verification-failed-disco'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-disco
Kieran Bingham (kieranbingham) wrote :

confirmed the 5.0.0-28-generic kernel from proposed works and provides VIMC functionality.
Thanks

tags: added: verification-done-disco
removed: verification-needed-disco

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Kieran Bingham (kieranbingham) wrote :

If I'm expected to test this on Bionic, how do I do that using EnableProposed on my Disco release?

Or can someone point me to the relevant kernel debs to manually install and test please?

Tested on bionic proposed kernel by manually installing the dpkgs.

modprobe vim2m
modprobe vivid
modprobe vimc

kbingham@Q:$ uname -a
Linux Q 4.15.0-63-generic #72-Ubuntu SMP Fri Sep 6 10:12:25 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

kbingham@Q:$ lsv4l2
video0: HP Wide Vision FHD Camera: HP W
video1: HP Wide Vision FHD Camera: HP I
video2: Raw Capture 0
video3: Raw Capture 1
video4: RGB/YUV Capture
video5: vivid-000-vid-cap
video6: vivid-000-vid-out
video7: vim2m

tags: added: verification-done-bionic
removed: verification-needed-bionic
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers