aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2019-04-01 17:46:55 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-04-01 17:46:55 +0200
commit80cf96357db7f0f41912c7ff30ae5f01ef515993 (patch)
treea12c44f17f24513be1edb0096fe739c9fe4b472b /drivers/video
parentfbdev: atafb: Remove obsolete module support (diff)
downloadlinux-dev-80cf96357db7f0f41912c7ff30ae5f01ef515993.tar.xz
linux-dev-80cf96357db7f0f41912c7ff30ae5f01ef515993.zip
fbdev: atafb: Fix broken frame buffer after kexec
On Falcon, Atari frame buffer initialization relies on preprogrammed register values. These register values are changed to blank the console. Hence when using kexec to boot into a new kernel while the console is blanked, the new kernel cannot determine the current video configuration, and the Atari frame buffer driver fails to initialize: atafb: phys_screen_base 6ce000 screen_len 4096 Fix this by doing a straight-forward conversion of the driver to a platform device driver, and adding a shutdown handler that unblanks the display. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Schmitz <schmitzmic@gmail.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/atafb.c34
1 files changed, 30 insertions, 4 deletions
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index d82007c113e6..4db8166d11b3 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -54,6 +54,7 @@
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
+#include <linux/platform_device.h>
#include <asm/setup.h>
#include <linux/uaccess.h>
@@ -3072,7 +3073,7 @@ int __init atafb_setup(char *options)
return 0;
}
-int __init atafb_init(void)
+static int __init atafb_probe(struct platform_device *pdev)
{
int pad, detected_mode, error;
unsigned int defmode = 0;
@@ -3084,9 +3085,6 @@ int __init atafb_init(void)
atafb_setup(option);
printk("atafb_init: start\n");
- if (!MACH_IS_ATARI)
- return -ENODEV;
-
do {
#ifdef ATAFB_EXT
if (external_addr) {
@@ -3247,4 +3245,32 @@ int __init atafb_init(void)
return 0;
}
+static void atafb_shutdown(struct platform_device *pdev)
+{
+ /* Unblank before kexec */
+ if (fbhw->blank)
+ fbhw->blank(0);
+}
+
+static struct platform_driver atafb_driver = {
+ .shutdown = atafb_shutdown,
+ .driver = {
+ .name = "atafb",
+ },
+};
+
+static int __init atafb_init(void)
+{
+ struct platform_device *pdev;
+
+ if (!MACH_IS_ATARI)
+ return -ENODEV;
+
+ pdev = platform_device_register_simple("atafb", -1, NULL, 0);
+ if (IS_ERR(pdev))
+ return PTR_ERR(pdev);
+
+ return platform_driver_probe(&atafb_driver, atafb_probe);
+}
+
device_initcall(atafb_init);