aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fb.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 1c510da04d16..981bdce3634e 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -57,9 +57,10 @@ static struct fb_ops intelfb_ops = {
57 .fb_debug_leave = drm_fb_helper_debug_leave, 57 .fb_debug_leave = drm_fb_helper_debug_leave,
58}; 58};
59 59
60static int intelfb_create(struct intel_fbdev *ifbdev, 60static int intelfb_create(struct drm_fb_helper *helper,
61 struct drm_fb_helper_surface_size *sizes) 61 struct drm_fb_helper_surface_size *sizes)
62{ 62{
63 struct intel_fbdev *ifbdev = (struct intel_fbdev *)helper;
63 struct drm_device *dev = ifbdev->helper.dev; 64 struct drm_device *dev = ifbdev->helper.dev;
64 struct drm_i915_private *dev_priv = dev->dev_private; 65 struct drm_i915_private *dev_priv = dev->dev_private;
65 struct fb_info *info; 66 struct fb_info *info;
@@ -181,26 +182,10 @@ out:
181 return ret; 182 return ret;
182} 183}
183 184
184static int intel_fb_find_or_create_single(struct drm_fb_helper *helper,
185 struct drm_fb_helper_surface_size *sizes)
186{
187 struct intel_fbdev *ifbdev = (struct intel_fbdev *)helper;
188 int new_fb = 0;
189 int ret;
190
191 if (!helper->fb) {
192 ret = intelfb_create(ifbdev, sizes);
193 if (ret)
194 return ret;
195 new_fb = 1;
196 }
197 return new_fb;
198}
199
200static struct drm_fb_helper_funcs intel_fb_helper_funcs = { 185static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
201 .gamma_set = intel_crtc_fb_gamma_set, 186 .gamma_set = intel_crtc_fb_gamma_set,
202 .gamma_get = intel_crtc_fb_gamma_get, 187 .gamma_get = intel_crtc_fb_gamma_get,
203 .fb_probe = intel_fb_find_or_create_single, 188 .fb_probe = intelfb_create,
204}; 189};
205 190
206static void intel_fbdev_destroy(struct drm_device *dev, 191static void intel_fbdev_destroy(struct drm_device *dev,