diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/resources/rsxface.c | 2 | ||||
-rw-r--r-- | drivers/char/hvc_lguest.c | 1 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 5 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 2 | ||||
-rw-r--r-- | drivers/char/tty_io.c | 56 | ||||
-rw-r--r-- | drivers/lguest/lguest.c | 9 | ||||
-rw-r--r-- | drivers/lguest/lguest_bus.c | 1 | ||||
-rw-r--r-- | drivers/mtd/mtdchar.c | 1 | ||||
-rw-r--r-- | drivers/spi/spi_mpc83xx.c | 25 | ||||
-rw-r--r-- | drivers/spi/spidev.c | 4 | ||||
-rw-r--r-- | drivers/video/console/fbcon.c | 14 | ||||
-rw-r--r-- | drivers/video/matrox/g450_pll.c | 23 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_DAC1064.h | 15 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_base.h | 1 | ||||
-rw-r--r-- | drivers/video/matrox/matroxfb_misc.c | 1 | ||||
-rw-r--r-- | drivers/video/pvr2fb.c | 16 | ||||
-rw-r--r-- | drivers/video/stifb.c | 19 |
17 files changed, 147 insertions, 48 deletions
diff --git a/drivers/acpi/resources/rsxface.c b/drivers/acpi/resources/rsxface.c index f63813a358c5..4c3fd4cdaf73 100644 --- a/drivers/acpi/resources/rsxface.c +++ b/drivers/acpi/resources/rsxface.c | |||
@@ -474,8 +474,6 @@ acpi_rs_match_vendor_resource(struct acpi_resource *resource, void *context) | |||
474 | return (AE_CTRL_TERMINATE); | 474 | return (AE_CTRL_TERMINATE); |
475 | } | 475 | } |
476 | 476 | ||
477 | ACPI_EXPORT_SYMBOL(acpi_rs_match_vendor_resource) | ||
478 | |||
479 | /******************************************************************************* | 477 | /******************************************************************************* |
480 | * | 478 | * |
481 | * FUNCTION: acpi_walk_resources | 479 | * FUNCTION: acpi_walk_resources |
diff --git a/drivers/char/hvc_lguest.c b/drivers/char/hvc_lguest.c index feeccbaec438..3d6bd0baa56d 100644 --- a/drivers/char/hvc_lguest.c +++ b/drivers/char/hvc_lguest.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/err.h> | 35 | #include <linux/err.h> |
36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
37 | #include <linux/lguest_bus.h> | 37 | #include <linux/lguest_bus.h> |
38 | #include <asm/paravirt.h> | ||
38 | #include "hvc_console.h" | 39 | #include "hvc_console.h" |
39 | 40 | ||
40 | /*D:340 This is our single console input buffer, with associated "struct | 41 | /*D:340 This is our single console input buffer, with associated "struct |
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index fee58e03dbe2..4177f6db83e9 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c | |||
@@ -1629,7 +1629,7 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1629 | { | 1629 | { |
1630 | struct cm4000_dev *dev; | 1630 | struct cm4000_dev *dev; |
1631 | struct pcmcia_device *link; | 1631 | struct pcmcia_device *link; |
1632 | int rc, minor = iminor(inode); | 1632 | int minor = iminor(inode); |
1633 | 1633 | ||
1634 | if (minor >= CM4000_MAX_DEV) | 1634 | if (minor >= CM4000_MAX_DEV) |
1635 | return -ENODEV; | 1635 | return -ENODEV; |
@@ -1668,7 +1668,6 @@ static int cmm_open(struct inode *inode, struct file *filp) | |||
1668 | start_monitor(dev); | 1668 | start_monitor(dev); |
1669 | 1669 | ||
1670 | link->open = 1; /* only one open per device */ | 1670 | link->open = 1; /* only one open per device */ |
1671 | rc = 0; | ||
1672 | 1671 | ||
1673 | DEBUGP(2, dev, "<- cmm_open\n"); | 1672 | DEBUGP(2, dev, "<- cmm_open\n"); |
1674 | return nonseekable_open(inode, filp); | 1673 | return nonseekable_open(inode, filp); |
@@ -1824,7 +1823,7 @@ static int cm4000_resume(struct pcmcia_device *link) | |||
1824 | 1823 | ||
1825 | static void cm4000_release(struct pcmcia_device *link) | 1824 | static void cm4000_release(struct pcmcia_device *link) |
1826 | { | 1825 | { |
1827 | cmm_cm4000_release(link->priv); /* delay release until device closed */ | 1826 | cmm_cm4000_release(link); /* delay release until device closed */ |
1828 | pcmcia_disable_device(link); | 1827 | pcmcia_disable_device(link); |
1829 | } | 1828 | } |
1830 | 1829 | ||
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index af88181a17f4..b24a3e7bbb9f 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c | |||
@@ -599,7 +599,7 @@ cs_release: | |||
599 | 599 | ||
600 | static void reader_release(struct pcmcia_device *link) | 600 | static void reader_release(struct pcmcia_device *link) |
601 | { | 601 | { |
602 | cm4040_reader_release(link->priv); | 602 | cm4040_reader_release(link); |
603 | pcmcia_disable_device(link); | 603 | pcmcia_disable_device(link); |
604 | } | 604 | } |
605 | 605 | ||
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index de37ebc3a4cf..51ea93cab6c4 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -369,25 +369,54 @@ static void tty_buffer_free(struct tty_struct *tty, struct tty_buffer *b) | |||
369 | } | 369 | } |
370 | 370 | ||
371 | /** | 371 | /** |
372 | * tty_buffer_flush - flush full tty buffers | 372 | * __tty_buffer_flush - flush full tty buffers |
373 | * @tty: tty to flush | 373 | * @tty: tty to flush |
374 | * | 374 | * |
375 | * flush all the buffers containing receive data | 375 | * flush all the buffers containing receive data. Caller must |
376 | * hold the buffer lock and must have ensured no parallel flush to | ||
377 | * ldisc is running. | ||
376 | * | 378 | * |
377 | * Locking: none | 379 | * Locking: Caller must hold tty->buf.lock |
378 | */ | 380 | */ |
379 | 381 | ||
380 | static void tty_buffer_flush(struct tty_struct *tty) | 382 | static void __tty_buffer_flush(struct tty_struct *tty) |
381 | { | 383 | { |
382 | struct tty_buffer *thead; | 384 | struct tty_buffer *thead; |
383 | unsigned long flags; | ||
384 | 385 | ||
385 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
386 | while((thead = tty->buf.head) != NULL) { | 386 | while((thead = tty->buf.head) != NULL) { |
387 | tty->buf.head = thead->next; | 387 | tty->buf.head = thead->next; |
388 | tty_buffer_free(tty, thead); | 388 | tty_buffer_free(tty, thead); |
389 | } | 389 | } |
390 | tty->buf.tail = NULL; | 390 | tty->buf.tail = NULL; |
391 | } | ||
392 | |||
393 | /** | ||
394 | * tty_buffer_flush - flush full tty buffers | ||
395 | * @tty: tty to flush | ||
396 | * | ||
397 | * flush all the buffers containing receive data. If the buffer is | ||
398 | * being processed by flush_to_ldisc then we defer the processing | ||
399 | * to that function | ||
400 | * | ||
401 | * Locking: none | ||
402 | */ | ||
403 | |||
404 | static void tty_buffer_flush(struct tty_struct *tty) | ||
405 | { | ||
406 | unsigned long flags; | ||
407 | spin_lock_irqsave(&tty->buf.lock, flags); | ||
408 | |||
409 | /* If the data is being pushed to the tty layer then we can't | ||
410 | process it here. Instead set a flag and the flush_to_ldisc | ||
411 | path will process the flush request before it exits */ | ||
412 | if (test_bit(TTY_FLUSHING, &tty->flags)) { | ||
413 | set_bit(TTY_FLUSHPENDING, &tty->flags); | ||
414 | spin_unlock_irqrestore(&tty->buf.lock, flags); | ||
415 | wait_event(tty->read_wait, | ||
416 | test_bit(TTY_FLUSHPENDING, &tty->flags) == 0); | ||
417 | return; | ||
418 | } else | ||
419 | __tty_buffer_flush(tty); | ||
391 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 420 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
392 | } | 421 | } |
393 | 422 | ||
@@ -3594,6 +3623,7 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3594 | return; | 3623 | return; |
3595 | 3624 | ||
3596 | spin_lock_irqsave(&tty->buf.lock, flags); | 3625 | spin_lock_irqsave(&tty->buf.lock, flags); |
3626 | set_bit(TTY_FLUSHING, &tty->flags); /* So we know a flush is running */ | ||
3597 | head = tty->buf.head; | 3627 | head = tty->buf.head; |
3598 | if (head != NULL) { | 3628 | if (head != NULL) { |
3599 | tty->buf.head = NULL; | 3629 | tty->buf.head = NULL; |
@@ -3607,6 +3637,11 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3607 | tty_buffer_free(tty, tbuf); | 3637 | tty_buffer_free(tty, tbuf); |
3608 | continue; | 3638 | continue; |
3609 | } | 3639 | } |
3640 | /* Ldisc or user is trying to flush the buffers | ||
3641 | we are feeding to the ldisc, stop feeding the | ||
3642 | line discipline as we want to empty the queue */ | ||
3643 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) | ||
3644 | break; | ||
3610 | if (!tty->receive_room) { | 3645 | if (!tty->receive_room) { |
3611 | schedule_delayed_work(&tty->buf.work, 1); | 3646 | schedule_delayed_work(&tty->buf.work, 1); |
3612 | break; | 3647 | break; |
@@ -3620,8 +3655,17 @@ static void flush_to_ldisc(struct work_struct *work) | |||
3620 | disc->receive_buf(tty, char_buf, flag_buf, count); | 3655 | disc->receive_buf(tty, char_buf, flag_buf, count); |
3621 | spin_lock_irqsave(&tty->buf.lock, flags); | 3656 | spin_lock_irqsave(&tty->buf.lock, flags); |
3622 | } | 3657 | } |
3658 | /* Restore the queue head */ | ||
3623 | tty->buf.head = head; | 3659 | tty->buf.head = head; |
3624 | } | 3660 | } |
3661 | /* We may have a deferred request to flush the input buffer, | ||
3662 | if so pull the chain under the lock and empty the queue */ | ||
3663 | if (test_bit(TTY_FLUSHPENDING, &tty->flags)) { | ||
3664 | __tty_buffer_flush(tty); | ||
3665 | clear_bit(TTY_FLUSHPENDING, &tty->flags); | ||
3666 | wake_up(&tty->read_wait); | ||
3667 | } | ||
3668 | clear_bit(TTY_FLUSHING, &tty->flags); | ||
3625 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 3669 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
3626 | 3670 | ||
3627 | tty_ldisc_deref(disc); | 3671 | tty_ldisc_deref(disc); |
diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c index 524beea7fb19..6e135ac0834f 100644 --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c | |||
@@ -936,23 +936,24 @@ static const struct lguest_insns | |||
936 | /* Now our patch routine is fairly simple (based on the native one in | 936 | /* Now our patch routine is fairly simple (based on the native one in |
937 | * paravirt.c). If we have a replacement, we copy it in and return how much of | 937 | * paravirt.c). If we have a replacement, we copy it in and return how much of |
938 | * the available space we used. */ | 938 | * the available space we used. */ |
939 | static unsigned lguest_patch(u8 type, u16 clobber, void *insns, unsigned len) | 939 | static unsigned lguest_patch(u8 type, u16 clobber, void *ibuf, |
940 | unsigned long addr, unsigned len) | ||
940 | { | 941 | { |
941 | unsigned int insn_len; | 942 | unsigned int insn_len; |
942 | 943 | ||
943 | /* Don't do anything special if we don't have a replacement */ | 944 | /* Don't do anything special if we don't have a replacement */ |
944 | if (type >= ARRAY_SIZE(lguest_insns) || !lguest_insns[type].start) | 945 | if (type >= ARRAY_SIZE(lguest_insns) || !lguest_insns[type].start) |
945 | return paravirt_patch_default(type, clobber, insns, len); | 946 | return paravirt_patch_default(type, clobber, ibuf, addr, len); |
946 | 947 | ||
947 | insn_len = lguest_insns[type].end - lguest_insns[type].start; | 948 | insn_len = lguest_insns[type].end - lguest_insns[type].start; |
948 | 949 | ||
949 | /* Similarly if we can't fit replacement (shouldn't happen, but let's | 950 | /* Similarly if we can't fit replacement (shouldn't happen, but let's |
950 | * be thorough). */ | 951 | * be thorough). */ |
951 | if (len < insn_len) | 952 | if (len < insn_len) |
952 | return paravirt_patch_default(type, clobber, insns, len); | 953 | return paravirt_patch_default(type, clobber, ibuf, addr, len); |
953 | 954 | ||
954 | /* Copy in our instructions. */ | 955 | /* Copy in our instructions. */ |
955 | memcpy(insns, lguest_insns[type].start, insn_len); | 956 | memcpy(ibuf, lguest_insns[type].start, insn_len); |
956 | return insn_len; | 957 | return insn_len; |
957 | } | 958 | } |
958 | 959 | ||
diff --git a/drivers/lguest/lguest_bus.c b/drivers/lguest/lguest_bus.c index 55a7940ca732..9e7752cc8002 100644 --- a/drivers/lguest/lguest_bus.c +++ b/drivers/lguest/lguest_bus.c | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/bootmem.h> | 5 | #include <linux/bootmem.h> |
6 | #include <linux/lguest_bus.h> | 6 | #include <linux/lguest_bus.h> |
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/paravirt.h> | ||
8 | 9 | ||
9 | static ssize_t type_show(struct device *_dev, | 10 | static ssize_t type_show(struct device *_dev, |
10 | struct device_attribute *attr, char *buf) | 11 | struct device_attribute *attr, char *buf) |
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 8c86b802f212..d091b2430b48 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -7,6 +7,7 @@ | |||
7 | 7 | ||
8 | #include <linux/device.h> | 8 | #include <linux/device.h> |
9 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
10 | #include <linux/mm.h> | ||
10 | #include <linux/err.h> | 11 | #include <linux/err.h> |
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c index 0c16a2b39b41..2adf856e44c2 100644 --- a/drivers/spi/spi_mpc83xx.c +++ b/drivers/spi/spi_mpc83xx.c | |||
@@ -86,7 +86,7 @@ struct mpc83xx_spi { | |||
86 | 86 | ||
87 | unsigned nsecs; /* (clock cycle time)/2 */ | 87 | unsigned nsecs; /* (clock cycle time)/2 */ |
88 | 88 | ||
89 | u32 sysclk; | 89 | u32 spibrg; /* SPIBRG input clock */ |
90 | u32 rx_shift; /* RX data reg shift when in qe mode */ | 90 | u32 rx_shift; /* RX data reg shift when in qe mode */ |
91 | u32 tx_shift; /* TX data reg shift when in qe mode */ | 91 | u32 tx_shift; /* TX data reg shift when in qe mode */ |
92 | 92 | ||
@@ -148,6 +148,8 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value) | |||
148 | if (value == BITBANG_CS_ACTIVE) { | 148 | if (value == BITBANG_CS_ACTIVE) { |
149 | u32 regval = mpc83xx_spi_read_reg(&mpc83xx_spi->base->mode); | 149 | u32 regval = mpc83xx_spi_read_reg(&mpc83xx_spi->base->mode); |
150 | u32 len = spi->bits_per_word; | 150 | u32 len = spi->bits_per_word; |
151 | u8 pm; | ||
152 | |||
151 | if (len == 32) | 153 | if (len == 32) |
152 | len = 0; | 154 | len = 0; |
153 | else | 155 | else |
@@ -169,17 +171,20 @@ static void mpc83xx_spi_chipselect(struct spi_device *spi, int value) | |||
169 | 171 | ||
170 | regval |= SPMODE_LEN(len); | 172 | regval |= SPMODE_LEN(len); |
171 | 173 | ||
172 | if ((mpc83xx_spi->sysclk / spi->max_speed_hz) >= 64) { | 174 | if ((mpc83xx_spi->spibrg / spi->max_speed_hz) >= 64) { |
173 | u8 pm = mpc83xx_spi->sysclk / (spi->max_speed_hz * 64); | 175 | pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 64) - 1; |
174 | if (pm > 0x0f) { | 176 | if (pm > 0x0f) { |
175 | printk(KERN_WARNING "MPC83xx SPI: SPICLK can't be less then a SYSCLK/1024!\n" | 177 | dev_err(&spi->dev, "Requested speed is too " |
176 | "Requested SPICLK is %d Hz. Will use %d Hz instead.\n", | 178 | "low: %d Hz. Will use %d Hz instead.\n", |
177 | spi->max_speed_hz, mpc83xx_spi->sysclk / 1024); | 179 | spi->max_speed_hz, |
180 | mpc83xx_spi->spibrg / 1024); | ||
178 | pm = 0x0f; | 181 | pm = 0x0f; |
179 | } | 182 | } |
180 | regval |= SPMODE_PM(pm) | SPMODE_DIV16; | 183 | regval |= SPMODE_PM(pm) | SPMODE_DIV16; |
181 | } else { | 184 | } else { |
182 | u8 pm = mpc83xx_spi->sysclk / (spi->max_speed_hz * 4); | 185 | pm = mpc83xx_spi->spibrg / (spi->max_speed_hz * 4); |
186 | if (pm) | ||
187 | pm--; | ||
183 | regval |= SPMODE_PM(pm); | 188 | regval |= SPMODE_PM(pm); |
184 | } | 189 | } |
185 | 190 | ||
@@ -429,13 +434,17 @@ static int __init mpc83xx_spi_probe(struct platform_device *dev) | |||
429 | mpc83xx_spi->bitbang.chipselect = mpc83xx_spi_chipselect; | 434 | mpc83xx_spi->bitbang.chipselect = mpc83xx_spi_chipselect; |
430 | mpc83xx_spi->bitbang.setup_transfer = mpc83xx_spi_setup_transfer; | 435 | mpc83xx_spi->bitbang.setup_transfer = mpc83xx_spi_setup_transfer; |
431 | mpc83xx_spi->bitbang.txrx_bufs = mpc83xx_spi_bufs; | 436 | mpc83xx_spi->bitbang.txrx_bufs = mpc83xx_spi_bufs; |
432 | mpc83xx_spi->sysclk = pdata->sysclk; | ||
433 | mpc83xx_spi->activate_cs = pdata->activate_cs; | 437 | mpc83xx_spi->activate_cs = pdata->activate_cs; |
434 | mpc83xx_spi->deactivate_cs = pdata->deactivate_cs; | 438 | mpc83xx_spi->deactivate_cs = pdata->deactivate_cs; |
435 | mpc83xx_spi->qe_mode = pdata->qe_mode; | 439 | mpc83xx_spi->qe_mode = pdata->qe_mode; |
436 | mpc83xx_spi->get_rx = mpc83xx_spi_rx_buf_u8; | 440 | mpc83xx_spi->get_rx = mpc83xx_spi_rx_buf_u8; |
437 | mpc83xx_spi->get_tx = mpc83xx_spi_tx_buf_u8; | 441 | mpc83xx_spi->get_tx = mpc83xx_spi_tx_buf_u8; |
438 | 442 | ||
443 | if (mpc83xx_spi->qe_mode) | ||
444 | mpc83xx_spi->spibrg = pdata->sysclk / 2; | ||
445 | else | ||
446 | mpc83xx_spi->spibrg = pdata->sysclk; | ||
447 | |||
439 | mpc83xx_spi->rx_shift = 0; | 448 | mpc83xx_spi->rx_shift = 0; |
440 | mpc83xx_spi->tx_shift = 0; | 449 | mpc83xx_spi->tx_shift = 0; |
441 | if (mpc83xx_spi->qe_mode) { | 450 | if (mpc83xx_spi->qe_mode) { |
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index 630f781aeb19..c55459c592b8 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c | |||
@@ -183,7 +183,9 @@ static int spidev_message(struct spidev_data *spidev, | |||
183 | 183 | ||
184 | if (u_tmp->rx_buf) { | 184 | if (u_tmp->rx_buf) { |
185 | k_tmp->rx_buf = buf; | 185 | k_tmp->rx_buf = buf; |
186 | if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len)) | 186 | if (!access_ok(VERIFY_WRITE, (u8 __user *) |
187 | (ptrdiff_t) u_tmp->rx_buf, | ||
188 | u_tmp->len)) | ||
187 | goto done; | 189 | goto done; |
188 | } | 190 | } |
189 | if (u_tmp->tx_buf) { | 191 | if (u_tmp->tx_buf) { |
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index decfdc8eb9cc..e58c87b3e3a0 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c | |||
@@ -127,8 +127,20 @@ static int last_fb_vc = MAX_NR_CONSOLES - 1; | |||
127 | static int fbcon_is_default = 1; | 127 | static int fbcon_is_default = 1; |
128 | static int fbcon_has_exited; | 128 | static int fbcon_has_exited; |
129 | static int primary_device = -1; | 129 | static int primary_device = -1; |
130 | |||
131 | #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY | ||
130 | static int map_override; | 132 | static int map_override; |
131 | 133 | ||
134 | static inline void fbcon_map_override(void) | ||
135 | { | ||
136 | map_override = 1; | ||
137 | } | ||
138 | #else | ||
139 | static inline void fbcon_map_override(void) | ||
140 | { | ||
141 | } | ||
142 | #endif /* CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY */ | ||
143 | |||
132 | /* font data */ | 144 | /* font data */ |
133 | static char fontname[40]; | 145 | static char fontname[40]; |
134 | 146 | ||
@@ -506,7 +518,7 @@ static int __init fb_console_setup(char *this_opt) | |||
506 | (options[j++]-'0') % FB_MAX; | 518 | (options[j++]-'0') % FB_MAX; |
507 | } | 519 | } |
508 | 520 | ||
509 | map_override = 1; | 521 | fbcon_map_override(); |
510 | } | 522 | } |
511 | 523 | ||
512 | return 1; | 524 | return 1; |
diff --git a/drivers/video/matrox/g450_pll.c b/drivers/video/matrox/g450_pll.c index 7c76e079ca7d..d42346e7fdda 100644 --- a/drivers/video/matrox/g450_pll.c +++ b/drivers/video/matrox/g450_pll.c | |||
@@ -331,16 +331,19 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll, | |||
331 | tmp |= M1064_XPIXCLKCTRL_PLL_UP; | 331 | tmp |= M1064_XPIXCLKCTRL_PLL_UP; |
332 | } | 332 | } |
333 | matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp); | 333 | matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp); |
334 | #ifdef __powerpc__ | 334 | /* DVI PLL preferred for frequencies up to |
335 | /* This is necessary to avoid jitter on PowerPC | 335 | panel link max, standard PLL otherwise */ |
336 | * (OpenFirmware) systems, but apparently | 336 | if (fout >= MINFO->max_pixel_clock_panellink) |
337 | * introduces jitter, at least on a x86-64 | 337 | tmp = 0; |
338 | * using DVI. | 338 | else tmp = |
339 | * A simple workaround is disable for non-PPC. | 339 | M1064_XDVICLKCTRL_DVIDATAPATHSEL | |
340 | */ | 340 | M1064_XDVICLKCTRL_C1DVICLKSEL | |
341 | matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL, 0); | 341 | M1064_XDVICLKCTRL_C1DVICLKEN | |
342 | #endif /* __powerpc__ */ | 342 | M1064_XDVICLKCTRL_DVILOOPCTL | |
343 | matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl); | 343 | M1064_XDVICLKCTRL_P1LOOPBWDTCTL; |
344 | matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL,tmp); | ||
345 | matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, | ||
346 | xpwrctrl); | ||
344 | 347 | ||
345 | matroxfb_DAC_unlock_irqrestore(flags); | 348 | matroxfb_DAC_unlock_irqrestore(flags); |
346 | } | 349 | } |
diff --git a/drivers/video/matrox/matroxfb_DAC1064.h b/drivers/video/matrox/matroxfb_DAC1064.h index df39c3193735..7a98ce8043d7 100644 --- a/drivers/video/matrox/matroxfb_DAC1064.h +++ b/drivers/video/matrox/matroxfb_DAC1064.h | |||
@@ -33,6 +33,21 @@ void DAC1064_global_restore(WPMINFO2); | |||
33 | #define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */ | 33 | #define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */ |
34 | #define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */ | 34 | #define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */ |
35 | #define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */ | 35 | #define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */ |
36 | /* drive DVI by standard(0)/DVI(1) PLL */ | ||
37 | /* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */ | ||
38 | #define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01 | ||
39 | /* drive CRTC1 by standard(0)/DVI(1) PLL */ | ||
40 | #define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02 | ||
41 | /* drive CRTC2 by standard(0)/DVI(1) PLL */ | ||
42 | #define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04 | ||
43 | /* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */ | ||
44 | #define M1064_XDVICLKCTRL_C1DVICLKEN 0x08 | ||
45 | /* DVI PLL loop filter bandwidth selection bits */ | ||
46 | #define M1064_XDVICLKCTRL_DVILOOPCTL 0x30 | ||
47 | /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */ | ||
48 | #define M1064_XDVICLKCTRL_C2DVICLKEN 0x40 | ||
49 | /* P1PLL loop filter bandwith selection */ | ||
50 | #define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80 | ||
36 | #define M1064_XCURCOL0RED 0x08 | 51 | #define M1064_XCURCOL0RED 0x08 |
37 | #define M1064_XCURCOL0GREEN 0x09 | 52 | #define M1064_XCURCOL0GREEN 0x09 |
38 | #define M1064_XCURCOL0BLUE 0x0A | 53 | #define M1064_XCURCOL0BLUE 0x0A |
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h index d59577c8de86..f3107ad7e545 100644 --- a/drivers/video/matrox/matroxfb_base.h +++ b/drivers/video/matrox/matroxfb_base.h | |||
@@ -424,6 +424,7 @@ struct matrox_fb_info { | |||
424 | } mmio; | 424 | } mmio; |
425 | 425 | ||
426 | unsigned int max_pixel_clock; | 426 | unsigned int max_pixel_clock; |
427 | unsigned int max_pixel_clock_panellink; | ||
427 | 428 | ||
428 | struct matrox_switch* hw_switch; | 429 | struct matrox_switch* hw_switch; |
429 | 430 | ||
diff --git a/drivers/video/matrox/matroxfb_misc.c b/drivers/video/matrox/matroxfb_misc.c index 5948e54b9ef9..ab7fb50bc1de 100644 --- a/drivers/video/matrox/matroxfb_misc.c +++ b/drivers/video/matrox/matroxfb_misc.c | |||
@@ -658,6 +658,7 @@ static int parse_pins5(WPMINFO const struct matrox_bios* bd) { | |||
658 | MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) | | 658 | MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) | |
659 | wtst_xlat[MINFO->values.reg.mctlwtst & 7]; | 659 | wtst_xlat[MINFO->values.reg.mctlwtst & 7]; |
660 | } | 660 | } |
661 | MINFO->max_pixel_clock_panellink = bd->pins[47] * 4000; | ||
661 | return 0; | 662 | return 0; |
662 | } | 663 | } |
663 | 664 | ||
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c index f9300266044d..7d6c29800d14 100644 --- a/drivers/video/pvr2fb.c +++ b/drivers/video/pvr2fb.c | |||
@@ -94,6 +94,7 @@ | |||
94 | #define DISP_DIWCONF (DISP_BASE + 0xe8) | 94 | #define DISP_DIWCONF (DISP_BASE + 0xe8) |
95 | #define DISP_DIWHSTRT (DISP_BASE + 0xec) | 95 | #define DISP_DIWHSTRT (DISP_BASE + 0xec) |
96 | #define DISP_DIWVSTRT (DISP_BASE + 0xf0) | 96 | #define DISP_DIWVSTRT (DISP_BASE + 0xf0) |
97 | #define DISP_PIXDEPTH (DISP_BASE + 0x108) | ||
97 | 98 | ||
98 | /* Pixel clocks, one for TV output, doubled for VGA output */ | 99 | /* Pixel clocks, one for TV output, doubled for VGA output */ |
99 | #define TV_CLK 74239 | 100 | #define TV_CLK 74239 |
@@ -143,6 +144,7 @@ static struct pvr2fb_par { | |||
143 | unsigned char is_lowres; /* Is horizontal pixel-doubling enabled? */ | 144 | unsigned char is_lowres; /* Is horizontal pixel-doubling enabled? */ |
144 | 145 | ||
145 | unsigned long mmio_base; /* MMIO base */ | 146 | unsigned long mmio_base; /* MMIO base */ |
147 | u32 palette[16]; | ||
146 | } *currentpar; | 148 | } *currentpar; |
147 | 149 | ||
148 | static struct fb_info *fb_info; | 150 | static struct fb_info *fb_info; |
@@ -599,6 +601,7 @@ static void pvr2_init_display(struct fb_info *info) | |||
599 | 601 | ||
600 | /* bits per pixel */ | 602 | /* bits per pixel */ |
601 | fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE); | 603 | fb_writel(fb_readl(DISP_DIWMODE) | (--bytesperpixel << 2), DISP_DIWMODE); |
604 | fb_writel(bytesperpixel << 2, DISP_PIXDEPTH); | ||
602 | 605 | ||
603 | /* video enable, color sync, interlace, | 606 | /* video enable, color sync, interlace, |
604 | * hsync and vsync polarity (currently unused) */ | 607 | * hsync and vsync polarity (currently unused) */ |
@@ -790,7 +793,7 @@ static int __devinit pvr2fb_common_init(void) | |||
790 | fb_info->fbops = &pvr2fb_ops; | 793 | fb_info->fbops = &pvr2fb_ops; |
791 | fb_info->fix = pvr2_fix; | 794 | fb_info->fix = pvr2_fix; |
792 | fb_info->par = currentpar; | 795 | fb_info->par = currentpar; |
793 | fb_info->pseudo_palette = (void *)(fb_info->par + 1); | 796 | fb_info->pseudo_palette = currentpar->palette; |
794 | fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; | 797 | fb_info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN; |
795 | 798 | ||
796 | if (video_output == VO_VGA) | 799 | if (video_output == VO_VGA) |
@@ -807,6 +810,8 @@ static int __devinit pvr2fb_common_init(void) | |||
807 | 810 | ||
808 | if (register_framebuffer(fb_info) < 0) | 811 | if (register_framebuffer(fb_info) < 0) |
809 | goto out_err; | 812 | goto out_err; |
813 | /*Must write PIXDEPTH to register before anything is displayed - so force init */ | ||
814 | pvr2_init_display(fb_info); | ||
810 | 815 | ||
811 | modememused = get_line_length(fb_info->var.xres_virtual, | 816 | modememused = get_line_length(fb_info->var.xres_virtual, |
812 | fb_info->var.bits_per_pixel); | 817 | fb_info->var.bits_per_pixel); |
@@ -1082,14 +1087,15 @@ static int __init pvr2fb_init(void) | |||
1082 | #endif | 1087 | #endif |
1083 | size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32); | 1088 | size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32); |
1084 | 1089 | ||
1085 | fb_info = kzalloc(size, GFP_KERNEL); | 1090 | fb_info = framebuffer_alloc(sizeof(struct pvr2fb_par), NULL); |
1091 | |||
1086 | if (!fb_info) { | 1092 | if (!fb_info) { |
1087 | printk(KERN_ERR "Failed to allocate memory for fb_info\n"); | 1093 | printk(KERN_ERR "Failed to allocate memory for fb_info\n"); |
1088 | return -ENOMEM; | 1094 | return -ENOMEM; |
1089 | } | 1095 | } |
1090 | 1096 | ||
1091 | 1097 | ||
1092 | currentpar = (struct pvr2fb_par *)(fb_info + 1); | 1098 | currentpar = fb_info->par; |
1093 | 1099 | ||
1094 | for (i = 0; i < ARRAY_SIZE(board_driver); i++) { | 1100 | for (i = 0; i < ARRAY_SIZE(board_driver); i++) { |
1095 | struct pvr2_board *pvr_board = board_driver + i; | 1101 | struct pvr2_board *pvr_board = board_driver + i; |
@@ -1102,7 +1108,7 @@ static int __init pvr2fb_init(void) | |||
1102 | if (ret != 0) { | 1108 | if (ret != 0) { |
1103 | printk(KERN_ERR "pvr2fb: Failed init of %s device\n", | 1109 | printk(KERN_ERR "pvr2fb: Failed init of %s device\n", |
1104 | pvr_board->name); | 1110 | pvr_board->name); |
1105 | kfree(fb_info); | 1111 | framebuffer_release(fb_info); |
1106 | break; | 1112 | break; |
1107 | } | 1113 | } |
1108 | } | 1114 | } |
@@ -1126,7 +1132,7 @@ static void __exit pvr2fb_exit(void) | |||
1126 | #endif | 1132 | #endif |
1127 | 1133 | ||
1128 | unregister_framebuffer(fb_info); | 1134 | unregister_framebuffer(fb_info); |
1129 | kfree(fb_info); | 1135 | framebuffer_release(fb_info); |
1130 | } | 1136 | } |
1131 | 1137 | ||
1132 | module_init(pvr2fb_init); | 1138 | module_init(pvr2fb_init); |
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index c97709ecbad0..e7c8db2eb49b 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c | |||
@@ -1100,13 +1100,18 @@ stifb_init_fb(struct sti_struct *sti, int bpp_pref) | |||
1100 | /* only supported cards are allowed */ | 1100 | /* only supported cards are allowed */ |
1101 | switch (fb->id) { | 1101 | switch (fb->id) { |
1102 | case CRT_ID_VISUALIZE_EG: | 1102 | case CRT_ID_VISUALIZE_EG: |
1103 | /* look for a double buffering device like e.g. the | 1103 | /* Visualize cards can run either in "double buffer" or |
1104 | "INTERNAL_EG_DX1024" in the RDI precisionbook laptop | 1104 | "standard" mode. Depending on the mode, the card reports |
1105 | which won't work. The same device in non-double | 1105 | a different device name, e.g. "INTERNAL_EG_DX1024" in double |
1106 | buffering mode returns "INTERNAL_EG_X1024". */ | 1106 | buffer mode and "INTERNAL_EG_X1024" in standard mode. |
1107 | if (strstr(sti->outptr.dev_name, "EG_DX")) { | 1107 | Since this driver only supports standard mode, we check |
1108 | printk(KERN_WARNING | 1108 | if the device name contains the string "DX" and tell the |
1109 | "stifb: ignoring '%s'. Disable double buffering in IPL menu.\n", | 1109 | user how to reconfigure the card. */ |
1110 | if (strstr(sti->outptr.dev_name, "DX")) { | ||
1111 | printk(KERN_WARNING "WARNING: stifb framebuffer driver does not " | ||
1112 | "support '%s' in double-buffer mode.\n" | ||
1113 | KERN_WARNING "WARNING: Please disable the double-buffer mode " | ||
1114 | "in IPL menu (the PARISC-BIOS).\n", | ||
1110 | sti->outptr.dev_name); | 1115 | sti->outptr.dev_name); |
1111 | goto out_err0; | 1116 | goto out_err0; |
1112 | } | 1117 | } |