summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-11-26 17:03:22 +0100
committerArd Biesheuvel <ardb@kernel.org>2025-12-16 14:12:44 +0100
commit08e583ad68577ff5135d2b6fad1d3b4b400074a5 (patch)
treeef5bc43536a86f989a7d9eb628da0badcc3108bc /drivers/video/fbdev
parenta41e0ab394e42c7c09ddd8155d2cc3ca17bdce55 (diff)
sysfb: Pass sysfb_primary_display to devices
Instead of screen_info, store a copy of sysfb_primary_display as device data. Pick it up in drivers. Later changes will add additional data to the display info, such as EDID information. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Richard Lyu <richard.lyu@suse.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/efifb.c10
-rw-r--r--drivers/video/fbdev/vesafb.c10
-rw-r--r--drivers/video/fbdev/vga16fb.c8
3 files changed, 17 insertions, 11 deletions
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index 0e1bd3dba255..47ebc0107209 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -15,7 +15,7 @@
#include <linux/fb.h>
#include <linux/platform_device.h>
#include <linux/printk.h>
-#include <linux/screen_info.h>
+#include <linux/sysfb.h>
#include <video/vga.h>
#include <asm/efi.h>
#include <drm/drm_utils.h> /* For drm_get_panel_orientation_quirk */
@@ -345,6 +345,7 @@ ATTRIBUTE_GROUPS(efifb);
static int efifb_probe(struct platform_device *dev)
{
+ struct sysfb_display_info *dpy;
struct screen_info *si;
struct fb_info *info;
struct efifb_par *par;
@@ -360,10 +361,11 @@ static int efifb_probe(struct platform_device *dev)
* driver. We get a copy of the attached screen_info, so that we can
* modify its values without affecting later drivers.
*/
- si = dev_get_platdata(&dev->dev);
- if (!si)
+ dpy = dev_get_platdata(&dev->dev);
+ if (!dpy)
return -ENODEV;
- si = devm_kmemdup(&dev->dev, si, sizeof(*si), GFP_KERNEL);
+
+ si = devm_kmemdup(&dev->dev, &dpy->screen, sizeof(*si), GFP_KERNEL);
if (!si)
return -ENOMEM;
diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c
index f135033c22fb..f84f4db244bf 100644
--- a/drivers/video/fbdev/vesafb.c
+++ b/drivers/video/fbdev/vesafb.c
@@ -20,7 +20,7 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/screen_info.h>
+#include <linux/sysfb.h>
#include <linux/io.h>
#include <video/vga.h>
@@ -243,6 +243,7 @@ static int vesafb_setup(char *options)
static int vesafb_probe(struct platform_device *dev)
{
+ struct sysfb_display_info *dpy;
struct screen_info *si;
struct fb_info *info;
struct vesafb_par *par;
@@ -257,10 +258,11 @@ static int vesafb_probe(struct platform_device *dev)
* driver. We get a copy of the attached screen_info, so that we can
* modify its values without affecting later drivers.
*/
- si = dev_get_platdata(&dev->dev);
- if (!si)
+ dpy = dev_get_platdata(&dev->dev);
+ if (!dpy)
return -ENODEV;
- si = devm_kmemdup(&dev->dev, si, sizeof(*si), GFP_KERNEL);
+
+ si = devm_kmemdup(&dev->dev, &dpy->screen, sizeof(*si), GFP_KERNEL);
if (!si)
return -ENOMEM;
diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
index 6b81337a4909..22085d3668e8 100644
--- a/drivers/video/fbdev/vga16fb.c
+++ b/drivers/video/fbdev/vga16fb.c
@@ -21,7 +21,7 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/screen_info.h>
+#include <linux/sysfb.h>
#include <asm/io.h>
#include <video/vga.h>
@@ -1305,15 +1305,17 @@ static const struct fb_ops vga16fb_ops = {
static int vga16fb_probe(struct platform_device *dev)
{
+ struct sysfb_display_info *dpy;
struct screen_info *si;
struct fb_info *info;
struct vga16fb_par *par;
int i;
int ret = 0;
- si = dev_get_platdata(&dev->dev);
- if (!si)
+ dpy = dev_get_platdata(&dev->dev);
+ if (!dpy)
return -ENODEV;
+ si = &dpy->screen;
ret = check_mode_supported(si);
if (ret)