diff options
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/Kconfig | 1 | ||||
-rw-r--r-- | drivers/video/cyblafb.c | 11 | ||||
-rw-r--r-- | drivers/video/i810/i810-i2c.c | 16 | ||||
-rw-r--r-- | drivers/video/intelfb/intelfbdrv.c | 21 | ||||
-rw-r--r-- | drivers/video/s3c2410fb.c | 4 |
5 files changed, 27 insertions, 26 deletions
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 773ae11b4a19..1cd942abb580 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -768,6 +768,7 @@ config FB_INTEL | |||
768 | select FB_CFB_FILLRECT | 768 | select FB_CFB_FILLRECT |
769 | select FB_CFB_COPYAREA | 769 | select FB_CFB_COPYAREA |
770 | select FB_CFB_IMAGEBLIT | 770 | select FB_CFB_IMAGEBLIT |
771 | select FB_SOFT_CURSOR | ||
771 | help | 772 | help |
772 | This driver supports the on-board graphics built in to the Intel | 773 | This driver supports the on-board graphics built in to the Intel |
773 | 830M/845G/852GM/855GM/865G chipsets. | 774 | 830M/845G/852GM/855GM/865G chipsets. |
diff --git a/drivers/video/cyblafb.c b/drivers/video/cyblafb.c index ae2762cb5608..6992100a508c 100644 --- a/drivers/video/cyblafb.c +++ b/drivers/video/cyblafb.c | |||
@@ -410,20 +410,21 @@ static void cyblafb_imageblit(struct fb_info *info, | |||
410 | out32(GE0C,point(image->dx+image->width-1,image->dy+image->height-1)); | 410 | out32(GE0C,point(image->dx+image->width-1,image->dy+image->height-1)); |
411 | 411 | ||
412 | while(index < index_end) { | 412 | while(index < index_end) { |
413 | const char *p = image->data + index; | ||
413 | for(i=0;i<width_dds;i++) { | 414 | for(i=0;i<width_dds;i++) { |
414 | out32(GE9C,*((u32*) ((u32)image->data + index))); | 415 | out32(GE9C,*(u32*)p); |
416 | p+=4; | ||
415 | index+=4; | 417 | index+=4; |
416 | } | 418 | } |
417 | switch(width_dbs) { | 419 | switch(width_dbs) { |
418 | case 0: break; | 420 | case 0: break; |
419 | case 8: out32(GE9C,*((u8*)((u32)image->data+index))); | 421 | case 8: out32(GE9C,*(u8*)p); |
420 | index+=1; | 422 | index+=1; |
421 | break; | 423 | break; |
422 | case 16: out32(GE9C,*((u16*)((u32)image->data+index))); | 424 | case 16: out32(GE9C,*(u16*)p); |
423 | index+=2; | 425 | index+=2; |
424 | break; | 426 | break; |
425 | case 24: out32(GE9C,(u32)(*((u16*)((u32)image->data+index))) | | 427 | case 24: out32(GE9C,*(u16*)p | *(u8*)(p+2)<<16); |
426 | (u32)(*((u8*)((u32)image->data+index+2)))<<16); | ||
427 | index+=3; | 428 | index+=3; |
428 | break; | 429 | break; |
429 | } | 430 | } |
diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c index fda53aac1fc1..689d2586366d 100644 --- a/drivers/video/i810/i810-i2c.c +++ b/drivers/video/i810/i810-i2c.c | |||
@@ -44,7 +44,7 @@ static void i810i2c_setscl(void *data, int state) | |||
44 | { | 44 | { |
45 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 45 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
46 | struct i810fb_par *par = chan->par; | 46 | struct i810fb_par *par = chan->par; |
47 | u8 *mmio = par->mmio_start_virtual; | 47 | u8 __iomem *mmio = par->mmio_start_virtual; |
48 | 48 | ||
49 | i810_writel(mmio, GPIOB, (state ? SCL_VAL_OUT : 0) | SCL_DIR | | 49 | i810_writel(mmio, GPIOB, (state ? SCL_VAL_OUT : 0) | SCL_DIR | |
50 | SCL_DIR_MASK | SCL_VAL_MASK); | 50 | SCL_DIR_MASK | SCL_VAL_MASK); |
@@ -55,7 +55,7 @@ static void i810i2c_setsda(void *data, int state) | |||
55 | { | 55 | { |
56 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 56 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
57 | struct i810fb_par *par = chan->par; | 57 | struct i810fb_par *par = chan->par; |
58 | u8 *mmio = par->mmio_start_virtual; | 58 | u8 __iomem *mmio = par->mmio_start_virtual; |
59 | 59 | ||
60 | i810_writel(mmio, GPIOB, (state ? SDA_VAL_OUT : 0) | SDA_DIR | | 60 | i810_writel(mmio, GPIOB, (state ? SDA_VAL_OUT : 0) | SDA_DIR | |
61 | SDA_DIR_MASK | SDA_VAL_MASK); | 61 | SDA_DIR_MASK | SDA_VAL_MASK); |
@@ -66,7 +66,7 @@ static int i810i2c_getscl(void *data) | |||
66 | { | 66 | { |
67 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 67 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
68 | struct i810fb_par *par = chan->par; | 68 | struct i810fb_par *par = chan->par; |
69 | u8 *mmio = par->mmio_start_virtual; | 69 | u8 __iomem *mmio = par->mmio_start_virtual; |
70 | 70 | ||
71 | i810_writel(mmio, GPIOB, SCL_DIR_MASK); | 71 | i810_writel(mmio, GPIOB, SCL_DIR_MASK); |
72 | i810_writel(mmio, GPIOB, 0); | 72 | i810_writel(mmio, GPIOB, 0); |
@@ -77,7 +77,7 @@ static int i810i2c_getsda(void *data) | |||
77 | { | 77 | { |
78 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 78 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
79 | struct i810fb_par *par = chan->par; | 79 | struct i810fb_par *par = chan->par; |
80 | u8 *mmio = par->mmio_start_virtual; | 80 | u8 __iomem *mmio = par->mmio_start_virtual; |
81 | 81 | ||
82 | i810_writel(mmio, GPIOB, SDA_DIR_MASK); | 82 | i810_writel(mmio, GPIOB, SDA_DIR_MASK); |
83 | i810_writel(mmio, GPIOB, 0); | 83 | i810_writel(mmio, GPIOB, 0); |
@@ -88,7 +88,7 @@ static void i810ddc_setscl(void *data, int state) | |||
88 | { | 88 | { |
89 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 89 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
90 | struct i810fb_par *par = chan->par; | 90 | struct i810fb_par *par = chan->par; |
91 | u8 *mmio = par->mmio_start_virtual; | 91 | u8 __iomem *mmio = par->mmio_start_virtual; |
92 | 92 | ||
93 | i810_writel(mmio, GPIOA, (state ? SCL_VAL_OUT : 0) | SCL_DIR | | 93 | i810_writel(mmio, GPIOA, (state ? SCL_VAL_OUT : 0) | SCL_DIR | |
94 | SCL_DIR_MASK | SCL_VAL_MASK); | 94 | SCL_DIR_MASK | SCL_VAL_MASK); |
@@ -99,7 +99,7 @@ static void i810ddc_setsda(void *data, int state) | |||
99 | { | 99 | { |
100 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 100 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
101 | struct i810fb_par *par = chan->par; | 101 | struct i810fb_par *par = chan->par; |
102 | u8 *mmio = par->mmio_start_virtual; | 102 | u8 __iomem *mmio = par->mmio_start_virtual; |
103 | 103 | ||
104 | i810_writel(mmio, GPIOA, (state ? SDA_VAL_OUT : 0) | SDA_DIR | | 104 | i810_writel(mmio, GPIOA, (state ? SDA_VAL_OUT : 0) | SDA_DIR | |
105 | SDA_DIR_MASK | SDA_VAL_MASK); | 105 | SDA_DIR_MASK | SDA_VAL_MASK); |
@@ -110,7 +110,7 @@ static int i810ddc_getscl(void *data) | |||
110 | { | 110 | { |
111 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 111 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
112 | struct i810fb_par *par = chan->par; | 112 | struct i810fb_par *par = chan->par; |
113 | u8 *mmio = par->mmio_start_virtual; | 113 | u8 __iomem *mmio = par->mmio_start_virtual; |
114 | 114 | ||
115 | i810_writel(mmio, GPIOA, SCL_DIR_MASK); | 115 | i810_writel(mmio, GPIOA, SCL_DIR_MASK); |
116 | i810_writel(mmio, GPIOA, 0); | 116 | i810_writel(mmio, GPIOA, 0); |
@@ -121,7 +121,7 @@ static int i810ddc_getsda(void *data) | |||
121 | { | 121 | { |
122 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; | 122 | struct i810fb_i2c_chan *chan = (struct i810fb_i2c_chan *)data; |
123 | struct i810fb_par *par = chan->par; | 123 | struct i810fb_par *par = chan->par; |
124 | u8 *mmio = par->mmio_start_virtual; | 124 | u8 __iomem *mmio = par->mmio_start_virtual; |
125 | 125 | ||
126 | i810_writel(mmio, GPIOA, SDA_DIR_MASK); | 126 | i810_writel(mmio, GPIOA, SDA_DIR_MASK); |
127 | i810_writel(mmio, GPIOA, 0); | 127 | i810_writel(mmio, GPIOA, 0); |
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index bf62e6ed0382..80a09344f1aa 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c | |||
@@ -226,7 +226,7 @@ MODULE_DEVICE_TABLE(pci, intelfb_pci_table); | |||
226 | 226 | ||
227 | static int accel = 1; | 227 | static int accel = 1; |
228 | static int vram = 4; | 228 | static int vram = 4; |
229 | static int hwcursor = 1; | 229 | static int hwcursor = 0; |
230 | static int mtrr = 1; | 230 | static int mtrr = 1; |
231 | static int fixed = 0; | 231 | static int fixed = 0; |
232 | static int noinit = 0; | 232 | static int noinit = 0; |
@@ -609,15 +609,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
609 | dinfo->accel = 0; | 609 | dinfo->accel = 0; |
610 | } | 610 | } |
611 | 611 | ||
612 | if (MB(voffset) < stolen_size) | ||
613 | offset = (stolen_size >> 12); | ||
614 | else | ||
615 | offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; | ||
616 | |||
617 | /* Framebuffer parameters - Use all the stolen memory if >= vram */ | 612 | /* Framebuffer parameters - Use all the stolen memory if >= vram */ |
618 | if (ROUND_UP_TO_PAGE(stolen_size) >= ((offset << 12) + MB(vram))) { | 613 | if (ROUND_UP_TO_PAGE(stolen_size) >= MB(vram)) { |
619 | dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); | 614 | dinfo->fb.size = ROUND_UP_TO_PAGE(stolen_size); |
620 | dinfo->fb.offset = 0; | ||
621 | dinfo->fbmem_gart = 0; | 615 | dinfo->fbmem_gart = 0; |
622 | } else { | 616 | } else { |
623 | dinfo->fb.size = MB(vram); | 617 | dinfo->fb.size = MB(vram); |
@@ -648,6 +642,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
648 | return -ENODEV; | 642 | return -ENODEV; |
649 | } | 643 | } |
650 | 644 | ||
645 | if (MB(voffset) < stolen_size) | ||
646 | offset = (stolen_size >> 12); | ||
647 | else | ||
648 | offset = ROUND_UP_TO_PAGE(MB(voffset))/GTT_PAGE_SIZE; | ||
649 | |||
651 | /* set the mem offsets - set them after the already used pages */ | 650 | /* set the mem offsets - set them after the already used pages */ |
652 | if (dinfo->accel) { | 651 | if (dinfo->accel) { |
653 | dinfo->ring.offset = offset + gtt_info.current_memory; | 652 | dinfo->ring.offset = offset + gtt_info.current_memory; |
@@ -662,10 +661,11 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
662 | + (dinfo->cursor.size >> 12); | 661 | + (dinfo->cursor.size >> 12); |
663 | } | 662 | } |
664 | 663 | ||
664 | /* Allocate memories (which aren't stolen) */ | ||
665 | /* Map the fb and MMIO regions */ | 665 | /* Map the fb and MMIO regions */ |
666 | /* ioremap only up to the end of used aperture */ | 666 | /* ioremap only up to the end of used aperture */ |
667 | dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache | 667 | dinfo->aperture.virtual = (u8 __iomem *)ioremap_nocache |
668 | (dinfo->aperture.physical, (dinfo->fb.offset << 12) | 668 | (dinfo->aperture.physical, ((offset + dinfo->fb.offset) << 12) |
669 | + dinfo->fb.size); | 669 | + dinfo->fb.size); |
670 | if (!dinfo->aperture.virtual) { | 670 | if (!dinfo->aperture.virtual) { |
671 | ERR_MSG("Cannot remap FB region.\n"); | 671 | ERR_MSG("Cannot remap FB region.\n"); |
@@ -682,7 +682,6 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
682 | return -ENODEV; | 682 | return -ENODEV; |
683 | } | 683 | } |
684 | 684 | ||
685 | /* Allocate memories (which aren't stolen) */ | ||
686 | if (dinfo->accel) { | 685 | if (dinfo->accel) { |
687 | if (!(dinfo->gtt_ring_mem = | 686 | if (!(dinfo->gtt_ring_mem = |
688 | agp_allocate_memory(bridge, dinfo->ring.size >> 12, | 687 | agp_allocate_memory(bridge, dinfo->ring.size >> 12, |
@@ -1484,7 +1483,7 @@ intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor) | |||
1484 | #endif | 1483 | #endif |
1485 | 1484 | ||
1486 | if (!dinfo->hwcursor) | 1485 | if (!dinfo->hwcursor) |
1487 | return -ENXIO; | 1486 | return soft_cursor(info, cursor); |
1488 | 1487 | ||
1489 | intelfbhw_cursor_hide(dinfo); | 1488 | intelfbhw_cursor_hide(dinfo); |
1490 | 1489 | ||
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c index 00c0223a352e..5ab79afb53b7 100644 --- a/drivers/video/s3c2410fb.c +++ b/drivers/video/s3c2410fb.c | |||
@@ -228,8 +228,8 @@ static int s3c2410fb_check_var(struct fb_var_screeninfo *var, | |||
228 | * information | 228 | * information |
229 | */ | 229 | */ |
230 | 230 | ||
231 | static int s3c2410fb_activate_var(struct s3c2410fb_info *fbi, | 231 | static void s3c2410fb_activate_var(struct s3c2410fb_info *fbi, |
232 | struct fb_var_screeninfo *var) | 232 | struct fb_var_screeninfo *var) |
233 | { | 233 | { |
234 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK; | 234 | fbi->regs.lcdcon1 &= ~S3C2410_LCDCON1_MODEMASK; |
235 | 235 | ||