• Home
  • Raw
  • Download

Lines Matching refs:fb_info

17 static int activate(struct fb_info *fb_info, struct fb_var_screeninfo *var)  in activate()  argument
23 lock_fb_info(fb_info); in activate()
24 err = fb_set_var(fb_info, var); in activate()
26 fbcon_update_vcs(fb_info, var->activate & FB_ACTIVATE_ALL); in activate()
27 unlock_fb_info(fb_info); in activate()
59 struct fb_info *fb_info = dev_get_drvdata(device); in store_mode() local
69 list_for_each_entry(modelist, &fb_info->modelist, list) { in store_mode()
74 var = fb_info->var; in store_mode()
76 if ((err = activate(fb_info, &var))) in store_mode()
78 fb_info->mode = mode; in store_mode()
88 struct fb_info *fb_info = dev_get_drvdata(device); in show_mode() local
90 if (!fb_info->mode) in show_mode()
93 return mode_string(buf, 0, fb_info->mode); in show_mode()
100 struct fb_info *fb_info = dev_get_drvdata(device); in store_modes() local
108 lock_fb_info(fb_info); in store_modes()
110 list_splice(&fb_info->modelist, &old_list); in store_modes()
112 &fb_info->modelist); in store_modes()
113 if (fb_new_modelist(fb_info)) { in store_modes()
114 fb_destroy_modelist(&fb_info->modelist); in store_modes()
115 list_splice(&old_list, &fb_info->modelist); in store_modes()
119 unlock_fb_info(fb_info); in store_modes()
128 struct fb_info *fb_info = dev_get_drvdata(device); in show_modes() local
134 list_for_each_entry(modelist, &fb_info->modelist, list) { in show_modes()
144 struct fb_info *fb_info = dev_get_drvdata(device); in store_bpp() local
149 var = fb_info->var; in store_bpp()
151 if ((err = activate(fb_info, &var))) in store_bpp()
159 struct fb_info *fb_info = dev_get_drvdata(device); in show_bpp() local
160 return sysfs_emit(buf, "%d\n", fb_info->var.bits_per_pixel); in show_bpp()
167 struct fb_info *fb_info = dev_get_drvdata(device); in store_rotate() local
172 var = fb_info->var; in store_rotate()
175 if ((err = activate(fb_info, &var))) in store_rotate()
185 struct fb_info *fb_info = dev_get_drvdata(device); in show_rotate() local
187 return sysfs_emit(buf, "%d\n", fb_info->var.rotate); in show_rotate()
194 struct fb_info *fb_info = dev_get_drvdata(device); in store_virtual() local
199 var = fb_info->var; in store_virtual()
206 if ((err = activate(fb_info, &var))) in store_virtual()
214 struct fb_info *fb_info = dev_get_drvdata(device); in show_virtual() local
215 return sysfs_emit(buf, "%d,%d\n", fb_info->var.xres_virtual, in show_virtual()
216 fb_info->var.yres_virtual); in show_virtual()
222 struct fb_info *fb_info = dev_get_drvdata(device); in show_stride() local
223 return sysfs_emit(buf, "%d\n", fb_info->fix.line_length); in show_stride()
230 struct fb_info *fb_info = dev_get_drvdata(device); in store_blank() local
236 err = fb_blank(fb_info, arg); in store_blank()
238 fbcon_fb_blanked(fb_info, arg); in store_blank()
286 struct fb_info *fb_info = dev_get_drvdata(device); in store_pan() local
291 var = fb_info->var; in store_pan()
299 err = fb_pan_display(fb_info, &var); in store_pan()
310 struct fb_info *fb_info = dev_get_drvdata(device); in show_pan() local
311 return sysfs_emit(buf, "%d,%d\n", fb_info->var.xoffset, in show_pan()
312 fb_info->var.yoffset); in show_pan()
318 struct fb_info *fb_info = dev_get_drvdata(device); in show_name() local
320 return sysfs_emit(buf, "%s\n", fb_info->fix.id); in show_name()
327 struct fb_info *fb_info = dev_get_drvdata(device); in store_fbstate() local
334 lock_fb_info(fb_info); in store_fbstate()
336 fb_set_suspend(fb_info, (int)state); in store_fbstate()
338 unlock_fb_info(fb_info); in store_fbstate()
347 struct fb_info *fb_info = dev_get_drvdata(device); in show_fbstate() local
348 return sysfs_emit(buf, "%d\n", fb_info->state); in show_fbstate()
356 struct fb_info *fb_info = dev_get_drvdata(device); in store_bl_curve() local
363 if (!fb_info || !fb_info->bl_dev) in store_bl_curve()
385 mutex_lock(&fb_info->bl_curve_mutex); in store_bl_curve()
387 fb_info->bl_curve[i] = tmp_curve[i]; in store_bl_curve()
388 mutex_unlock(&fb_info->bl_curve_mutex); in store_bl_curve()
396 struct fb_info *fb_info = dev_get_drvdata(device); in show_bl_curve() local
403 if (!fb_info || !fb_info->bl_dev) in show_bl_curve()
406 mutex_lock(&fb_info->bl_curve_mutex); in show_bl_curve()
409 fb_info->bl_curve + i); in show_bl_curve()
410 mutex_unlock(&fb_info->bl_curve_mutex); in show_bl_curve()
437 static int fb_init_device(struct fb_info *fb_info) in fb_init_device() argument
441 dev_set_drvdata(fb_info->dev, fb_info); in fb_init_device()
443 fb_info->class_flag |= FB_SYSFS_FLAG_ATTR; in fb_init_device()
446 error = device_create_file(fb_info->dev, &device_attrs[i]); in fb_init_device()
454 device_remove_file(fb_info->dev, &device_attrs[i]); in fb_init_device()
455 fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR; in fb_init_device()
461 static void fb_cleanup_device(struct fb_info *fb_info) in fb_cleanup_device() argument
465 if (fb_info->class_flag & FB_SYSFS_FLAG_ATTR) { in fb_cleanup_device()
467 device_remove_file(fb_info->dev, &device_attrs[i]); in fb_cleanup_device()
469 fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR; in fb_cleanup_device()
473 int fb_device_create(struct fb_info *fb_info) in fb_device_create() argument
475 int node = fb_info->node; in fb_device_create()
479 fb_info->dev = device_create(fb_class, fb_info->device, devt, NULL, "fb%d", node); in fb_device_create()
480 if (IS_ERR(fb_info->dev)) { in fb_device_create()
482 ret = PTR_ERR(fb_info->dev); in fb_device_create()
484 fb_info->dev = NULL; in fb_device_create()
486 fb_init_device(fb_info); in fb_device_create()
492 void fb_device_destroy(struct fb_info *fb_info) in fb_device_destroy() argument
494 dev_t devt = MKDEV(FB_MAJOR, fb_info->node); in fb_device_destroy()
496 if (!fb_info->dev) in fb_device_destroy()
499 fb_cleanup_device(fb_info); in fb_device_destroy()
501 fb_info->dev = NULL; in fb_device_destroy()