]> git.baikalelectronics.ru Git - kernel.git/commit
fbdev: Prevent probing generic drivers if a FB is already registered
authorJavier Martinez Canillas <javierm@redhat.com>
Thu, 11 Nov 2021 11:57:57 +0000 (12:57 +0100)
committerJavier Martinez Canillas <javierm@redhat.com>
Wed, 17 Nov 2021 09:15:05 +0000 (10:15 +0100)
commitff33729587d2a6793ed44a73de0a4da5a7b3ddf1
tree1c5cf23c0590bc95cf5b43aca47c1509849a8d52
parent353fdf84955f288af815f8333c34fa42c9749e04
fbdev: Prevent probing generic drivers if a FB is already registered

The efifb and simplefb drivers just render to a pre-allocated frame buffer
and rely on the display hardware being initialized before the kernel boots.

But if another driver already probed correctly and registered a fbdev, the
generic drivers shouldn't be probed since an actual driver for the display
hardware is already present.

This is more likely to occur after commit 69900494ffa5 ("drivers/firmware:
move x86 Generic System Framebuffers support") since the "efi-framebuffer"
and "simple-framebuffer" platform devices are registered at a later time.

Link: https://lore.kernel.org/r/20211110200253.rfudkt3edbd3nsyj@lahvuun/
Fixes: 69900494ffa5 ("drivers/firmware: move x86 Generic System Framebuffers support")
Reported-by: Ilya Trukhanov <lahvuun@gmail.com>
Cc: <stable@vger.kernel.org> # 5.15.x
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: Ilya Trukhanov <lahvuun@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211111115757.1351045-1-javierm@redhat.com
drivers/video/fbdev/efifb.c
drivers/video/fbdev/simplefb.c