aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/udl/udl_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/udl/udl_fb.c')
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index cf5d05a0d955..9f4be3d4a02e 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -476,9 +476,10 @@ udl_framebuffer_init(struct drm_device *dev,
476} 476}
477 477
478 478
479static int udlfb_create(struct udl_fbdev *ufbdev, 479static int udlfb_create(struct drm_fb_helper *helper,
480 struct drm_fb_helper_surface_size *sizes) 480 struct drm_fb_helper_surface_size *sizes)
481{ 481{
482 struct udl_fbdev *ufbdev = (struct udl_fbdev *)helper;
482 struct drm_device *dev = ufbdev->helper.dev; 483 struct drm_device *dev = ufbdev->helper.dev;
483 struct fb_info *info; 484 struct fb_info *info;
484 struct device *device = &dev->usbdev->dev; 485 struct device *device = &dev->usbdev->dev;
@@ -556,27 +557,10 @@ out:
556 return ret; 557 return ret;
557} 558}
558 559
559static int udl_fb_find_or_create_single(struct drm_fb_helper *helper,
560 struct drm_fb_helper_surface_size *sizes)
561{
562 struct udl_fbdev *ufbdev = (struct udl_fbdev *)helper;
563 int new_fb = 0;
564 int ret;
565
566 if (!helper->fb) {
567 ret = udlfb_create(ufbdev, sizes);
568 if (ret)
569 return ret;
570
571 new_fb = 1;
572 }
573 return new_fb;
574}
575
576static struct drm_fb_helper_funcs udl_fb_helper_funcs = { 560static struct drm_fb_helper_funcs udl_fb_helper_funcs = {
577 .gamma_set = udl_crtc_fb_gamma_set, 561 .gamma_set = udl_crtc_fb_gamma_set,
578 .gamma_get = udl_crtc_fb_gamma_get, 562 .gamma_get = udl_crtc_fb_gamma_get,
579 .fb_probe = udl_fb_find_or_create_single, 563 .fb_probe = udlfb_create,
580}; 564};
581 565
582static void udl_fbdev_destroy(struct drm_device *dev, 566static void udl_fbdev_destroy(struct drm_device *dev,