[PATCH v3 11/13] drm/fb-helper: Fix single-probe color-format selection

Maíra Canal mcanal at igalia.com
Tue Jan 3 21:18:26 UTC 2023


Hi Thomas,

On 1/2/23 08:29, Thomas Zimmermann wrote:
> Fix the color-format selection of the single-probe helper. Go
> through all user-specified values and test each for compatibility
> with the driver. If none is supported, use the driver-provided
> default. This guarantees that the console is always available in
> any color format at least.
> 
> Until now, the format selection of the single-probe helper tried
> to either use a user-specified format or a 32-bit default format.
> If the user-specified format was not supported by the driver, the
> selection failed and the display remained blank.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
> ---

I started to get the following warning on the Raspberry Pi 4 Model B
(arm64/defconfig) using drm-misc-next:

[    4.376317] [drm] Initialized vc4 0.0.0 20140616 for gpu on minor 0
[    4.433587] vc4-drm gpu: [drm] bpp/depth value of 16/24 not supported
[    4.433617] vc4-drm gpu: [drm] bpp/depth value of 16/24 not supported
[    4.433629] vc4-drm gpu: [drm] bpp/depth value of 16/24 not supported
[    4.433640] vc4-drm gpu: [drm] bpp/depth value of 16/24 not supported
[    4.433650] vc4-drm gpu: [drm] bpp/depth value of 16/24 not supported
[    4.433658] vc4-drm gpu: [drm] No compatible format found
[    4.433854] ------------[ cut here ]------------
[    4.433861] WARNING: CPU: 2 PID: 66 at drivers/gpu/drm/drm_atomic.c:1604 __drm_atomic_helper_set_config+0x2e8/0x314 [drm]
[    4.434172] Modules linked in: btbcm(+) crct10dif_ce reset_raspberrypi clk_raspberrypi raspberrypi_hwmon bluetooth ecdh_generic ecc
pwm_bcm2835 broadcom rfkill iproc_rng200 bcm_phy_lib i2c_bcm2835 vc4 rng_core snd_soc_hdmi_codec bcm2711_thermal cec drm_display_helper
v3d pcie_brcmstb drm_dma_helper gpu_sched genet drm_shmem_helper nvmem_rmem mdio_bcm_unimac drm_kms_helper drm fuse ip_tables x_tables
ipv6
[    4.434322] CPU: 2 PID: 66 Comm: kworker/u8:2 Not tainted 6.1.0-rc6-00011-g37c90d589dc0 #29
[    4.434337] Hardware name: Raspberry Pi 4 Model B Rev 1.4 (DT)
[    4.434345] Workqueue: events_unbound deferred_probe_work_func
[    4.434376] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    4.434390] pc : __drm_atomic_helper_set_config+0x2e8/0x314 [drm]
[    4.434668] lr : __drm_atomic_helper_set_config+0x64/0x314 [drm]
[    4.434943] sp : ffff8000082c3840
[    4.434949] x29: ffff8000082c3850 x28: ffff2d6d448e12c0 x27: 0000000000000001
[    4.434972] x26: 0000000000000038 x25: ffff2d6d448e12c0 x24: ffff2d6d401a0690
[    4.434991] x23: ffff2d6d41f74080 x22: ffff2d6d40d8a400 x21: ffff2d6d433fcc00
[    4.435009] x20: ffff2d6d401a0690 x19: ffff2d6d44b8e180 x18: 0000000000000020
[    4.435027] x17: 0000000000000010 x16: ffffa6757bee52d0 x15: 0000000000000000
[    4.435044] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[    4.435063] x11: 0000000000000000 x10: ffff2d6d43240800 x9 : ffff2d6d44b8e200
[    4.435081] x8 : 0000000000000000 x7 : ffff2d6d44b8e180 x6 : ffff2d6d40d8a400
[    4.435099] x5 : ffff2d6d45e7ca80 x4 : 0000000000000050 x3 : ffffa675498c3bad
[    4.435116] x2 : 0000000000000004 x1 : ffff2d6d4323f080 x0 : ffff2d6d433fcc00
[    4.435136] Call trace:
[    4.435143]  __drm_atomic_helper_set_config+0x2e8/0x314 [drm]
[    4.435440]  drm_client_modeset_commit_atomic+0x140/0x244 [drm]
[    4.435723]  drm_client_modeset_commit_locked+0x50/0x168 [drm]
[    4.436001]  drm_client_modeset_commit+0x2c/0x54 [drm]
[    4.436273]  __drm_fb_helper_initial_config_and_unlock+0x548/0x5a0 [drm_kms_helper]
[    4.436407]  drm_fb_helper_initial_config+0x38/0x50 [drm_kms_helper]
[    4.436528]  drm_fbdev_client_hotplug+0xa8/0x120 [drm_kms_helper]
[    4.436648]  drm_fbdev_generic_setup+0x80/0x150 [drm_kms_helper]
[    4.436768]  vc4_drm_bind+0x1f0/0x22c [vc4]
[    4.436928]  try_to_bring_up_aggregate_device+0x168/0x1b4
[    4.436958]  __component_add+0xbc/0x15c
[    4.436974]  component_add+0x14/0x20
[    4.436990]  vc4_hdmi_dev_probe+0x1c/0x28 [vc4]
[    4.437146]  platform_probe+0xa8/0xd0
[    4.437158]  really_probe+0x130/0x2f4
[    4.437174]  __driver_probe_device+0xb4/0xe0
[    4.437189]  driver_probe_device+0x3c/0x1f8
[    4.437202]  __device_attach_driver+0x118/0x140
[    4.437217]  bus_for_each_drv+0x84/0xd0
[    4.437229]  __device_attach+0xd0/0x19c
[    4.437243]  device_initial_probe+0x14/0x20
[    4.437256]  bus_probe_device+0x34/0x98
[    4.437268]  deferred_probe_work_func+0x88/0xc4
[    4.437282]  process_one_work+0x1cc/0x2c8
[    4.437295]  worker_thread+0x248/0x458
[    4.437304]  kthread+0xec/0x198
[    4.437319]  ret_from_fork+0x10/0x20
[    4.437333] ---[ end trace 0000000000000000 ]---

After bisecting the problem, I was able to detect that the warning started to
appear on the commit 37c90d589dc0 ("drm/fb-helper: Fix single-probe color-format
selection").

Do you have any idea on what might be causing this warning?

Best Regards,
- Maíra Canal


More information about the dri-devel mailing list