diff options
author | Dave Airlie <airlied@redhat.com> | 2022-06-22 10:32:55 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2022-06-22 10:33:09 +1000 |
commit | 0a2af0bd6e48775646dea5f3524a52a74afae7e0 (patch) | |
tree | 93034a346b2e8f12d13be8282be3953ab47cd6b4 /drivers/video/fbdev | |
parent | Merge tag 'drm-misc-next-2022-06-08' of git://anongit.freedesktop.org/drm/drm-misc into drm-next (diff) | |
parent | iosys-map: Fix typo in documentation (diff) | |
download | linux-dev-0a2af0bd6e48775646dea5f3524a52a74afae7e0.tar.xz linux-dev-0a2af0bd6e48775646dea5f3524a52a74afae7e0.zip |
Merge tag 'drm-misc-next-2022-06-17' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for v5.20:
UAPI Changes:
Cross-subsystem Changes:
* dma-buf: Add sync-file API; Set DMA mask for udmabuf devices
* fbcon: Cleanups
* fbdev: Disable firmware-device registration when first native driver loads
* iosys-map: Documentation fixes
Core Changes:
* edid: Use struct drm_edid in more places
* gem-cma-helper: Improve documentation
* of: Add data-lane helpers and convert drivers
* syncobj: Fixes
Driver Changes:
* amdgpu: Build fixes
* ast: Support multiple outputs
* bochs: Include <linux/module.h>
* bridge: adv7511: I2C fixes; anx7625: Fix error handling; lt6505: Kconfig fixes
* display/dp: Documentation fixes
* display/dp-mst: Read extended DPCD capabilities during system resume
* logicvc: Add new driver
* magag200: Build fixes
* nouveau: Cleanups
* panel: Add backlight support; nt36672a: DT backlight support
* qxl: Cleanups
* sun4i: HDMI PHY cleanups
* vc4: Add support for BCM2711
* virt-gpu: Avoid NULL dereference; Fix error checks; Cleanups
* vkms: Allocate output buffer with vmalloc(); Fixes
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/YqwriEhn0l4uO+Gn@linux-uq9g
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r-- | drivers/video/fbdev/Kconfig | 2 | ||||
-rw-r--r-- | drivers/video/fbdev/core/fbcon.c | 1 | ||||
-rw-r--r-- | drivers/video/fbdev/core/fbmem.c | 12 | ||||
-rw-r--r-- | drivers/video/fbdev/efifb.c | 11 | ||||
-rw-r--r-- | drivers/video/fbdev/simplefb.c | 11 |
5 files changed, 13 insertions, 24 deletions
diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index bd849013f16f..f2a6b81e45c4 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -616,7 +616,7 @@ config FB_UVESA config FB_VESA bool "VESA VGA graphics support" - depends on (FB = y) && (X86 || COMPILE_TEST) + depends on (FB = y) && X86 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index c4e91715ef00..d765bbdf19dc 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2182,7 +2182,6 @@ static int fbcon_switch(struct vc_data *vc) if (logo_shown == FBCON_LOGO_DRAW) { logo_shown = fg_console; - /* This is protected above by initmem_freed */ fb_show_logo(info, ops->rotate); update_region(vc, vc->vc_origin + vc->vc_size_row * vc->vc_top, diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 2a1a425ceb98..c4a18322dee9 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -19,6 +19,7 @@ #include <linux/kernel.h> #include <linux/major.h> #include <linux/slab.h> +#include <linux/sysfb.h> #include <linux/mm.h> #include <linux/mman.h> #include <linux/vt.h> @@ -1764,6 +1765,17 @@ int remove_conflicting_framebuffers(struct apertures_struct *a, do_free = true; } + /* + * If a driver asked to unregister a platform device registered by + * sysfb, then can be assumed that this is a driver for a display + * that is set up by the system firmware and has a generic driver. + * + * Drivers for devices that don't have a generic driver will never + * ask for this, so let's assume that a real driver for the display + * was already probed and prevent sysfb to register devices later. + */ + sysfb_disable(); + mutex_lock(®istration_lock); do_remove_conflicting_framebuffers(a, name, primary); mutex_unlock(®istration_lock); diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c index b3d5f884c544..16c1aaae9afa 100644 --- a/drivers/video/fbdev/efifb.c +++ b/drivers/video/fbdev/efifb.c @@ -358,17 +358,6 @@ static int efifb_probe(struct platform_device *dev) char *option = NULL; efi_memory_desc_t md; - /* - * Generic drivers must not be registered if a framebuffer exists. - * If a native driver was probed, the display hardware was already - * taken and attempting to use the system framebuffer is dangerous. - */ - if (num_registered_fb > 0) { - dev_err(&dev->dev, - "efifb: a framebuffer is already registered\n"); - return -EINVAL; - } - if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI || pci_dev_disabled) return -ENODEV; diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c index 2c198561c338..991a31846ae7 100644 --- a/drivers/video/fbdev/simplefb.c +++ b/drivers/video/fbdev/simplefb.c @@ -419,17 +419,6 @@ static int simplefb_probe(struct platform_device *pdev) struct simplefb_par *par; struct resource *res, *mem; - /* - * Generic drivers must not be registered if a framebuffer exists. - * If a native driver was probed, the display hardware was already - * taken and attempting to use the system framebuffer is dangerous. - */ - if (num_registered_fb > 0) { - dev_err(&pdev->dev, - "simplefb: a framebuffer is already registered\n"); - return -EINVAL; - } - if (fb_get_options("simplefb", NULL)) return -ENODEV; |