static __init int sysfb_init(void)
{
- struct screen_info *si = &sysfb_primary_display.screen;
+ struct sysfb_display_info *dpy = &sysfb_primary_display;
+ struct screen_info *si = &dpy->screen;
struct device *parent;
unsigned int type;
struct simplefb_platform_data mode;
sysfb_set_efifb_fwnode(si, pd);
- ret = platform_device_add_data(pd, si, sizeof(*si));
+ ret = platform_device_add_data(pd, dpy, sizeof(*dpy));
if (ret)
goto err;
#include <linux/efi.h>
#include <linux/limits.h>
#include <linux/platform_device.h>
-#include <linux/screen_info.h>
+#include <linux/sysfb.h>
#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
static struct efidrm_device *efidrm_device_create(struct drm_driver *drv,
struct platform_device *pdev)
{
+ const struct sysfb_display_info *dpy;
const struct screen_info *si;
const struct drm_format_info *format;
int width, height, stride;
size_t nformats;
int ret;
- si = dev_get_platdata(&pdev->dev);
- if (!si)
+ dpy = dev_get_platdata(&pdev->dev);
+ if (!dpy)
return ERR_PTR(-ENODEV);
+ si = &dpy->screen;
+
if (screen_info_video_type(si) != VIDEO_TYPE_EFI)
return ERR_PTR(-ENODEV);
#include <linux/ioport.h>
#include <linux/limits.h>
#include <linux/platform_device.h>
-#include <linux/screen_info.h>
+#include <linux/sysfb.h>
#include <drm/clients/drm_client_setup.h>
#include <drm/drm_atomic.h>
static struct vesadrm_device *vesadrm_device_create(struct drm_driver *drv,
struct platform_device *pdev)
{
+ const struct sysfb_display_info *dpy;
const struct screen_info *si;
const struct drm_format_info *format;
int width, height, stride;
size_t nformats;
int ret;
- si = dev_get_platdata(&pdev->dev);
- if (!si)
+ dpy = dev_get_platdata(&pdev->dev);
+ if (!dpy)
return ERR_PTR(-ENODEV);
+ si = &dpy->screen;
+
if (screen_info_video_type(si) != VIDEO_TYPE_VLFB)
return ERR_PTR(-ENODEV);
#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 */
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;
* 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;
#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>
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;
* 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;
#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>
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)