Lines Matching refs:info
152 * @info: fbdev registered by the helper
154 int drm_fb_helper_debug_enter(struct fb_info *info)
156 struct drm_fb_helper *helper = info->par;
188 * @info: fbdev registered by the helper
190 int drm_fb_helper_debug_leave(struct fb_info *info)
192 struct drm_fb_helper *helper = info->par;
335 static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode)
337 struct drm_fb_helper *fb_helper = info->par;
347 * @info: fbdev registered by the helper
349 int drm_fb_helper_blank(int blank, struct fb_info *info)
357 drm_fb_helper_dpms(info, DRM_MODE_DPMS_ON);
361 drm_fb_helper_dpms(info, DRM_MODE_DPMS_STANDBY);
365 drm_fb_helper_dpms(info, DRM_MODE_DPMS_STANDBY);
369 drm_fb_helper_dpms(info, DRM_MODE_DPMS_SUSPEND);
373 drm_fb_helper_dpms(info, DRM_MODE_DPMS_OFF);
526 struct fb_info *info;
529 info = framebuffer_alloc(0, dev);
530 if (!info)
533 ret = fb_alloc_cmap(&info->cmap, 256, 0);
545 info->apertures = alloc_apertures(1);
546 if (!info->apertures) {
551 fb_helper->fbdev = info;
552 info->skip_vt_switch = true;
554 return info;
557 fb_dealloc_cmap(&info->cmap);
559 framebuffer_release(info);
587 struct fb_info *info;
600 info = fb_helper->fbdev;
601 if (info) {
602 if (info->cmap.len)
603 fb_dealloc_cmap(&info->cmap);
604 framebuffer_release(info);
633 static void drm_fb_helper_dirty(struct fb_info *info, u32 x, u32 y,
636 struct drm_fb_helper *helper = info->par;
655 * @info: fb_info struct pointer
661 void drm_fb_helper_deferred_io(struct fb_info *info,
678 y1 = min / info->fix.line_length;
679 y2 = min_t(u32, DIV_ROUND_UP(max, info->fix.line_length),
680 info->var.yres);
681 drm_fb_helper_dirty(info, 0, y1, info->var.xres, y2 - y1);
688 * @info: fb_info struct pointer
695 ssize_t drm_fb_helper_sys_read(struct fb_info *info, char __user *buf,
698 return fb_sys_read(info, buf, count, ppos);
704 * @info: fb_info struct pointer
711 ssize_t drm_fb_helper_sys_write(struct fb_info *info, const char __user *buf,
716 ret = fb_sys_write(info, buf, count, ppos);
718 drm_fb_helper_dirty(info, 0, 0, info->var.xres,
719 info->var.yres);
727 * @info: fbdev registered by the helper
728 * @rect: info about rectangle to fill
732 void drm_fb_helper_sys_fillrect(struct fb_info *info,
735 sys_fillrect(info, rect);
736 drm_fb_helper_dirty(info, rect->dx, rect->dy,
743 * @info: fbdev registered by the helper
744 * @area: info about area to copy
748 void drm_fb_helper_sys_copyarea(struct fb_info *info,
751 sys_copyarea(info, area);
752 drm_fb_helper_dirty(info, area->dx, area->dy,
759 * @info: fbdev registered by the helper
760 * @image: info about image to blit
764 void drm_fb_helper_sys_imageblit(struct fb_info *info,
767 sys_imageblit(info, image);
768 drm_fb_helper_dirty(info, image->dx, image->dy,
775 * @info: fbdev registered by the helper
776 * @rect: info about rectangle to fill
780 void drm_fb_helper_cfb_fillrect(struct fb_info *info,
783 cfb_fillrect(info, rect);
784 drm_fb_helper_dirty(info, rect->dx, rect->dy,
791 * @info: fbdev registered by the helper
792 * @area: info about area to copy
796 void drm_fb_helper_cfb_copyarea(struct fb_info *info,
799 cfb_copyarea(info, area);
800 drm_fb_helper_dirty(info, area->dx, area->dy,
807 * @info: fbdev registered by the helper
808 * @image: info about image to blit
812 void drm_fb_helper_cfb_imageblit(struct fb_info *info,
815 cfb_imageblit(info, image);
816 drm_fb_helper_dirty(info, image->dx, image->dy,
883 static int setcmap_pseudo_palette(struct fb_cmap *cmap, struct fb_info *info)
885 u32 *palette = (u32 *)info->pseudo_palette;
897 red >>= 16 - info->var.red.length;
898 green >>= 16 - info->var.green.length;
899 blue >>= 16 - info->var.blue.length;
900 value = (red << info->var.red.offset) |
901 (green << info->var.green.offset) |
902 (blue << info->var.blue.offset);
903 if (info->var.transp.length > 0) {
904 u32 mask = (1 << info->var.transp.length) - 1;
906 mask <<= info->var.transp.offset;
915 static int setcmap_legacy(struct fb_cmap *cmap, struct fb_info *info)
917 struct drm_fb_helper *fb_helper = info->par;
998 static int setcmap_atomic(struct fb_cmap *cmap, struct fb_info *info)
1000 struct drm_fb_helper *fb_helper = info->par;
1084 * @info: fbdev registered by the helper
1086 int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
1088 struct drm_fb_helper *fb_helper = info->par;
1103 if (info->fix.visual == FB_VISUAL_TRUECOLOR)
1104 ret = setcmap_pseudo_palette(cmap, info);
1106 ret = setcmap_atomic(cmap, info);
1108 ret = setcmap_legacy(cmap, info);
1121 * @info: fbdev registered by the helper
1128 int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd,
1131 struct drm_fb_helper *fb_helper = info->par;
1266 * @info: fbdev registered by the helper
1269 struct fb_info *info)
1271 struct drm_fb_helper *fb_helper = info->par;
1328 if (!drm_fb_pixel_format_equal(var, &info->var)) {
1339 * @info: fbdev registered by the helper
1345 int drm_fb_helper_set_par(struct fb_info *info)
1347 struct drm_fb_helper *fb_helper = info->par;
1348 struct fb_var_screeninfo *var = &info->var;
1396 struct fb_info *info)
1398 struct drm_fb_helper *fb_helper = info->par;
1405 info->var.xoffset = var->xoffset;
1406 info->var.yoffset = var->yoffset;
1408 pan_set(fb_helper, info->var.xoffset, info->var.yoffset);
1414 struct fb_info *info)
1416 struct drm_fb_helper *fb_helper = info->par;
1430 info->var.xoffset = var->xoffset;
1431 info->var.yoffset = var->yoffset;
1444 * @info: fbdev registered by the helper
1447 struct fb_info *info)
1449 struct drm_fb_helper *fb_helper = info->par;
1463 ret = pan_display_atomic(var, info);
1465 ret = pan_display_legacy(var, info);
1476 * Allocates the backing storage and sets up the fbdev info structure through
1651 static void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
1654 info->fix.type = FB_TYPE_PACKED_PIXELS;
1655 info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
1657 info->fix.mmio_start = 0;
1658 info->fix.mmio_len = 0;
1659 info->fix.type_aux = 0;
1660 info->fix.xpanstep = 1; /* doing it in hw */
1661 info->fix.ypanstep = 1; /* doing it in hw */
1662 info->fix.ywrapstep = 0;
1663 info->fix.accel = FB_ACCEL_NONE;
1665 info->fix.line_length = pitch;
1668 static void drm_fb_helper_fill_var(struct fb_info *info,
1676 info->pseudo_palette = fb_helper->pseudo_palette;
1677 info->var.xres_virtual = fb->width;
1678 info->var.yres_virtual = fb->height;
1679 info->var.bits_per_pixel = fb->format->cpp[0] * 8;
1680 info->var.accel_flags = FB_ACCELF_TEXT;
1681 info->var.xoffset = 0;
1682 info->var.yoffset = 0;
1683 info->var.activate = FB_ACTIVATE_NOW;
1685 drm_fb_helper_fill_pixel_fmt(&info->var, fb->format->depth);
1687 info->var.xres = fb_width;
1688 info->var.yres = fb_height;
1693 * @info: fbdev instance to set up
1704 void drm_fb_helper_fill_info(struct fb_info *info,
1710 drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
1711 drm_fb_helper_fill_var(info, fb_helper,
1714 info->par = fb_helper;
1715 snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb",
1732 struct fb_info *info = fb_helper->fbdev;
1757 info->var.width = connector->display_info.width_mm;
1758 info->var.height = connector->display_info.height_mm;
1766 info->fbcon_rotate_hint = FB_ROTATE_UR;
1769 info->fbcon_rotate_hint = FB_ROTATE_CCW;
1772 info->fbcon_rotate_hint = FB_ROTATE_UD;
1775 info->fbcon_rotate_hint = FB_ROTATE_CW;
1783 info->fbcon_rotate_hint = FB_ROTATE_UR;
1793 struct fb_info *info;
1816 info = fb_helper->fbdev;
1817 info->var.pixclock = 0;
1823 info->flags |= FBINFO_HIDE_SMEM_START;
1830 ret = register_framebuffer(info);
1835 info->node, info->fix.id);
1860 * to let the driver allocate and initialize the fbdev info structure and the
1862 * as a helper to setup simple default values for the fbdev info structure.
1986 static int drm_fbdev_fb_open(struct fb_info *info, int user)
1988 struct drm_fb_helper *fb_helper = info->par;
1997 static int drm_fbdev_fb_release(struct fb_info *info, int user)
1999 struct drm_fb_helper *fb_helper = info->par;
2038 static void drm_fbdev_fb_destroy(struct fb_info *info)
2040 drm_fbdev_release(info->par);
2043 static int drm_fbdev_fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
2045 struct drm_fb_helper *fb_helper = info->par;