diff options
Diffstat (limited to 'drivers/gpu/drm/sysfb/efidrm.c')
| -rw-r--r-- | drivers/gpu/drm/sysfb/efidrm.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/gpu/drm/sysfb/efidrm.c b/drivers/gpu/drm/sysfb/efidrm.c index 1b683d55d6ea..50e0aeef709c 100644 --- a/drivers/gpu/drm/sysfb/efidrm.c +++ b/drivers/gpu/drm/sysfb/efidrm.c @@ -4,7 +4,7 @@ #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> @@ -24,7 +24,6 @@ #include <drm/drm_print.h> #include <drm/drm_probe_helper.h> -#include <video/edid.h> #include <video/pixel_format.h> #include "drm_sysfb_helper.h" @@ -141,6 +140,7 @@ static const struct drm_mode_config_funcs efidrm_mode_config_funcs = { 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; @@ -160,9 +160,11 @@ static struct efidrm_device *efidrm_device_create(struct drm_driver *drv, 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); @@ -204,8 +206,8 @@ static struct efidrm_device *efidrm_device_create(struct drm_driver *drv, &format->format, width, height, stride); #if defined(CONFIG_FIRMWARE_EDID) - if (drm_edid_header_is_valid(edid_info.dummy) == 8) - sysfb->edid = edid_info.dummy; + if (drm_edid_header_is_valid(dpy->edid.dummy) == 8) + sysfb->edid = dpy->edid.dummy; #endif sysfb->fb_mode = drm_sysfb_mode(width, height, 0, 0); sysfb->fb_format = format; |
