aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 11:39:56 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-30 11:39:56 -0400
commit1dd465cac8d3ba18a9840d032f6604147269c031 (patch)
tree78f00fdeae26d018def75e7517aa50e56f4994df /drivers/video
parenta2218cac0aacecbecebd3cabc43cc8a4a09cecbb (diff)
parent217874feed0d3a6543a6b7127782f4a08bffd731 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/corgi_bl.c1
-rw-r--r--drivers/video/imxfb.c1
-rw-r--r--drivers/video/pxafb.c108
-rw-r--r--drivers/video/pxafb.h9
4 files changed, 54 insertions, 65 deletions
diff --git a/drivers/video/backlight/corgi_bl.c b/drivers/video/backlight/corgi_bl.c
index 630f2dfa9699..3c72c627e65e 100644
--- a/drivers/video/backlight/corgi_bl.c
+++ b/drivers/video/backlight/corgi_bl.c
@@ -19,7 +19,6 @@
19#include <linux/fb.h> 19#include <linux/fb.h>
20#include <linux/backlight.h> 20#include <linux/backlight.h>
21 21
22#include <asm/mach-types.h>
23#include <asm/arch/sharpsl.h> 22#include <asm/arch/sharpsl.h>
24 23
25#define CORGI_DEFAULT_INTENSITY 0x1f 24#define CORGI_DEFAULT_INTENSITY 0x1f
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 6c2244cf0e74..1d54d3d6960b 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -36,7 +36,6 @@
36 36
37#include <asm/hardware.h> 37#include <asm/hardware.h>
38#include <asm/io.h> 38#include <asm/io.h>
39#include <asm/mach-types.h>
40#include <asm/uaccess.h> 39#include <asm/uaccess.h>
41#include <asm/arch/imxfb.h> 40#include <asm/arch/imxfb.h>
42 41
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 34d4dcc0320a..194eed0a238c 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -260,9 +260,9 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
260 } 260 }
261 261
262#ifdef CONFIG_CPU_FREQ 262#ifdef CONFIG_CPU_FREQ
263 DPRINTK("dma period = %d ps, clock = %d kHz\n", 263 pr_debug("pxafb: dma period = %d ps, clock = %d kHz\n",
264 pxafb_display_dma_period(var), 264 pxafb_display_dma_period(var),
265 get_clk_frequency_khz(0)); 265 get_clk_frequency_khz(0));
266#endif 266#endif
267 267
268 return 0; 268 return 0;
@@ -270,7 +270,7 @@ static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
270 270
271static inline void pxafb_set_truecolor(u_int is_true_color) 271static inline void pxafb_set_truecolor(u_int is_true_color)
272{ 272{
273 DPRINTK("true_color = %d\n", is_true_color); 273 pr_debug("pxafb: true_color = %d\n", is_true_color);
274 // do your machine-specific setup if needed 274 // do your machine-specific setup if needed
275} 275}
276 276
@@ -284,7 +284,7 @@ static int pxafb_set_par(struct fb_info *info)
284 struct fb_var_screeninfo *var = &info->var; 284 struct fb_var_screeninfo *var = &info->var;
285 unsigned long palette_mem_size; 285 unsigned long palette_mem_size;
286 286
287 DPRINTK("set_par\n"); 287 pr_debug("pxafb: set_par\n");
288 288
289 if (var->bits_per_pixel == 16) 289 if (var->bits_per_pixel == 16)
290 fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR; 290 fbi->fb.fix.visual = FB_VISUAL_TRUECOLOR;
@@ -308,7 +308,7 @@ static int pxafb_set_par(struct fb_info *info)
308 308
309 palette_mem_size = fbi->palette_size * sizeof(u16); 309 palette_mem_size = fbi->palette_size * sizeof(u16);
310 310
311 DPRINTK("palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size); 311 pr_debug("pxafb: palette_mem_size = 0x%08lx\n", palette_mem_size);
312 312
313 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size); 313 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size);
314 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; 314 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size;
@@ -369,7 +369,7 @@ static int pxafb_blank(int blank, struct fb_info *info)
369 struct pxafb_info *fbi = (struct pxafb_info *)info; 369 struct pxafb_info *fbi = (struct pxafb_info *)info;
370 int i; 370 int i;
371 371
372 DPRINTK("pxafb_blank: blank=%d\n", blank); 372 pr_debug("pxafb: blank=%d\n", blank);
373 373
374 switch (blank) { 374 switch (blank) {
375 case FB_BLANK_POWERDOWN: 375 case FB_BLANK_POWERDOWN:
@@ -508,15 +508,15 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
508 u_long flags; 508 u_long flags;
509 u_int lines_per_panel, pcd = get_pcd(var->pixclock); 509 u_int lines_per_panel, pcd = get_pcd(var->pixclock);
510 510
511 DPRINTK("Configuring PXA LCD\n"); 511 pr_debug("pxafb: Configuring PXA LCD\n");
512 512
513 DPRINTK("var: xres=%d hslen=%d lm=%d rm=%d\n", 513 pr_debug("var: xres=%d hslen=%d lm=%d rm=%d\n",
514 var->xres, var->hsync_len, 514 var->xres, var->hsync_len,
515 var->left_margin, var->right_margin); 515 var->left_margin, var->right_margin);
516 DPRINTK("var: yres=%d vslen=%d um=%d bm=%d\n", 516 pr_debug("var: yres=%d vslen=%d um=%d bm=%d\n",
517 var->yres, var->vsync_len, 517 var->yres, var->vsync_len,
518 var->upper_margin, var->lower_margin); 518 var->upper_margin, var->lower_margin);
519 DPRINTK("var: pixclock=%d pcd=%d\n", var->pixclock, pcd); 519 pr_debug("var: pixclock=%d pcd=%d\n", var->pixclock, pcd);
520 520
521#if DEBUG_VAR 521#if DEBUG_VAR
522 if (var->xres < 16 || var->xres > 1024) 522 if (var->xres < 16 || var->xres > 1024)
@@ -589,10 +589,10 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
589 if (pcd) 589 if (pcd)
590 new_regs.lccr3 |= LCCR3_PixClkDiv(pcd); 590 new_regs.lccr3 |= LCCR3_PixClkDiv(pcd);
591 591
592 DPRINTK("nlccr0 = 0x%08x\n", new_regs.lccr0); 592 pr_debug("nlccr0 = 0x%08x\n", new_regs.lccr0);
593 DPRINTK("nlccr1 = 0x%08x\n", new_regs.lccr1); 593 pr_debug("nlccr1 = 0x%08x\n", new_regs.lccr1);
594 DPRINTK("nlccr2 = 0x%08x\n", new_regs.lccr2); 594 pr_debug("nlccr2 = 0x%08x\n", new_regs.lccr2);
595 DPRINTK("nlccr3 = 0x%08x\n", new_regs.lccr3); 595 pr_debug("nlccr3 = 0x%08x\n", new_regs.lccr3);
596 596
597 /* Update shadow copy atomically */ 597 /* Update shadow copy atomically */
598 local_irq_save(flags); 598 local_irq_save(flags);
@@ -637,24 +637,24 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
637 } 637 }
638 638
639#if 0 639#if 0
640 DPRINTK("fbi->dmadesc_fblow_cpu = 0x%p\n", fbi->dmadesc_fblow_cpu); 640 pr_debug("fbi->dmadesc_fblow_cpu = 0x%p\n", fbi->dmadesc_fblow_cpu);
641 DPRINTK("fbi->dmadesc_fbhigh_cpu = 0x%p\n", fbi->dmadesc_fbhigh_cpu); 641 pr_debug("fbi->dmadesc_fbhigh_cpu = 0x%p\n", fbi->dmadesc_fbhigh_cpu);
642 DPRINTK("fbi->dmadesc_palette_cpu = 0x%p\n", fbi->dmadesc_palette_cpu); 642 pr_debug("fbi->dmadesc_palette_cpu = 0x%p\n", fbi->dmadesc_palette_cpu);
643 DPRINTK("fbi->dmadesc_fblow_dma = 0x%x\n", fbi->dmadesc_fblow_dma); 643 pr_debug("fbi->dmadesc_fblow_dma = 0x%x\n", fbi->dmadesc_fblow_dma);
644 DPRINTK("fbi->dmadesc_fbhigh_dma = 0x%x\n", fbi->dmadesc_fbhigh_dma); 644 pr_debug("fbi->dmadesc_fbhigh_dma = 0x%x\n", fbi->dmadesc_fbhigh_dma);
645 DPRINTK("fbi->dmadesc_palette_dma = 0x%x\n", fbi->dmadesc_palette_dma); 645 pr_debug("fbi->dmadesc_palette_dma = 0x%x\n", fbi->dmadesc_palette_dma);
646 646
647 DPRINTK("fbi->dmadesc_fblow_cpu->fdadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fdadr); 647 pr_debug("fbi->dmadesc_fblow_cpu->fdadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fdadr);
648 DPRINTK("fbi->dmadesc_fbhigh_cpu->fdadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fdadr); 648 pr_debug("fbi->dmadesc_fbhigh_cpu->fdadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fdadr);
649 DPRINTK("fbi->dmadesc_palette_cpu->fdadr = 0x%x\n", fbi->dmadesc_palette_cpu->fdadr); 649 pr_debug("fbi->dmadesc_palette_cpu->fdadr = 0x%x\n", fbi->dmadesc_palette_cpu->fdadr);
650 650
651 DPRINTK("fbi->dmadesc_fblow_cpu->fsadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fsadr); 651 pr_debug("fbi->dmadesc_fblow_cpu->fsadr = 0x%x\n", fbi->dmadesc_fblow_cpu->fsadr);
652 DPRINTK("fbi->dmadesc_fbhigh_cpu->fsadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fsadr); 652 pr_debug("fbi->dmadesc_fbhigh_cpu->fsadr = 0x%x\n", fbi->dmadesc_fbhigh_cpu->fsadr);
653 DPRINTK("fbi->dmadesc_palette_cpu->fsadr = 0x%x\n", fbi->dmadesc_palette_cpu->fsadr); 653 pr_debug("fbi->dmadesc_palette_cpu->fsadr = 0x%x\n", fbi->dmadesc_palette_cpu->fsadr);
654 654
655 DPRINTK("fbi->dmadesc_fblow_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fblow_cpu->ldcmd); 655 pr_debug("fbi->dmadesc_fblow_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fblow_cpu->ldcmd);
656 DPRINTK("fbi->dmadesc_fbhigh_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fbhigh_cpu->ldcmd); 656 pr_debug("fbi->dmadesc_fbhigh_cpu->ldcmd = 0x%x\n", fbi->dmadesc_fbhigh_cpu->ldcmd);
657 DPRINTK("fbi->dmadesc_palette_cpu->ldcmd = 0x%x\n", fbi->dmadesc_palette_cpu->ldcmd); 657 pr_debug("fbi->dmadesc_palette_cpu->ldcmd = 0x%x\n", fbi->dmadesc_palette_cpu->ldcmd);
658#endif 658#endif
659 659
660 fbi->reg_lccr0 = new_regs.lccr0; 660 fbi->reg_lccr0 = new_regs.lccr0;
@@ -684,7 +684,7 @@ static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *
684 */ 684 */
685static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on) 685static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on)
686{ 686{
687 DPRINTK("backlight o%s\n", on ? "n" : "ff"); 687 pr_debug("pxafb: backlight o%s\n", on ? "n" : "ff");
688 688
689 if (pxafb_backlight_power) 689 if (pxafb_backlight_power)
690 pxafb_backlight_power(on); 690 pxafb_backlight_power(on);
@@ -692,7 +692,7 @@ static inline void __pxafb_backlight_power(struct pxafb_info *fbi, int on)
692 692
693static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on) 693static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
694{ 694{
695 DPRINTK("LCD power o%s\n", on ? "n" : "ff"); 695 pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff");
696 696
697 if (pxafb_lcd_power) 697 if (pxafb_lcd_power)
698 pxafb_lcd_power(on); 698 pxafb_lcd_power(on);
@@ -740,13 +740,13 @@ static void pxafb_setup_gpio(struct pxafb_info *fbi)
740 740
741static void pxafb_enable_controller(struct pxafb_info *fbi) 741static void pxafb_enable_controller(struct pxafb_info *fbi)
742{ 742{
743 DPRINTK("Enabling LCD controller\n"); 743 pr_debug("pxafb: Enabling LCD controller\n");
744 DPRINTK("fdadr0 0x%08x\n", (unsigned int) fbi->fdadr0); 744 pr_debug("fdadr0 0x%08x\n", (unsigned int) fbi->fdadr0);
745 DPRINTK("fdadr1 0x%08x\n", (unsigned int) fbi->fdadr1); 745 pr_debug("fdadr1 0x%08x\n", (unsigned int) fbi->fdadr1);
746 DPRINTK("reg_lccr0 0x%08x\n", (unsigned int) fbi->reg_lccr0); 746 pr_debug("reg_lccr0 0x%08x\n", (unsigned int) fbi->reg_lccr0);
747 DPRINTK("reg_lccr1 0x%08x\n", (unsigned int) fbi->reg_lccr1); 747 pr_debug("reg_lccr1 0x%08x\n", (unsigned int) fbi->reg_lccr1);
748 DPRINTK("reg_lccr2 0x%08x\n", (unsigned int) fbi->reg_lccr2); 748 pr_debug("reg_lccr2 0x%08x\n", (unsigned int) fbi->reg_lccr2);
749 DPRINTK("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3); 749 pr_debug("reg_lccr3 0x%08x\n", (unsigned int) fbi->reg_lccr3);
750 750
751 /* enable LCD controller clock */ 751 /* enable LCD controller clock */
752 pxa_set_cken(CKEN16_LCD, 1); 752 pxa_set_cken(CKEN16_LCD, 1);
@@ -761,19 +761,19 @@ static void pxafb_enable_controller(struct pxafb_info *fbi)
761 FDADR1 = fbi->fdadr1; 761 FDADR1 = fbi->fdadr1;
762 LCCR0 |= LCCR0_ENB; 762 LCCR0 |= LCCR0_ENB;
763 763
764 DPRINTK("FDADR0 0x%08x\n", (unsigned int) FDADR0); 764 pr_debug("FDADR0 0x%08x\n", (unsigned int) FDADR0);
765 DPRINTK("FDADR1 0x%08x\n", (unsigned int) FDADR1); 765 pr_debug("FDADR1 0x%08x\n", (unsigned int) FDADR1);
766 DPRINTK("LCCR0 0x%08x\n", (unsigned int) LCCR0); 766 pr_debug("LCCR0 0x%08x\n", (unsigned int) LCCR0);
767 DPRINTK("LCCR1 0x%08x\n", (unsigned int) LCCR1); 767 pr_debug("LCCR1 0x%08x\n", (unsigned int) LCCR1);
768 DPRINTK("LCCR2 0x%08x\n", (unsigned int) LCCR2); 768 pr_debug("LCCR2 0x%08x\n", (unsigned int) LCCR2);
769 DPRINTK("LCCR3 0x%08x\n", (unsigned int) LCCR3); 769 pr_debug("LCCR3 0x%08x\n", (unsigned int) LCCR3);
770} 770}
771 771
772static void pxafb_disable_controller(struct pxafb_info *fbi) 772static void pxafb_disable_controller(struct pxafb_info *fbi)
773{ 773{
774 DECLARE_WAITQUEUE(wait, current); 774 DECLARE_WAITQUEUE(wait, current);
775 775
776 DPRINTK("Disabling LCD controller\n"); 776 pr_debug("pxafb: disabling LCD controller\n");
777 777
778 set_current_state(TASK_UNINTERRUPTIBLE); 778 set_current_state(TASK_UNINTERRUPTIBLE);
779 add_wait_queue(&fbi->ctrlr_wait, &wait); 779 add_wait_queue(&fbi->ctrlr_wait, &wait);
@@ -1039,7 +1039,7 @@ static int __init pxafb_map_video_memory(struct pxafb_info *fbi)
1039 fbi->palette_size = fbi->fb.var.bits_per_pixel == 8 ? 256 : 16; 1039 fbi->palette_size = fbi->fb.var.bits_per_pixel == 8 ? 256 : 16;
1040 1040
1041 palette_mem_size = fbi->palette_size * sizeof(u16); 1041 palette_mem_size = fbi->palette_size * sizeof(u16);
1042 DPRINTK("palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size); 1042 pr_debug("pxafb: palette_mem_size = 0x%08lx\n", palette_mem_size);
1043 1043
1044 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size); 1044 fbi->palette_cpu = (u16 *)(fbi->map_cpu + PAGE_SIZE - palette_mem_size);
1045 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size; 1045 fbi->palette_dma = fbi->map_dma + PAGE_SIZE - palette_mem_size;
diff --git a/drivers/video/pxafb.h b/drivers/video/pxafb.h
index 22c00be786a8..47f41f70db7a 100644
--- a/drivers/video/pxafb.h
+++ b/drivers/video/pxafb.h
@@ -114,15 +114,6 @@ struct pxafb_info {
114#define PXA_NAME "PXA" 114#define PXA_NAME "PXA"
115 115
116/* 116/*
117 * Debug macros
118 */
119#if DEBUG
120# define DPRINTK(fmt, args...) printk("%s: " fmt, __FUNCTION__ , ## args)
121#else
122# define DPRINTK(fmt, args...)
123#endif
124
125/*
126 * Minimum X and Y resolutions 117 * Minimum X and Y resolutions
127 */ 118 */
128#define MIN_XRES 64 119#define MIN_XRES 64