Commit 4c28d3f2 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Hongchen Zhang
Browse files

fbdev: Prevent probing generic drivers if a FB is already registered

mainline inclusion
from mainline-v5.16-rc2
commit fb561bf9
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I5OHOB
CVE: NA

--------------------------------

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 d391c582 ("drivers/firmware:
move x86 Generic System Framebuffers support") since the "efi-framebuffer"
and "simple-framebuffer" platform devices are registered at a later time.

Change-Id: I4ee992c1c0da00e0dc38e4a3113eee85a8f45b20
Link: https://lore.kernel.org/r/20211110200253.rfudkt3edbd3nsyj@lahvuun/


Fixes: d391c582 ("drivers/firmware: move x86 Generic System Framebuffers support")
Reported-by: default avatarIlya Trukhanov <lahvuun@gmail.com>
Cc: <stable@vger.kernel.org> # 5.15.x
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Tested-by: default avatarIlya Trukhanov <lahvuun@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211111115757.1351045-1-javierm@redhat.com


Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 86c4e711
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment