[PATCH] [SRU] [X/raspi2] Fix kernel hang when vc4 is enabled and fb0 is
paolo.pisati at canonical.com
Thu Aug 3 10:17:12 UTC 2017
There is a kernel hang in 4.4.y if the vc4 driver is enabled, and another
program opens /dev/fb0 to display an image.
The problem is present in 4.4 up to 4.8 - the fix was found by bisecting between
4.7 and 4.8, and rebasing the Raspberry BSP on top of each bisect - it's a clean
cherry-pick from upstream.
Apply the attached patch and recompile the kernel.
How to test:
Enable the gpu hardware acceleration by loading the vc4 overlay:
reboot and check that vc4 was activated:
$ dmesg | grep vc4
[ 15.274385] vc4-drm soc:gpu: bound 3f902000.hdmi (ops vc4_hdmi_ops [vc4])
[ 15.274660] vc4_dsi 3f700000.dsi: DSI not set up by firmware.
[ 15.274753] vc4-drm soc:gpu: bound 3f700000.dsi (ops vc4_dsi_ops [vc4])
[ 15.274873] vc4-drm soc:gpu: bound 3f400000.hvs (ops vc4_hvs_ops [vc4])
[ 15.275178] vc4-drm soc:gpu: bound 3f206000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 15.275407] vc4-drm soc:gpu: bound 3f207000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 15.275643] vc4-drm soc:gpu: bound 3f807000.pixelvalve (ops vc4_crtc_ops [vc4])
[ 15.275818] vc4-drm soc:gpu: bound 3fc00000.v3d (ops vc4_v3d_ops [vc4])
[ 15.403354] vc4-drm soc:gpu: fb0: frame buffer device
then download and compile psplash:
$ git clone git://git.yoctoproject.org/psplash
$ cd psplash
$ autoreconf --install
$ sudo ./psplash
here the board should hang, pull the plug to get it back.
Now install the patched kernel, and execute psplash again - the board will be
fine, and a bitmap will be displayed on hdmi, ctrl+c to exit psplash.
Robin Murphy (1):
drm/fb_cma_helper: Implement fb_mmap callback
drivers/gpu/drm/drm_fb_cma_helper.c | 8 ++++++++
1 file changed, 8 insertions(+)
More information about the kernel-team