Lines Matching refs:info
73 static int sh7760fb_blank(int blank, struct fb_info *info) in sh7760fb_blank() argument
75 struct sh7760fb_par *par = info->par; in sh7760fb_blank()
102 u_int transp, struct fb_info *info) in sh7760_setcolreg() argument
104 u32 *palette = info->pseudo_palette; in sh7760_setcolreg()
111 red >>= 16 - info->var.red.length; in sh7760_setcolreg()
112 green >>= 16 - info->var.green.length; in sh7760_setcolreg()
113 blue >>= 16 - info->var.blue.length; in sh7760_setcolreg()
114 transp >>= 16 - info->var.transp.length; in sh7760_setcolreg()
116 palette[regno] = (red << info->var.red.offset) | in sh7760_setcolreg()
117 (green << info->var.green.offset) | in sh7760_setcolreg()
118 (blue << info->var.blue.offset) | in sh7760_setcolreg()
119 (transp << info->var.transp.offset); in sh7760_setcolreg()
169 struct fb_info *info) in sh7760fb_check_var() argument
171 struct fb_fix_screeninfo *fix = &info->fix; in sh7760fb_check_var()
172 struct sh7760fb_par *par = info->par; in sh7760fb_check_var()
176 ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, NULL); in sh7760fb_check_var()
199 static int sh7760fb_set_par(struct fb_info *info) in sh7760fb_set_par() argument
201 struct sh7760fb_par *par = info->par; in sh7760fb_set_par()
213 dev_dbg(info->dev, "rotation disabled due to display size\n"); in sh7760fb_set_par()
228 ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, &gray); in sh7760fb_set_par()
232 dev_dbg(info->dev, "%dx%d %dbpp %s (orientation %s)\n", hdcn, in sh7760fb_set_par()
250 sh7760fb_blank(FB_BLANK_POWERDOWN, info); in sh7760fb_set_par()
312 dev_dbg(info->dev, " ***** DSTN untested! *****\n"); in sh7760fb_set_par()
326 info->fix.line_length = stride; in sh7760fb_set_par()
328 sh7760fb_check_var(&info->var, info); in sh7760fb_set_par()
330 sh7760fb_blank(FB_BLANK_UNBLANK, info); /* panel on! */ in sh7760fb_set_par()
332 dev_dbg(info->dev, "hdcn : %6d htcn : %6d\n", hdcn, htcn); in sh7760fb_set_par()
333 dev_dbg(info->dev, "hsynw : %6d hsynp : %6d\n", hsynw, hsynp); in sh7760fb_set_par()
334 dev_dbg(info->dev, "vdln : %6d vtln : %6d\n", vdln, vtln); in sh7760fb_set_par()
335 dev_dbg(info->dev, "vsynw : %6d vsynp : %6d\n", vsynw, vsynp); in sh7760fb_set_par()
336 dev_dbg(info->dev, "clksrc: %6d clkdiv: %6d\n", in sh7760fb_set_par()
338 dev_dbg(info->dev, "ldpmmr: 0x%04x ldpspr: 0x%04x\n", par->pd->ldpmmr, in sh7760fb_set_par()
340 dev_dbg(info->dev, "ldmtr : 0x%04x lddfr : 0x%04x\n", ldmtr, lddfr); in sh7760fb_set_par()
341 dev_dbg(info->dev, "ldlaor: %ld\n", stride); in sh7760fb_set_par()
342 dev_dbg(info->dev, "ldsaru: 0x%08lx ldsarl: 0x%08lx\n", sbase, ldsarl); in sh7760fb_set_par()
358 static void sh7760fb_free_mem(struct fb_info *info) in sh7760fb_free_mem() argument
360 struct sh7760fb_par *par = info->par; in sh7760fb_free_mem()
362 if (!info->screen_base) in sh7760fb_free_mem()
365 dma_free_coherent(info->dev, info->screen_size, in sh7760fb_free_mem()
366 info->screen_base, par->fbdma); in sh7760fb_free_mem()
369 info->screen_base = NULL; in sh7760fb_free_mem()
370 info->screen_size = 0; in sh7760fb_free_mem()
376 static int sh7760fb_alloc_mem(struct fb_info *info) in sh7760fb_alloc_mem() argument
378 struct sh7760fb_par *par = info->par; in sh7760fb_alloc_mem()
383 if (info->screen_base) in sh7760fb_alloc_mem()
387 ret = sh7760fb_get_color_info(info->dev, par->pd->lddfr, &bpp, NULL); in sh7760fb_alloc_mem()
396 vram = info->var.xres * info->var.yres; in sh7760fb_alloc_mem()
397 if (info->var.grayscale) { in sh7760fb_alloc_mem()
407 dev_dbg(info->dev, "too much VRAM required. Check settings\n"); in sh7760fb_alloc_mem()
414 fbmem = dma_alloc_coherent(info->dev, vram, &par->fbdma, GFP_KERNEL); in sh7760fb_alloc_mem()
420 sh7760fb_free_mem(info); in sh7760fb_alloc_mem()
421 dev_err(info->dev, "kernel gave me memory at 0x%08lx, which is" in sh7760fb_alloc_mem()
426 info->screen_base = fbmem; in sh7760fb_alloc_mem()
427 info->screen_size = vram; in sh7760fb_alloc_mem()
428 info->fix.smem_start = (unsigned long)info->screen_base; in sh7760fb_alloc_mem()
429 info->fix.smem_len = info->screen_size; in sh7760fb_alloc_mem()
436 struct fb_info *info; in sh7760fb_probe() local
447 info = framebuffer_alloc(sizeof(struct sh7760fb_par), &pdev->dev); in sh7760fb_probe()
448 if (!info) in sh7760fb_probe()
451 par = info->par; in sh7760fb_probe()
456 dev_dbg(info->dev, "no display setup data!\n"); in sh7760fb_probe()
488 fb_videomode_to_var(&info->var, par->pd->def_mode); in sh7760fb_probe()
490 ret = sh7760fb_alloc_mem(info); in sh7760fb_probe()
492 dev_dbg(info->dev, "framebuffer memory allocation failed!\n"); in sh7760fb_probe()
496 info->pseudo_palette = par->pseudo_palette; in sh7760fb_probe()
499 info->var.red.offset = 11; in sh7760fb_probe()
500 info->var.red.length = 5; in sh7760fb_probe()
501 info->var.red.msb_right = 0; in sh7760fb_probe()
503 info->var.green.offset = 5; in sh7760fb_probe()
504 info->var.green.length = 6; in sh7760fb_probe()
505 info->var.green.msb_right = 0; in sh7760fb_probe()
507 info->var.blue.offset = 0; in sh7760fb_probe()
508 info->var.blue.length = 5; in sh7760fb_probe()
509 info->var.blue.msb_right = 0; in sh7760fb_probe()
511 info->var.transp.offset = 0; in sh7760fb_probe()
512 info->var.transp.length = 0; in sh7760fb_probe()
513 info->var.transp.msb_right = 0; in sh7760fb_probe()
515 strcpy(info->fix.id, "sh7760-lcdc"); in sh7760fb_probe()
521 info->fbops = &sh7760fb_ops; in sh7760fb_probe()
523 ret = fb_alloc_cmap(&info->cmap, 256, 0); in sh7760fb_probe()
525 dev_dbg(info->dev, "Unable to allocate cmap memory\n"); in sh7760fb_probe()
529 ret = register_framebuffer(info); in sh7760fb_probe()
531 dev_dbg(info->dev, "cannot register fb!\n"); in sh7760fb_probe()
534 platform_set_drvdata(pdev, info); in sh7760fb_probe()
539 (unsigned long)(par->fbdma + info->screen_size - 1), in sh7760fb_probe()
540 info->screen_size >> 10); in sh7760fb_probe()
545 sh7760fb_blank(FB_BLANK_POWERDOWN, info); in sh7760fb_probe()
546 fb_dealloc_cmap(&info->cmap); in sh7760fb_probe()
548 sh7760fb_free_mem(info); in sh7760fb_probe()
556 framebuffer_release(info); in sh7760fb_probe()
562 struct fb_info *info = platform_get_drvdata(dev); in sh7760fb_remove() local
563 struct sh7760fb_par *par = info->par; in sh7760fb_remove()
565 sh7760fb_blank(FB_BLANK_POWERDOWN, info); in sh7760fb_remove()
566 unregister_framebuffer(info); in sh7760fb_remove()
567 fb_dealloc_cmap(&info->cmap); in sh7760fb_remove()
568 sh7760fb_free_mem(info); in sh7760fb_remove()
573 framebuffer_release(info); in sh7760fb_remove()