Lines Matching +full:op +full:- +full:panel
1 // SPDX-License-Identifier: GPL-2.0-only
22 #include <linux/dma-mapping.h>
39 #include <linux/sm501-regs.h>
43 static char *fb_mode = "640x480-16@60";
100 /* per-framebuffer private data */
119 return var->xres + var->left_margin + in h_total()
120 var->right_margin + var->hsync_len; in h_total()
125 return var->yres + var->upper_margin + in v_total()
126 var->lower_margin + var->vsync_len; in v_total()
138 smc501_readl(info->regs); in sm501fb_sync_regs()
146 * |fbmem_res->start fbmem_res->end|
149 * |-> fb[0].fix.smem_len <-| spare |-> fb[1].fix.smem_len <-|-> cursors <-|
157 * - all allocations must be 128bit aligned
158 * - cursors are 64x64x2 bits (1Kbyte)
177 ptr = inf->fbmem_len - size; in sm501_alloc_mem()
178 inf->fbmem_len = ptr; /* adjust available memory. */ in sm501_alloc_mem()
182 if (size > inf->fbmem_len) in sm501_alloc_mem()
183 return -ENOMEM; in sm501_alloc_mem()
185 ptr = inf->fbmem_len - size; in sm501_alloc_mem()
186 fbi = inf->fb[HEAD_CRT]; in sm501_alloc_mem()
193 ptr &= ~(PAGE_SIZE - 1); in sm501_alloc_mem()
196 return -ENOMEM; in sm501_alloc_mem()
203 /* check to see if we have panel memory allocated in sm501_alloc_mem()
206 fbi = inf->fb[HEAD_PANEL]; in sm501_alloc_mem()
208 par = fbi->par; in sm501_alloc_mem()
209 end = par->screen.k_addr ? par->screen.sm_addr : inf->fbmem_len; in sm501_alloc_mem()
211 end = inf->fbmem_len; in sm501_alloc_mem()
214 return -ENOMEM; in sm501_alloc_mem()
219 fbi = inf->fb[HEAD_CRT]; in sm501_alloc_mem()
222 fbi = inf->fb[HEAD_PANEL]; in sm501_alloc_mem()
224 par = fbi->par; in sm501_alloc_mem()
225 end = par->screen.sm_addr; in sm501_alloc_mem()
227 end = inf->fbmem_len; in sm501_alloc_mem()
230 return -ENOMEM; in sm501_alloc_mem()
235 return -EINVAL; in sm501_alloc_mem()
238 mem->size = size; in sm501_alloc_mem()
239 mem->sm_addr = ptr; in sm501_alloc_mem()
240 mem->k_addr = inf->fbmem + ptr; in sm501_alloc_mem()
242 dev_dbg(inf->dev, "%s: result %08lx, %p - %u, %zd\n", in sm501_alloc_mem()
243 __func__, mem->sm_addr, mem->k_addr, why, size); in sm501_alloc_mem()
283 smc501_writel(value, fbi->regs + palette + offset); in sm501fb_setup_gamma()
290 * check common variables for both panel and crt
296 struct sm501fb_par *par = info->par; in sm501fb_check_var()
297 struct sm501fb_info *sm = par->info; in sm501fb_check_var()
302 if (var->hsync_len > 255 || var->vsync_len > 63) in sm501fb_check_var()
303 return -EINVAL; in sm501fb_check_var()
306 if ((var->xres + var->right_margin) > 4096) in sm501fb_check_var()
307 return -EINVAL; in sm501fb_check_var()
310 if ((var->yres + var->lower_margin) > 2048) in sm501fb_check_var()
311 return -EINVAL; in sm501fb_check_var()
316 return -EINVAL; in sm501fb_check_var()
320 tmp = (var->xres * var->bits_per_pixel) / 8; in sm501fb_check_var()
322 return -EINVAL; in sm501fb_check_var()
326 if (var->xres_virtual > 4096 || var->yres_virtual > 2048) in sm501fb_check_var()
327 return -EINVAL; in sm501fb_check_var()
331 if (var->bits_per_pixel <= 8) in sm501fb_check_var()
332 var->bits_per_pixel = 8; in sm501fb_check_var()
333 else if (var->bits_per_pixel <= 16) in sm501fb_check_var()
334 var->bits_per_pixel = 16; in sm501fb_check_var()
335 else if (var->bits_per_pixel == 24) in sm501fb_check_var()
336 var->bits_per_pixel = 32; in sm501fb_check_var()
339 switch(var->bits_per_pixel) { in sm501fb_check_var()
341 var->red.length = var->bits_per_pixel; in sm501fb_check_var()
342 var->red.offset = 0; in sm501fb_check_var()
343 var->green.length = var->bits_per_pixel; in sm501fb_check_var()
344 var->green.offset = 0; in sm501fb_check_var()
345 var->blue.length = var->bits_per_pixel; in sm501fb_check_var()
346 var->blue.offset = 0; in sm501fb_check_var()
347 var->transp.length = 0; in sm501fb_check_var()
348 var->transp.offset = 0; in sm501fb_check_var()
353 if (sm->pdata->flags & SM501_FBPD_SWAP_FB_ENDIAN) { in sm501fb_check_var()
354 var->blue.offset = 11; in sm501fb_check_var()
355 var->green.offset = 5; in sm501fb_check_var()
356 var->red.offset = 0; in sm501fb_check_var()
358 var->red.offset = 11; in sm501fb_check_var()
359 var->green.offset = 5; in sm501fb_check_var()
360 var->blue.offset = 0; in sm501fb_check_var()
362 var->transp.offset = 0; in sm501fb_check_var()
364 var->red.length = 5; in sm501fb_check_var()
365 var->green.length = 6; in sm501fb_check_var()
366 var->blue.length = 5; in sm501fb_check_var()
367 var->transp.length = 0; in sm501fb_check_var()
371 if (sm->pdata->flags & SM501_FBPD_SWAP_FB_ENDIAN) { in sm501fb_check_var()
372 var->transp.offset = 0; in sm501fb_check_var()
373 var->red.offset = 8; in sm501fb_check_var()
374 var->green.offset = 16; in sm501fb_check_var()
375 var->blue.offset = 24; in sm501fb_check_var()
377 var->transp.offset = 24; in sm501fb_check_var()
378 var->red.offset = 16; in sm501fb_check_var()
379 var->green.offset = 8; in sm501fb_check_var()
380 var->blue.offset = 0; in sm501fb_check_var()
383 var->red.length = 8; in sm501fb_check_var()
384 var->green.length = 8; in sm501fb_check_var()
385 var->blue.length = 8; in sm501fb_check_var()
386 var->transp.length = 0; in sm501fb_check_var()
390 return -EINVAL; in sm501fb_check_var()
400 * back into range, or return -EINVAL.
412 * back into range, or return -EINVAL.
429 struct sm501fb_par *par = info->par; in sm501fb_set_par_common()
430 struct sm501fb_info *fbi = par->info; in sm501fb_set_par_common()
438 dev_dbg(fbi->dev, "%s: %dx%d, bpp = %d, virtual %dx%d\n", in sm501fb_set_par_common()
439 __func__, var->xres, var->yres, var->bits_per_pixel, in sm501fb_set_par_common()
440 var->xres_virtual, var->yres_virtual); in sm501fb_set_par_common()
442 switch (par->head) { in sm501fb_set_par_common()
461 switch (var->bits_per_pixel) { in sm501fb_set_par_common()
463 info->fix.visual = FB_VISUAL_PSEUDOCOLOR; in sm501fb_set_par_common()
467 info->fix.visual = FB_VISUAL_TRUECOLOR; in sm501fb_set_par_common()
471 info->fix.visual = FB_VISUAL_TRUECOLOR; in sm501fb_set_par_common()
476 info->fix.line_length = (var->xres_virtual * var->bits_per_pixel)/8; in sm501fb_set_par_common()
477 smem_len = info->fix.line_length * var->yres_virtual; in sm501fb_set_par_common()
479 dev_dbg(fbi->dev, "%s: line length = %u\n", __func__, in sm501fb_set_par_common()
480 info->fix.line_length); in sm501fb_set_par_common()
482 if (sm501_alloc_mem(fbi, &par->screen, mem_type, smem_len, smem_len)) { in sm501fb_set_par_common()
483 dev_err(fbi->dev, "no memory available\n"); in sm501fb_set_par_common()
484 return -ENOMEM; in sm501fb_set_par_common()
487 mutex_lock(&info->mm_lock); in sm501fb_set_par_common()
488 info->fix.smem_start = fbi->fbmem_res->start + par->screen.sm_addr; in sm501fb_set_par_common()
489 info->fix.smem_len = smem_len; in sm501fb_set_par_common()
490 mutex_unlock(&info->mm_lock); in sm501fb_set_par_common()
492 info->screen_base = fbi->fbmem + par->screen.sm_addr; in sm501fb_set_par_common()
493 info->screen_size = info->fix.smem_len; in sm501fb_set_par_common()
497 smc501_writel(par->screen.sm_addr | SM501_ADDR_FLIP, in sm501fb_set_par_common()
498 fbi->regs + head_addr); in sm501fb_set_par_common()
502 pixclock = sm501fb_ps_to_hz(var->pixclock); in sm501fb_set_par_common()
504 sm501pixclock = sm501_set_clock(fbi->dev->parent, clock_type, in sm501fb_set_par_common()
508 var->pixclock = sm501fb_hz_to_ps(sm501pixclock); in sm501fb_set_par_common()
510 dev_dbg(fbi->dev, "%s: pixclock(ps) = %u, pixclock(Hz) = %lu, " in sm501fb_set_par_common()
512 __func__, var->pixclock, pixclock, sm501pixclock, in sm501fb_set_par_common()
513 ((pixclock - sm501pixclock)*100)/pixclock); in sm501fb_set_par_common()
526 struct sm501fb_par *par = info->par; in sm501fb_set_par_geometry()
527 struct sm501fb_info *fbi = par->info; in sm501fb_set_par_geometry()
528 void __iomem *base = fbi->regs; in sm501fb_set_par_geometry()
531 if (par->head == HEAD_CRT) in sm501fb_set_par_geometry()
538 reg = info->fix.line_length; in sm501fb_set_par_geometry()
539 reg |= ((var->xres * var->bits_per_pixel)/8) << 16; in sm501fb_set_par_geometry()
541 smc501_writel(reg, fbi->regs + (par->head == HEAD_CRT ? in sm501fb_set_par_geometry()
546 reg = (h_total(var) - 1) << 16; in sm501fb_set_par_geometry()
547 reg |= (var->xres - 1); in sm501fb_set_par_geometry()
553 reg = var->hsync_len << 16; in sm501fb_set_par_geometry()
554 reg |= var->xres + var->right_margin - 1; in sm501fb_set_par_geometry()
560 reg = (v_total(var) - 1) << 16; in sm501fb_set_par_geometry()
561 reg |= (var->yres - 1); in sm501fb_set_par_geometry()
566 reg = var->vsync_len << 16; in sm501fb_set_par_geometry()
567 reg |= var->yres + var->lower_margin - 1; in sm501fb_set_par_geometry()
580 struct sm501fb_par *par = info->par; in sm501fb_pan_crt()
581 struct sm501fb_info *fbi = par->info; in sm501fb_pan_crt()
582 unsigned int bytes_pixel = info->var.bits_per_pixel / 8; in sm501fb_pan_crt()
586 xoffs = var->xoffset * bytes_pixel; in sm501fb_pan_crt()
588 reg = smc501_readl(fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_pan_crt()
592 smc501_writel(reg, fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_pan_crt()
594 reg = (par->screen.sm_addr + xoffs + in sm501fb_pan_crt()
595 var->yoffset * info->fix.line_length); in sm501fb_pan_crt()
596 smc501_writel(reg | SM501_ADDR_FLIP, fbi->regs + SM501_DC_CRT_FB_ADDR); in sm501fb_pan_crt()
604 * pan the panel display output within an virtual framebuffer
610 struct sm501fb_par *par = info->par; in sm501fb_pan_pnl()
611 struct sm501fb_info *fbi = par->info; in sm501fb_pan_pnl()
614 reg = var->xoffset | (info->var.xres_virtual << 16); in sm501fb_pan_pnl()
615 smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_WIDTH); in sm501fb_pan_pnl()
617 reg = var->yoffset | (info->var.yres_virtual << 16); in sm501fb_pan_pnl()
618 smc501_writel(reg, fbi->regs + SM501_DC_PANEL_FB_HEIGHT); in sm501fb_pan_pnl()
631 struct sm501fb_par *par = info->par; in sm501fb_set_par_crt()
632 struct sm501fb_info *fbi = par->info; in sm501fb_set_par_crt()
633 struct fb_var_screeninfo *var = &info->var; in sm501fb_set_par_crt()
639 dev_dbg(fbi->dev, "%s(%p)\n", __func__, info); in sm501fb_set_par_crt()
641 /* enable CRT DAC - note 0 is on!*/ in sm501fb_set_par_crt()
642 sm501_misc_control(fbi->dev->parent, 0, SM501_MISC_DAC_POWER); in sm501fb_set_par_crt()
644 control = smc501_readl(fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_set_par_crt()
655 if ((var->sync & FB_SYNC_HOR_HIGH_ACT) == 0) in sm501fb_set_par_crt()
658 if ((var->sync & FB_SYNC_VERT_HIGH_ACT) == 0) in sm501fb_set_par_crt()
662 /* the head is displaying panel data... */ in sm501fb_set_par_crt()
664 sm501_alloc_mem(fbi, &par->screen, SM501_MEMF_CRT, 0, in sm501fb_set_par_crt()
665 info->fix.smem_len); in sm501fb_set_par_crt()
671 dev_err(fbi->dev, "failed to set common parameters\n"); in sm501fb_set_par_crt()
680 switch(var->bits_per_pixel) { in sm501fb_set_par_crt()
704 dev_dbg(fbi->dev, "new control is %08lx\n", control); in sm501fb_set_par_crt()
706 smc501_writel(control, fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_set_par_crt()
715 void __iomem *ctrl_reg = fbi->regs + SM501_DC_PANEL_CONTROL; in sm501fb_panel_power()
716 struct sm501_platdata_fbsub *pd = fbi->pdata->fb_pnl; in sm501fb_panel_power()
721 /* enable panel power */ in sm501fb_panel_power()
735 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { in sm501fb_panel_power()
736 if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN) in sm501fb_panel_power()
746 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { in sm501fb_panel_power()
747 if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN) in sm501fb_panel_power()
757 /* disable panel power */ in sm501fb_panel_power()
758 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_FPEN)) { in sm501fb_panel_power()
759 if (pd->flags & SM501FB_FLAG_PANEL_INV_FPEN) in sm501fb_panel_power()
769 if (!(pd->flags & SM501FB_FLAG_PANEL_NO_VBIASEN)) { in sm501fb_panel_power()
770 if (pd->flags & SM501FB_FLAG_PANEL_INV_VBIASEN) in sm501fb_panel_power()
796 * Set the panel video mode from the fb_info structure
801 struct sm501fb_par *par = info->par; in sm501fb_set_par_pnl()
802 struct sm501fb_info *fbi = par->info; in sm501fb_set_par_pnl()
803 struct fb_var_screeninfo *var = &info->var; in sm501fb_set_par_pnl()
808 dev_dbg(fbi->dev, "%s(%p)\n", __func__, info); in sm501fb_set_par_pnl()
821 control = smc501_readl(fbi->regs + SM501_DC_PANEL_CONTROL); in sm501fb_set_par_pnl()
836 switch(var->bits_per_pixel) { in sm501fb_set_par_pnl()
855 smc501_writel(0x0, fbi->regs + SM501_DC_PANEL_PANNING_CONTROL); in sm501fb_set_par_pnl()
857 /* panel plane top left and bottom right location */ in sm501fb_set_par_pnl()
859 smc501_writel(0x00, fbi->regs + SM501_DC_PANEL_TL_LOC); in sm501fb_set_par_pnl()
861 reg = var->xres - 1; in sm501fb_set_par_pnl()
862 reg |= (var->yres - 1) << 16; in sm501fb_set_par_pnl()
864 smc501_writel(reg, fbi->regs + SM501_DC_PANEL_BR_LOC); in sm501fb_set_par_pnl()
866 /* program panel control register */ in sm501fb_set_par_pnl()
868 control |= SM501_DC_PANEL_CONTROL_TE; /* enable PANEL timing */ in sm501fb_set_par_pnl()
869 control |= SM501_DC_PANEL_CONTROL_EN; /* enable PANEL gfx plane */ in sm501fb_set_par_pnl()
871 if ((var->sync & FB_SYNC_HOR_HIGH_ACT) == 0) in sm501fb_set_par_pnl()
874 if ((var->sync & FB_SYNC_VERT_HIGH_ACT) == 0) in sm501fb_set_par_pnl()
877 smc501_writel(control, fbi->regs + SM501_DC_PANEL_CONTROL); in sm501fb_set_par_pnl()
880 /* ensure the panel interface is not tristated at this point */ in sm501fb_set_par_pnl()
882 sm501_modify_reg(fbi->dev->parent, SM501_SYSTEM_CONTROL, in sm501fb_set_par_pnl()
885 /* power the panel up */ in sm501fb_set_par_pnl()
902 chan >>= 16 - bf->length; in chan_to_field()
903 return chan << bf->offset; in chan_to_field()
915 struct sm501fb_par *par = info->par; in sm501fb_setcolreg()
916 struct sm501fb_info *fbi = par->info; in sm501fb_setcolreg()
917 void __iomem *base = fbi->regs; in sm501fb_setcolreg()
920 if (par->head == HEAD_CRT) in sm501fb_setcolreg()
925 switch (info->fix.visual) { in sm501fb_setcolreg()
927 /* true-colour, use pseuo-palette */ in sm501fb_setcolreg()
930 u32 *pal = par->pseudo_palette; in sm501fb_setcolreg()
932 val = chan_to_field(red, &info->var.red); in sm501fb_setcolreg()
933 val |= chan_to_field(green, &info->var.green); in sm501fb_setcolreg()
934 val |= chan_to_field(blue, &info->var.blue); in sm501fb_setcolreg()
960 * Blank or un-blank the panel interface
965 struct sm501fb_par *par = info->par; in sm501fb_blank_pnl()
966 struct sm501fb_info *fbi = par->info; in sm501fb_blank_pnl()
968 dev_dbg(fbi->dev, "%s(mode=%d, %p)\n", __func__, blank_mode, info); in sm501fb_blank_pnl()
991 * Blank or un-blank the crt interface
996 struct sm501fb_par *par = info->par; in sm501fb_blank_crt()
997 struct sm501fb_info *fbi = par->info; in sm501fb_blank_crt()
1000 dev_dbg(fbi->dev, "%s(mode=%d, %p)\n", __func__, blank_mode, info); in sm501fb_blank_crt()
1002 ctrl = smc501_readl(fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_blank_crt()
1007 sm501_misc_control(fbi->dev->parent, SM501_MISC_DAC_POWER, 0); in sm501fb_blank_crt()
1017 sm501_misc_control(fbi->dev->parent, 0, SM501_MISC_DAC_POWER); in sm501fb_blank_crt()
1027 smc501_writel(ctrl, fbi->regs + SM501_DC_CRT_CONTROL); in sm501fb_blank_crt()
1040 struct sm501fb_par *par = info->par; in sm501fb_cursor()
1041 struct sm501fb_info *fbi = par->info; in sm501fb_cursor()
1042 void __iomem *base = fbi->regs; in sm501fb_cursor()
1046 dev_dbg(fbi->dev, "%s(%p,%p)\n", __func__, info, cursor); in sm501fb_cursor()
1048 if (par->head == HEAD_CRT) in sm501fb_cursor()
1055 if (cursor->image.width > 64) in sm501fb_cursor()
1056 return -EINVAL; in sm501fb_cursor()
1058 if (cursor->image.height > 64) in sm501fb_cursor()
1059 return -EINVAL; in sm501fb_cursor()
1061 if (cursor->image.depth > 1) in sm501fb_cursor()
1062 return -EINVAL; in sm501fb_cursor()
1066 if (cursor->enable) in sm501fb_cursor()
1074 if (cursor->set & FB_CUR_SETPOS) { in sm501fb_cursor()
1075 unsigned int x = cursor->image.dx; in sm501fb_cursor()
1076 unsigned int y = cursor->image.dy; in sm501fb_cursor()
1079 return -EINVAL; in sm501fb_cursor()
1081 dev_dbg(fbi->dev, "set position %d,%d\n", x, y); in sm501fb_cursor()
1083 //y += cursor->image.height; in sm501fb_cursor()
1088 if (cursor->set & FB_CUR_SETCMAP) { in sm501fb_cursor()
1089 unsigned int bg_col = cursor->image.bg_color; in sm501fb_cursor()
1090 unsigned int fg_col = cursor->image.fg_color; in sm501fb_cursor()
1092 dev_dbg(fbi->dev, "%s: update cmap (%08x,%08x)\n", in sm501fb_cursor()
1095 bg = ((info->cmap.red[bg_col] & 0xF8) << 8) | in sm501fb_cursor()
1096 ((info->cmap.green[bg_col] & 0xFC) << 3) | in sm501fb_cursor()
1097 ((info->cmap.blue[bg_col] & 0xF8) >> 3); in sm501fb_cursor()
1099 fg = ((info->cmap.red[fg_col] & 0xF8) << 8) | in sm501fb_cursor()
1100 ((info->cmap.green[fg_col] & 0xFC) << 3) | in sm501fb_cursor()
1101 ((info->cmap.blue[fg_col] & 0xF8) >> 3); in sm501fb_cursor()
1103 dev_dbg(fbi->dev, "fgcol %08lx, bgcol %08lx\n", fg, bg); in sm501fb_cursor()
1109 if (cursor->set & FB_CUR_SETSIZE || in sm501fb_cursor()
1110 cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE)) { in sm501fb_cursor()
1116 const unsigned char *pcol = cursor->image.data; in sm501fb_cursor()
1117 const unsigned char *pmsk = cursor->mask; in sm501fb_cursor()
1118 void __iomem *dst = par->cursor.k_addr; in sm501fb_cursor()
1121 unsigned int op; in sm501fb_cursor() local
1123 dev_dbg(fbi->dev, "%s: setting shape (%d,%d)\n", in sm501fb_cursor()
1124 __func__, cursor->image.width, cursor->image.height); in sm501fb_cursor()
1126 for (op = 0; op < (64*64*2)/8; op+=4) in sm501fb_cursor()
1127 smc501_writel(0x0, dst + op); in sm501fb_cursor()
1129 for (y = 0; y < cursor->image.height; y++) { in sm501fb_cursor()
1130 for (x = 0; x < cursor->image.width; x++) { in sm501fb_cursor()
1140 op = (dcol & 1) ? 1 : 3; in sm501fb_cursor()
1141 op <<= ((x % 4) * 2); in sm501fb_cursor()
1143 op |= readb(dst + (x / 4)); in sm501fb_cursor()
1144 writeb(op, dst + (x / 4)); in sm501fb_cursor()
1166 ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); in sm501fb_crtsrc_show()
1169 return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel"); in sm501fb_crtsrc_show()
1186 return -EINVAL; in sm501fb_crtsrc_store()
1190 else if (strncasecmp(buf, "panel", 5) == 0) in sm501fb_crtsrc_store()
1193 return -EINVAL; in sm501fb_crtsrc_store()
1197 ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); in sm501fb_crtsrc_store()
1209 smc501_writel(ctrl, info->regs + SM501_DC_CRT_CONTROL); in sm501fb_crtsrc_store()
1225 void __iomem *mem = info->regs; in sm501fb_show_regs()
1233 return ptr - buf; in sm501fb_show_regs()
1250 return ptr - buf; in sm501fb_debug_show_crt()
1257 * show the panel control and cursor registers
1269 return ptr - buf; in sm501fb_debug_show_pnl()
1286 struct sm501fb_par *par = info->par; in sm501fb_sync()
1287 struct sm501fb_info *fbi = par->info; in sm501fb_sync()
1291 (smc501_readl(fbi->regs + SM501_SYSTEM_CONTROL) & in sm501fb_sync()
1293 count--; in sm501fb_sync()
1304 struct sm501fb_par *par = info->par; in sm501fb_copyarea()
1305 struct sm501fb_info *fbi = par->info; in sm501fb_copyarea()
1306 int width = area->width; in sm501fb_copyarea()
1307 int height = area->height; in sm501fb_copyarea()
1308 int sx = area->sx; in sm501fb_copyarea()
1309 int sy = area->sy; in sm501fb_copyarea()
1310 int dx = area->dx; in sm501fb_copyarea()
1311 int dy = area->dy; in sm501fb_copyarea()
1315 if ((sx >= info->var.xres_virtual) || in sm501fb_copyarea()
1316 (sy >= info->var.yres_virtual)) in sm501fb_copyarea()
1319 if ((sx + width) >= info->var.xres_virtual) in sm501fb_copyarea()
1320 width = info->var.xres_virtual - sx - 1; in sm501fb_copyarea()
1321 if ((sy + height) >= info->var.yres_virtual) in sm501fb_copyarea()
1322 height = info->var.yres_virtual - sy - 1; in sm501fb_copyarea()
1325 if ((dx >= info->var.xres_virtual) || in sm501fb_copyarea()
1326 (dy >= info->var.yres_virtual)) in sm501fb_copyarea()
1329 if ((dx + width) >= info->var.xres_virtual) in sm501fb_copyarea()
1330 width = info->var.xres_virtual - dx - 1; in sm501fb_copyarea()
1331 if ((dy + height) >= info->var.yres_virtual) in sm501fb_copyarea()
1332 height = info->var.yres_virtual - dy - 1; in sm501fb_copyarea()
1336 sx += width - 1; in sm501fb_copyarea()
1337 dx += width - 1; in sm501fb_copyarea()
1338 sy += height - 1; in sm501fb_copyarea()
1339 dy += height - 1; in sm501fb_copyarea()
1346 smc501_writel(par->screen.sm_addr, fbi->regs2d + SM501_2D_SOURCE_BASE); in sm501fb_copyarea()
1347 smc501_writel(par->screen.sm_addr, in sm501fb_copyarea()
1348 fbi->regs2d + SM501_2D_DESTINATION_BASE); in sm501fb_copyarea()
1351 smc501_writel((info->var.xres << 16) | info->var.xres, in sm501fb_copyarea()
1352 fbi->regs2d + SM501_2D_WINDOW_WIDTH); in sm501fb_copyarea()
1355 smc501_writel((info->var.xres_virtual << 16) | info->var.xres_virtual, in sm501fb_copyarea()
1356 fbi->regs2d + SM501_2D_PITCH); in sm501fb_copyarea()
1359 switch (info->var.bits_per_pixel) { in sm501fb_copyarea()
1361 smc501_writel(0, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_copyarea()
1364 smc501_writel(0x00100000, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_copyarea()
1367 smc501_writel(0x00200000, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_copyarea()
1372 smc501_writel(0xffffffff, fbi->regs2d + SM501_2D_COLOR_COMPARE_MASK); in sm501fb_copyarea()
1375 smc501_writel(0xffffffff, fbi->regs2d + SM501_2D_MASK); in sm501fb_copyarea()
1378 smc501_writel((sx << 16) | sy, fbi->regs2d + SM501_2D_SOURCE); in sm501fb_copyarea()
1379 smc501_writel((dx << 16) | dy, fbi->regs2d + SM501_2D_DESTINATION); in sm501fb_copyarea()
1382 smc501_writel((width << 16) | height, fbi->regs2d + SM501_2D_DIMENSION); in sm501fb_copyarea()
1385 smc501_writel(0x800000cc | rtl, fbi->regs2d + SM501_2D_CONTROL); in sm501fb_copyarea()
1390 struct sm501fb_par *par = info->par; in sm501fb_fillrect()
1391 struct sm501fb_info *fbi = par->info; in sm501fb_fillrect()
1392 int width = rect->width, height = rect->height; in sm501fb_fillrect()
1394 if ((rect->dx >= info->var.xres_virtual) || in sm501fb_fillrect()
1395 (rect->dy >= info->var.yres_virtual)) in sm501fb_fillrect()
1398 if ((rect->dx + width) >= info->var.xres_virtual) in sm501fb_fillrect()
1399 width = info->var.xres_virtual - rect->dx - 1; in sm501fb_fillrect()
1400 if ((rect->dy + height) >= info->var.yres_virtual) in sm501fb_fillrect()
1401 height = info->var.yres_virtual - rect->dy - 1; in sm501fb_fillrect()
1407 smc501_writel(par->screen.sm_addr, fbi->regs2d + SM501_2D_SOURCE_BASE); in sm501fb_fillrect()
1408 smc501_writel(par->screen.sm_addr, in sm501fb_fillrect()
1409 fbi->regs2d + SM501_2D_DESTINATION_BASE); in sm501fb_fillrect()
1412 smc501_writel((info->var.xres << 16) | info->var.xres, in sm501fb_fillrect()
1413 fbi->regs2d + SM501_2D_WINDOW_WIDTH); in sm501fb_fillrect()
1416 smc501_writel((info->var.xres_virtual << 16) | info->var.xres_virtual, in sm501fb_fillrect()
1417 fbi->regs2d + SM501_2D_PITCH); in sm501fb_fillrect()
1420 switch (info->var.bits_per_pixel) { in sm501fb_fillrect()
1422 smc501_writel(0, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_fillrect()
1425 smc501_writel(0x00100000, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_fillrect()
1428 smc501_writel(0x00200000, fbi->regs2d + SM501_2D_STRETCH); in sm501fb_fillrect()
1433 smc501_writel(0xffffffff, fbi->regs2d + SM501_2D_COLOR_COMPARE_MASK); in sm501fb_fillrect()
1436 smc501_writel(0xffffffff, fbi->regs2d + SM501_2D_MASK); in sm501fb_fillrect()
1439 smc501_writel(rect->color, fbi->regs2d + SM501_2D_FOREGROUND); in sm501fb_fillrect()
1442 smc501_writel((rect->dx << 16) | rect->dy, in sm501fb_fillrect()
1443 fbi->regs2d + SM501_2D_DESTINATION); in sm501fb_fillrect()
1446 smc501_writel((width << 16) | height, fbi->regs2d + SM501_2D_DIMENSION); in sm501fb_fillrect()
1449 smc501_writel(0x800100cc, fbi->regs2d + SM501_2D_CONTROL); in sm501fb_fillrect()
1499 par = fbi->par; in sm501_init_cursor()
1500 info = par->info; in sm501_init_cursor()
1502 par->cursor_regs = info->regs + reg_base; in sm501_init_cursor()
1504 ret = sm501_alloc_mem(info, &par->cursor, SM501_MEMF_CURSOR, 1024, in sm501_init_cursor()
1505 fbi->fix.smem_len); in sm501_init_cursor()
1511 smc501_writel(par->cursor.sm_addr, in sm501_init_cursor()
1512 par->cursor_regs + SM501_OFF_HWC_ADDR); in sm501_init_cursor()
1514 smc501_writel(0x00, par->cursor_regs + SM501_OFF_HWC_LOC); in sm501_init_cursor()
1515 smc501_writel(0x00, par->cursor_regs + SM501_OFF_HWC_COLOR_1_2); in sm501_init_cursor()
1516 smc501_writel(0x00, par->cursor_regs + SM501_OFF_HWC_COLOR_3); in sm501_init_cursor()
1531 struct device *dev = &pdev->dev; in sm501fb_start()
1535 info->irq = ret = platform_get_irq(pdev, 0); in sm501fb_start()
1546 ret = -ENOENT; in sm501fb_start()
1550 info->regs_res = request_mem_region(res->start, in sm501fb_start()
1552 pdev->name); in sm501fb_start()
1554 if (info->regs_res == NULL) { in sm501fb_start()
1556 ret = -ENXIO; in sm501fb_start()
1560 info->regs = ioremap(res->start, resource_size(res)); in sm501fb_start()
1561 if (info->regs == NULL) { in sm501fb_start()
1563 ret = -ENXIO; in sm501fb_start()
1572 ret = -ENOENT; in sm501fb_start()
1576 info->regs2d_res = request_mem_region(res->start, in sm501fb_start()
1578 pdev->name); in sm501fb_start()
1580 if (info->regs2d_res == NULL) { in sm501fb_start()
1582 ret = -ENXIO; in sm501fb_start()
1586 info->regs2d = ioremap(res->start, resource_size(res)); in sm501fb_start()
1587 if (info->regs2d == NULL) { in sm501fb_start()
1589 ret = -ENXIO; in sm501fb_start()
1597 ret = -ENXIO; in sm501fb_start()
1601 info->fbmem_res = request_mem_region(res->start, in sm501fb_start()
1603 pdev->name); in sm501fb_start()
1604 if (info->fbmem_res == NULL) { in sm501fb_start()
1606 ret = -ENXIO; in sm501fb_start()
1610 info->fbmem = ioremap(res->start, resource_size(res)); in sm501fb_start()
1611 if (info->fbmem == NULL) { in sm501fb_start()
1613 ret = -ENXIO; in sm501fb_start()
1617 info->fbmem_len = resource_size(res); in sm501fb_start()
1619 /* clear framebuffer memory - avoids garbage data on unused fb */ in sm501fb_start()
1620 memset_io(info->fbmem, 0, info->fbmem_len); in sm501fb_start()
1622 /* clear palette ram - undefined at power on */ in sm501fb_start()
1624 smc501_writel(0, info->regs + SM501_DC_PANEL_PALETTE + (k * 4)); in sm501fb_start()
1627 sm501_unit_power(dev->parent, SM501_GATE_DISPLAY, 1); in sm501fb_start()
1630 sm501_unit_power(dev->parent, SM501_GATE_2D_ENGINE, 1); in sm501fb_start()
1633 sm501_init_cursor(info->fb[HEAD_CRT], SM501_DC_CRT_HWC_ADDR); in sm501fb_start()
1634 sm501_init_cursor(info->fb[HEAD_PANEL], SM501_DC_PANEL_HWC_ADDR); in sm501fb_start()
1639 release_mem_region(info->fbmem_res->start, in sm501fb_start()
1640 resource_size(info->fbmem_res)); in sm501fb_start()
1643 iounmap(info->regs2d); in sm501fb_start()
1646 release_mem_region(info->regs2d_res->start, in sm501fb_start()
1647 resource_size(info->regs2d_res)); in sm501fb_start()
1650 iounmap(info->regs); in sm501fb_start()
1653 release_mem_region(info->regs_res->start, in sm501fb_start()
1654 resource_size(info->regs_res)); in sm501fb_start()
1663 sm501_unit_power(info->dev->parent, SM501_GATE_DISPLAY, 0); in sm501fb_stop()
1665 iounmap(info->fbmem); in sm501fb_stop()
1666 release_mem_region(info->fbmem_res->start, in sm501fb_stop()
1667 resource_size(info->fbmem_res)); in sm501fb_stop()
1669 iounmap(info->regs2d); in sm501fb_stop()
1670 release_mem_region(info->regs2d_res->start, in sm501fb_stop()
1671 resource_size(info->regs2d_res)); in sm501fb_stop()
1673 iounmap(info->regs); in sm501fb_stop()
1674 release_mem_region(info->regs_res->start, in sm501fb_stop()
1675 resource_size(info->regs_res)); in sm501fb_stop()
1682 struct sm501fb_par *par = fb->par; in sm501fb_init_fb()
1683 struct sm501fb_info *info = par->info; in sm501fb_init_fb()
1690 pd = info->pdata->fb_crt; in sm501fb_init_fb()
1691 ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); in sm501fb_init_fb()
1695 if (info->pdata->fb_route != SM501_FB_CRT_PANEL) { in sm501fb_init_fb()
1697 smc501_writel(ctrl, info->regs + SM501_DC_CRT_CONTROL); in sm501fb_init_fb()
1703 pd = info->pdata->fb_pnl; in sm501fb_init_fb()
1704 ctrl = smc501_readl(info->regs + SM501_DC_PANEL_CONTROL); in sm501fb_init_fb()
1715 dev_info(info->dev, "fb %s %sabled at start\n", in sm501fb_init_fb()
1720 if (head == HEAD_CRT && info->pdata->fb_route == SM501_FB_CRT_PANEL) { in sm501fb_init_fb()
1722 smc501_writel(ctrl, info->regs + SM501_DC_CRT_CONTROL); in sm501fb_init_fb()
1726 strscpy(fb->fix.id, fbname, sizeof(fb->fix.id)); in sm501fb_init_fb()
1728 memcpy(&par->ops, in sm501fb_init_fb()
1734 if ((pd->flags & SM501FB_FLAG_USE_HWCURSOR) == 0) in sm501fb_init_fb()
1735 par->ops.fb_cursor = NULL; in sm501fb_init_fb()
1737 fb->fbops = &par->ops; in sm501fb_init_fb()
1738 fb->flags = FBINFO_READS_FAST | in sm501fb_init_fb()
1744 if (of_property_read_bool(info->dev->parent->of_node, "little-endian")) in sm501fb_init_fb()
1745 fb->flags |= FBINFO_FOREIGN_ENDIAN; in sm501fb_init_fb()
1747 if (of_property_read_bool(info->dev->parent->of_node, "big-endian")) in sm501fb_init_fb()
1748 fb->flags |= FBINFO_FOREIGN_ENDIAN; in sm501fb_init_fb()
1753 fb->fix.type = FB_TYPE_PACKED_PIXELS; in sm501fb_init_fb()
1754 fb->fix.type_aux = 0; in sm501fb_init_fb()
1755 fb->fix.xpanstep = 1; in sm501fb_init_fb()
1756 fb->fix.ypanstep = 1; in sm501fb_init_fb()
1757 fb->fix.ywrapstep = 0; in sm501fb_init_fb()
1758 fb->fix.accel = FB_ACCEL_NONE; in sm501fb_init_fb()
1762 fb->var.nonstd = 0; in sm501fb_init_fb()
1763 fb->var.activate = FB_ACTIVATE_NOW; in sm501fb_init_fb()
1764 fb->var.accel_flags = 0; in sm501fb_init_fb()
1765 fb->var.vmode = FB_VMODE_NONINTERLACED; in sm501fb_init_fb()
1766 fb->var.bits_per_pixel = 16; in sm501fb_init_fb()
1768 if (info->edid_data) { in sm501fb_init_fb()
1770 fb_edid_to_monspecs(info->edid_data, &fb->monspecs); in sm501fb_init_fb()
1771 fb_videomode_to_modelist(fb->monspecs.modedb, in sm501fb_init_fb()
1772 fb->monspecs.modedb_len, in sm501fb_init_fb()
1773 &fb->modelist); in sm501fb_init_fb()
1776 if (enable && (pd->flags & SM501FB_FLAG_USE_INIT_MODE) && 0) { in sm501fb_init_fb()
1779 if (pd->def_mode) { in sm501fb_init_fb()
1780 dev_info(info->dev, "using supplied mode\n"); in sm501fb_init_fb()
1781 fb_videomode_to_var(&fb->var, pd->def_mode); in sm501fb_init_fb()
1783 fb->var.bits_per_pixel = pd->def_bpp ? pd->def_bpp : 8; in sm501fb_init_fb()
1784 fb->var.xres_virtual = fb->var.xres; in sm501fb_init_fb()
1785 fb->var.yres_virtual = fb->var.yres; in sm501fb_init_fb()
1787 if (info->edid_data) { in sm501fb_init_fb()
1788 ret = fb_find_mode(&fb->var, fb, fb_mode, in sm501fb_init_fb()
1789 fb->monspecs.modedb, in sm501fb_init_fb()
1790 fb->monspecs.modedb_len, in sm501fb_init_fb()
1793 kfree(info->edid_data); in sm501fb_init_fb()
1795 ret = fb_find_mode(&fb->var, fb, in sm501fb_init_fb()
1801 dev_info(info->dev, "using mode specified in " in sm501fb_init_fb()
1805 dev_info(info->dev, "using mode specified in " in sm501fb_init_fb()
1809 dev_info(info->dev, "using mode default " in sm501fb_init_fb()
1813 dev_info(info->dev, "using mode from list\n"); in sm501fb_init_fb()
1816 dev_info(info->dev, "ret = %d\n", ret); in sm501fb_init_fb()
1817 dev_info(info->dev, "failed to find mode\n"); in sm501fb_init_fb()
1818 return -EINVAL; in sm501fb_init_fb()
1824 if (fb_alloc_cmap(&fb->cmap, NR_PALETTE, 0)) { in sm501fb_init_fb()
1825 dev_err(info->dev, "failed to allocate cmap memory\n"); in sm501fb_init_fb()
1826 return -ENOMEM; in sm501fb_init_fb()
1828 fb_set_cmap(&fb->cmap, fb); in sm501fb_init_fb()
1830 ret = (fb->fbops->fb_check_var)(&fb->var, fb); in sm501fb_init_fb()
1832 dev_err(info->dev, "check_var() failed on initial setup?\n"); in sm501fb_init_fb()
1860 static char driver_name_crt[] = "sm501fb-crt";
1861 static char driver_name_pnl[] = "sm501fb-panel";
1866 unsigned char *name = (head == HEAD_CRT) ? "crt" : "panel"; in sm501fb_probe_one()
1871 pd = (head == HEAD_CRT) ? info->pdata->fb_crt : info->pdata->fb_pnl; in sm501fb_probe_one()
1875 dev_info(info->dev, "no data for fb %s (disabled)\n", name); in sm501fb_probe_one()
1879 fbi = framebuffer_alloc(sizeof(struct sm501fb_par), info->dev); in sm501fb_probe_one()
1881 return -ENOMEM; in sm501fb_probe_one()
1883 par = fbi->par; in sm501fb_probe_one()
1884 par->info = info; in sm501fb_probe_one()
1885 par->head = head; in sm501fb_probe_one()
1886 fbi->pseudo_palette = &par->pseudo_palette; in sm501fb_probe_one()
1888 info->fb[head] = fbi; in sm501fb_probe_one()
1898 struct fb_info *fbi = info->fb[head]; in sm501_free_init_fb()
1903 fb_dealloc_cmap(&fbi->cmap); in sm501_free_init_fb()
1909 struct fb_info *fbi = info->fb[head]; in sm501fb_start_one()
1915 mutex_init(&info->fb[head]->mm_lock); in sm501fb_start_one()
1917 ret = sm501fb_init_fb(info->fb[head], head, drvname); in sm501fb_start_one()
1919 dev_err(info->dev, "cannot initialise fb %s\n", drvname); in sm501fb_start_one()
1923 ret = register_framebuffer(info->fb[head]); in sm501fb_start_one()
1925 dev_err(info->dev, "failed to register fb %s\n", drvname); in sm501fb_start_one()
1930 dev_info(info->dev, "fb%d: %s frame buffer\n", fbi->node, fbi->fix.id); in sm501fb_start_one()
1938 struct device *dev = &pdev->dev; in sm501fb_probe()
1945 return -ENOMEM; in sm501fb_probe()
1948 info->dev = dev = &pdev->dev; in sm501fb_probe()
1951 if (dev->parent->platform_data) { in sm501fb_probe()
1952 struct sm501_platdata *pd = dev->parent->platform_data; in sm501fb_probe()
1953 info->pdata = pd->fb; in sm501fb_probe()
1956 if (info->pdata == NULL) { in sm501fb_probe()
1959 struct device_node *np = pdev->dev.parent->of_node; in sm501fb_probe()
1964 info->pdata = &sm501fb_def_pdata; in sm501fb_probe()
1972 info->edid_data = kmemdup(prop, EDID_LENGTH, in sm501fb_probe()
1974 if (info->edid_data) in sm501fb_probe()
1981 info->pdata = &sm501fb_def_pdata; in sm501fb_probe()
1985 /* probe for the presence of each panel */ in sm501fb_probe()
1995 dev_err(dev, "failed to probe PANEL\n"); in sm501fb_probe()
1999 if (info->fb[HEAD_PANEL] == NULL && in sm501fb_probe()
2000 info->fb[HEAD_CRT] == NULL) { in sm501fb_probe()
2002 ret = -ENODEV; in sm501fb_probe()
2022 dev_err(dev, "failed to start Panel\n"); in sm501fb_probe()
2030 unregister_framebuffer(info->fb[HEAD_CRT]); in sm501fb_probe()
2037 framebuffer_release(info->fb[HEAD_PANEL]); in sm501fb_probe()
2040 framebuffer_release(info->fb[HEAD_CRT]); in sm501fb_probe()
2055 struct fb_info *fbinfo_crt = info->fb[0]; in sm501fb_remove()
2056 struct fb_info *fbinfo_pnl = info->fb[1]; in sm501fb_remove()
2078 struct fb_info *fbi = info->fb[head]; in sm501fb_suspend_fb()
2084 par = fbi->par; in sm501fb_suspend_fb()
2085 if (par->screen.size == 0) in sm501fb_suspend_fb()
2089 (par->ops.fb_blank)(FB_BLANK_POWERDOWN, fbi); in sm501fb_suspend_fb()
2099 par->store_fb = vmalloc(par->screen.size); in sm501fb_suspend_fb()
2100 if (par->store_fb == NULL) { in sm501fb_suspend_fb()
2101 dev_err(info->dev, "no memory to store screen\n"); in sm501fb_suspend_fb()
2102 return -ENOMEM; in sm501fb_suspend_fb()
2105 par->store_cursor = vmalloc(par->cursor.size); in sm501fb_suspend_fb()
2106 if (par->store_cursor == NULL) { in sm501fb_suspend_fb()
2107 dev_err(info->dev, "no memory to store cursor\n"); in sm501fb_suspend_fb()
2111 dev_dbg(info->dev, "suspending screen to %p\n", par->store_fb); in sm501fb_suspend_fb()
2112 dev_dbg(info->dev, "suspending cursor to %p\n", par->store_cursor); in sm501fb_suspend_fb()
2114 memcpy_fromio(par->store_fb, par->screen.k_addr, par->screen.size); in sm501fb_suspend_fb()
2115 memcpy_fromio(par->store_cursor, par->cursor.k_addr, par->cursor.size); in sm501fb_suspend_fb()
2120 vfree(par->store_fb); in sm501fb_suspend_fb()
2121 par->store_fb = NULL; in sm501fb_suspend_fb()
2123 return -ENOMEM; in sm501fb_suspend_fb()
2129 struct fb_info *fbi = info->fb[head]; in sm501fb_resume_fb()
2135 par = fbi->par; in sm501fb_resume_fb()
2136 if (par->screen.size == 0) in sm501fb_resume_fb()
2139 /* re-activate the configuration */ in sm501fb_resume_fb()
2141 (par->ops.fb_set_par)(fbi); in sm501fb_resume_fb()
2145 dev_dbg(info->dev, "restoring screen from %p\n", par->store_fb); in sm501fb_resume_fb()
2146 dev_dbg(info->dev, "restoring cursor from %p\n", par->store_cursor); in sm501fb_resume_fb()
2148 if (par->store_fb) in sm501fb_resume_fb()
2149 memcpy_toio(par->screen.k_addr, par->store_fb, in sm501fb_resume_fb()
2150 par->screen.size); in sm501fb_resume_fb()
2152 if (par->store_cursor) in sm501fb_resume_fb()
2153 memcpy_toio(par->cursor.k_addr, par->store_cursor, in sm501fb_resume_fb()
2154 par->cursor.size); in sm501fb_resume_fb()
2160 vfree(par->store_fb); in sm501fb_resume_fb()
2161 vfree(par->store_cursor); in sm501fb_resume_fb()
2172 info->pm_crt_ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); in sm501fb_suspend()
2178 sm501_unit_power(info->dev->parent, SM501_GATE_DISPLAY, 0); in sm501fb_suspend()
2192 sm501_unit_power(info->dev->parent, SM501_GATE_DISPLAY, 1); in sm501fb_resume()
2196 crt_ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); in sm501fb_resume()
2198 crt_ctrl |= info->pm_crt_ctrl & SM501_CRT_CTRL_SAVE; in sm501fb_resume()
2199 smc501_writel(crt_ctrl, info->regs + SM501_DC_CRT_CONTROL); in sm501fb_resume()
2218 .name = "sm501-fb",
2227 "Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\" ");
2229 MODULE_PARM_DESC(bpp, "Specify bit-per-pixel if not specified mode");