aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/pxafb.c
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2008-04-30 03:52:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:31 -0400
commitded245b67f0a412b75052a285a0b0d1798650a63 (patch)
treeade22727ad13bff5337d8ce72d13648ecc2ba066 /drivers/video/pxafb.c
parentb0086efba5ad4905090b1e2e62a7e84d9473287f (diff)
pxafb: purge unnecessary pr_debug and comments from pxafb
Signed-off-by: eric miao <eric.miao@marvell.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/pxafb.c')
-rw-r--r--drivers/video/pxafb.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 6e6128c51d03..9c87a9c2566d 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -355,7 +355,6 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
355 355
356static inline void pxafb_set_truecolor(u_int is_true_color) 356static inline void pxafb_set_truecolor(u_int is_true_color)
357{ 357{
358 pr_debug("pxafb: true_color = %d\n", is_true_color);
359 /* do your machine-specific setup if needed */ 358 /* do your machine-specific setup if needed */
360} 359}
361 360
@@ -369,8 +368,6 @@ static int pxafb_set_par(struct fb_info *info)
369 struct fb_var_screeninfo *var = &info->var; 368 struct fb_var_screeninfo *var = &info->var;
370 unsigned long palette_mem_size; 369 unsigned long palette_mem_size;
371 370
372 pr_debug("pxafb: set_par\n");
373
374 if (var->bits_per_pixel == 16) 371 if (var->bits_per_pixel == 16)
375 fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR; 372 fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR;
376 else if (!fbi->cmap_static) 373 else if (!fbi->cmap_static)
@@ -397,8 +394,6 @@ static int pxafb_set_par(struct fb_info *info)
397 else 394 else
398 palette_mem_size = fbi->palette_size * sizeof(u32); 395 palette_mem_size = fbi->palette_size * sizeof(u32);
399 396
400 pr_debug("pxafb: palette_mem_size = 0x%08lx\n", palette_mem_size);
401
402 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size); 397 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size);
403 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; 398 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size;
404 399
@@ -418,36 +413,6 @@ static int pxafb_set_par(struct fb_info *info)
418} 413}
419 414
420/* 415/*
421 * Formal definition of the VESA spec:
422 * On
423 * This refers to the state of the display when it is in full operation
424 * Stand-By
425 * This defines an optional operating state of minimal power reduction with
426 * the shortest recovery time
427 * Suspend
428 * This refers to a level of power management in which substantial power
429 * reduction is achieved by the display. The display can have a longer
430 * recovery time from this state than from the Stand-by state
431 * Off
432 * This indicates that the display is consuming the lowest level of power
433 * and is non-operational. Recovery from this state may optionally require
434 * the user to manually power on the monitor
435 *
436 * Now, the fbdev driver adds an additional state, (blank), where they
437 * turn off the video (maybe by colormap tricks), but don't mess with the
438 * video itself: think of it semantically between on and Stand-By.
439 *
440 * So here's what we should do in our fbdev blank routine:
441 *
442 * VESA_NO_BLANKING (mode 0) Video on, front/back light on
443 * VESA_VSYNC_SUSPEND (mode 1) Video on, front/back light off
444 * VESA_HSYNC_SUSPEND (mode 2) Video on, front/back light off
445 * VESA_POWERDOWN (mode 3) Video off, front/back light off
446 *
447 * This will match the matrox implementation.
448 */
449
450/*
451 * pxafb_blank(): 416 * pxafb_blank():
452 * Blank the display by setting all palette values to zero. Note, the 417 * Blank the display by setting all palette values to zero. Note, the
453 * 16 bpp mode does not really use the palette, so this will not 418 * 16 bpp mode does not really use the palette, so this will not
@@ -458,8 +423,6 @@ static int pxafb_blank(int blank, struct fb_info *info)
458 struct pxafb_info *fbi = (struct pxafb_info *)info; 423 struct pxafb_info *fbi = (struct pxafb_info *)info;
459 int i; 424 int i;
460 425
461 pr_debug("pxafb: blank=%d\n", blank);
462
463 switch (blank) { 426 switch (blank) {
464 case FB_BLANK_POWERDOWN: 427 case FB_BLANK_POWERDOWN:
465 case FB_BLANK_VSYNC_SUSPEND: 428 case FB_BLANK_VSYNC_SUSPEND:
@@ -600,16 +563,6 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var,
600 u_long flags; 563 u_long flags;
601 u_int lines_per_panel, pcd = get_pcd(fbi, var->pixclock); 564 u_int lines_per_panel, pcd = get_pcd(fbi, var->pixclock);
602 565
603 pr_debug("pxafb: Configuring PXA LCD\n");
604
605 pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n",
606 var->xres, var->hsync_len,
607 var->left_margin, var->right_margin);
608 pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
609 var->yres, var->vsync_len,
610 var->upper_margin, var->lower_margin);
611 pr_debug("var: pixclock=%d pcd=%d\n", var->pixclock, pcd);
612
613#if DEBUG_VAR 566#if DEBUG_VAR
614 if (var->xres < 16 || var->xres > 1024) 567 if (var->xres < 16 || var->xres > 1024)
615 printk(KERN_ERR "%s: invalid xres %d\n", 568 printk(KERN_ERR "%s: invalid xres %d\n",
@@ -683,11 +636,6 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var,
683 if (pcd) 636 if (pcd)
684 new_regs.lccr3 |= LCCR3_PixClkDiv(pcd); 637 new_regs.lccr3 |= LCCR3_PixClkDiv(pcd);
685 638
686 pr_debug("nlccr0 = 0x%08x\n", new_regs.lccr0);
687 pr_debug("nlccr1 = 0x%08x\n", new_regs.lccr1);
688 pr_debug("nlccr2 = 0x%08x\n", new_regs.lccr2);
689 pr_debug("nlccr3 = 0x%08x\n", new_regs.lccr3);
690
691 /* Update shadow copy atomically */ 639 /* Update shadow copy atomically */
692 local_irq_save(flags); 640 local_irq_save(flags);
693 641
@@ -849,22 +797,12 @@ static void pxafb_enable_controller(struct pxafb_info *fbi)
849 FDADR0 = fbi->fdadr0; 797 FDADR0 = fbi->fdadr0;
850 FDADR1 = fbi->fdadr1; 798 FDADR1 = fbi->fdadr1;
851 LCCR0 |= LCCR0_ENB; 799 LCCR0 |= LCCR0_ENB;
852
853 pr_debug("FDADR0 0x%08x\n", (unsigned int) FDADR0);
854 pr_debug("FDADR1 0x%08x\n", (unsigned int) FDADR1);
855 pr_debug("LCCR0 0x%08x\n", (unsigned int) LCCR0);
856 pr_debug("LCCR1 0x%08x\n", (unsigned int) LCCR1);
857 pr_debug("LCCR2 0x%08x\n", (unsigned int) LCCR2);
858 pr_debug("LCCR3 0x%08x\n", (unsigned int) LCCR3);
859 pr_debug("LCCR4 0x%08x\n", (unsigned int) LCCR4);
860} 800}
861 801
862static void pxafb_disable_controller(struct pxafb_info *fbi) 802static void pxafb_disable_controller(struct pxafb_info *fbi)
863{ 803{
864 DECLARE_WAITQUEUE(wait, current); 804 DECLARE_WAITQUEUE(wait, current);
865 805
866 pr_debug("pxafb: disabling LCD controller\n");
867
868 set_current_state(TASK_UNINTERRUPTIBLE); 806 set_current_state(TASK_UNINTERRUPTIBLE);
869 add_wait_queue(&fbi->ctrlr_wait, &wait); 807 add_wait_queue(&fbi->ctrlr_wait, &wait);
870 808
@@ -1124,9 +1062,6 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi)
1124 else 1062 else
1125 palette_mem_size = fbi->palette_size * sizeof(u32); 1063 palette_mem_size = fbi->palette_size * sizeof(u32);
1126 1064
1127 pr_debug("pxafb: palette_mem_size = 0x%08lx\n",
1128 palette_mem_size);
1129
1130 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE 1065 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE
1131 - palette_mem_size); 1066 - palette_mem_size);
1132 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; 1067 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size;
@@ -1483,10 +1418,6 @@ static int __init pxafb_probe(struct platform_device *dev)
1483 goto failed; 1418 goto failed;
1484 } 1419 }
1485 1420
1486#ifdef CONFIG_PM
1487 /* TODO */
1488#endif
1489
1490#ifdef CONFIG_CPU_FREQ 1421#ifdef CONFIG_CPU_FREQ
1491 fbi->freq_transition.notifier_call = pxafb_freq_transition; 1422 fbi->freq_transition.notifier_call = pxafb_freq_transition;
1492 fbi->freq_policy.notifier_call = pxafb_freq_policy; 1423 fbi->freq_policy.notifier_call = pxafb_freq_policy;
@@ -1511,10 +1442,8 @@ failed:
1511 1442
1512static struct platform_driver pxafb_driver = { 1443static struct platform_driver pxafb_driver = {
1513 .probe = pxafb_probe, 1444 .probe = pxafb_probe,
1514#ifdef CONFIG_PM
1515 .suspend = pxafb_suspend, 1445 .suspend = pxafb_suspend,
1516 .resume = pxafb_resume, 1446 .resume = pxafb_resume,
1517#endif
1518 .driver = { 1447 .driver = {
1519 .name = "pxa2xx-fb", 1448 .name = "pxa2xx-fb",
1520 }, 1449 },