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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index d5df555aeba0..9688bfa92ccd 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -203,6 +203,7 @@ static int udl_fb_open(struct fb_info *info, int user)
203 203
204 ufbdev->fb_count++; 204 ufbdev->fb_count++;
205 205
206#ifdef CONFIG_DRM_FBDEV_EMULATION
206 if (fb_defio && (info->fbdefio == NULL)) { 207 if (fb_defio && (info->fbdefio == NULL)) {
207 /* enable defio at last moment if not disabled by client */ 208 /* enable defio at last moment if not disabled by client */
208 209
@@ -218,6 +219,7 @@ static int udl_fb_open(struct fb_info *info, int user)
218 info->fbdefio = fbdefio; 219 info->fbdefio = fbdefio;
219 fb_deferred_io_init(info); 220 fb_deferred_io_init(info);
220 } 221 }
222#endif
221 223
222 pr_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n", 224 pr_notice("open /dev/fb%d user=%d fb_info=%p count=%d\n",
223 info->node, user, info, ufbdev->fb_count); 225 info->node, user, info, ufbdev->fb_count);
@@ -235,12 +237,14 @@ static int udl_fb_release(struct fb_info *info, int user)
235 237
236 ufbdev->fb_count--; 238 ufbdev->fb_count--;
237 239
240#ifdef CONFIG_DRM_FBDEV_EMULATION
238 if ((ufbdev->fb_count == 0) && (info->fbdefio)) { 241 if ((ufbdev->fb_count == 0) && (info->fbdefio)) {
239 fb_deferred_io_cleanup(info); 242 fb_deferred_io_cleanup(info);
240 kfree(info->fbdefio); 243 kfree(info->fbdefio);
241 info->fbdefio = NULL; 244 info->fbdefio = NULL;
242 info->fbops->fb_mmap = udl_fb_mmap; 245 info->fbops->fb_mmap = udl_fb_mmap;
243 } 246 }
247#endif
244 248
245 pr_warn("released /dev/fb%d user=%d count=%d\n", 249 pr_warn("released /dev/fb%d user=%d count=%d\n",
246 info->node, user, ufbdev->fb_count); 250 info->node, user, ufbdev->fb_count);