summaryrefslogtreecommitdiffstats
path: root/drivers/video/via
Commit message (Collapse)AuthorAgeFilesLines
* drivers/video/via/ioctl.c: prevent reading uninitialized stack memoryDan Rosenberg2010-09-151-0/+2
| | | | | | | | | | | The VIAFB_GET_INFO device ioctl allows unprivileged users to read 246 bytes of uninitialized stack memory, because the "reserved" member of the viafb_ioctl_info struct declared on the stack is not altered or zeroed before being copied back to the user. This patch takes care of it. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* drivers/video/via/via-gpio.c: fix warningAndrew Morton2010-08-051-1/+1
| | | | | | | | | | | drivers/video/via/via-gpio.c: In function 'viafb_gpio_probe': drivers/video/via/via-gpio.c:216: warning: assignment from incompatible pointer type Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* fbdev: section cleanup in viafb driverHenrik Kretzschmar2010-08-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves two functions from .devexit to .text, which are called on the probe error path. Also a function which is called by probe is moved from .text to .devinit. WARNING: vmlinux.o(.devinit.text+0x2ca5): Section mismatch in reference from the function via_pci_probe() to the function devexit.text:via_teardown_subdevs() The function __devinit via_pci_probe() references a function __devexit via_teardown_subdevs(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of via_teardown_subdevs() so it may be used outside an exit section. WARNING: vmlinux.o(.devinit.text+0x2cb1): Section mismatch in reference from the function via_pci_probe() to the function devexit.text:via_pci_teardown_mmio() The function __devinit via_pci_probe() references a function __devexit via_pci_teardown_mmio(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __devexit annotation of via_pci_teardown_mmio() so it may be used outside an exit section. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
* viafb: fix accel_flags check_var bugFlorian Tobias Schandinat2010-07-231-2/+2
| | | | | | | | | | | | | viafb: fix accel_flags check_var bug In check_var we should check and modify the var given and not the one which is currently active. So this code was obviously wrong. Probably this was doing no harm because all acceleration functions also check whether acceleration is possible. (otherwise I would expect this to lead to a null pointer dereference) Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: probe cleanupsFlorian Tobias Schandinat2010-07-231-24/+3
| | | | | | | | | | viafb: probe cleanups Removal of strange special cases that must not exist as well as a useless check. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: remove ioctls which break the framebuffer interfaceFlorian Tobias Schandinat2010-07-232-254/+0
| | | | | | | | | | | | | | | viafb: remove ioctls which break the framebuffer interface The ioctls VIAFB_SET_DEVICE, VIAFB_SET_DEVICE_INFO and VIAFB_SET_SECOND_MODE are removed because they prevent a clean framebuffer driver because they modify the hardware and/or the internal structures. There are no known applications using these ioctls so no breakage is expected. Additionaly the main functionality was duplicating the framebuffer interface so there really should not exist any user. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: update fix before calculating depthFlorian Tobias Schandinat2010-07-231-1/+1
| | | | | | | | | | | | viafb: update fix before calculating depth As the depth calculation depends on information in fix it is saner to do the update first. No runtime change expected as the value visual in fix used never changes to MONO. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: PLL value cleanupFlorian Tobias Schandinat2010-07-233-489/+412
| | | | | | | | | | | | | | | | | | | | | | | | | viafb: PLL value cleanup This is a big change of how PLL values are handled on the road to dynamic PLL value generation. The table was converted automatically in the relevant parameters for frequency generation. Sadly there were some bits set whose meaning is unknown. Those differences are documented but ignored as the unichrome code implies that they are not important (a big thanks to Luc for his amazing work). The PLL values for 31490000 and 133308000 are deleted as they were more than 5% off and not used anyway. The values for CX700@60466000 and VX855@153920000 are corrected as they were wrong and easily correctable as enough correct values was available because CX700 and VX855 support the same values only with a little difference in hardware format. All remaining values are not more than 2% off. Additionally the surrounding code is changed as needed especially the byte order of the values written to hardware to allow nicer conversion functions. This is mostly a change preparing for dynamic PLL generation and the two corrected values aside no runtime change is expected. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: simplify lcd size "detection"Florian Tobias Schandinat2010-07-234-41/+1
| | | | | | | | | | | | | viafb: simplify lcd size "detection" Remove all occurences of get_lcd_size_method as only the values GET_LCD_SIZE_BY_VGA_BIOS and GET_LCD_SIZE_BY_USER_SETTING were used which had the identical code so there is no need to make things look more complicated than they actually are. Just a bit of of cleanup, really no regressions expected. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: fix PCI tableFlorian Tobias Schandinat2010-07-231-7/+9
| | | | | | | | | | | | | | | | | viafb: fix PCI table This patch fixes an oddity in the device table where the P4M890 ID was assigned with the enumeration value of CN700 which itself was missing. This is a regression introduced by "viafb: make viafb a first-class citizen using pci_driver" While at it reorder the table to reflect the order of the enumeration values. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Harald Welte <laforge@gnumonks.org>
* viafb: add lcd scaling support for some IGPsFlorian Tobias Schandinat2010-07-231-0/+6
| | | | | | | | | | | | viafb: add lcd scaling support for some IGPs These IGPs should also support lcd scaling but likely this switch was missed when adding support for them. Fix it, allowing lcd scaling on CN750, VX800 and VX855. At least this improves the situation for VX855. (there seems to be another scaling unrelated bug somewhere) Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: improve lcd code readabilityFlorian Tobias Schandinat2010-07-231-5/+4
| | | | | | | | | | viafb: improve lcd code readability This changes the code to better reflect that we can (currently) only perform upscaling. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* viafb: remove duplicated scaling codeFlorian Tobias Schandinat2010-07-231-73/+2
| | | | | | | | | | viafb: remove duplicated scaling code The code for P4M900 does the same as for all newer IGPs so there is no reason to duplicate it. Just reducing the code to maintain. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
* drivers/video/via: use memdup_userJulia Lawall2010-05-271-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Scott Fang <ScottFang@viatech.com.cn> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'viafb-next' of git://git.lwn.net/linux-2.6Linus Torvalds2010-05-2023-584/+1625
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'viafb-next' of git://git.lwn.net/linux-2.6: (35 commits) viafb: move some include files to include/linux viafb: Eliminate some global.h references viafb: get rid of i2c debug cruft viafb: fold via_io.h into via-core.h viafb: Fix initialization error paths viafb: Do not remove gpiochip under spinlock viafb: make procfs entries optional viafb: fix proc entry removal viafb: improve misc register handling viafb: replace inb/outb viafb: move some modesetting functions to a seperate file viafb: unify modesetting functions viafb: Reserve framebuffer memory for the upcoming camera driver viafb: Add a simple VX855 DMA engine driver viafb: Add a simple interrupt management infrastructure via: Rationalize vt1636 detection viafb: Introduce viafb_find_i2c_adapter() via: Do not attempt I/O on inactive I2C adapters viafb: Turn GPIO and i2c into proper platform devices viafb: Convert GPIO and i2c to the new indexed port ops ...
| * viafb: move some include files to include/linuxJonathan Corbet2010-05-1115-295/+21
| | | | | | | | | | | | | | | | | | | | | | These are the files which should be available to subdevices compiled outside of drivers/video/via. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Eliminate some global.h referencesJonathan Corbet2010-05-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | The various subdev drivers (other than the framebuffer itself) no longer need this file. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: get rid of i2c debug cruftJonathan Corbet2010-05-111-4/+2
| | | | | | | | | | | | | | | | | | | | It's ugly and adds a global.h dependency. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: fold via_io.h into via-core.hJonathan Corbet2010-05-117-78/+53
| | | | | | | | | | | | | | | | | | | | | | Preparatory move toward the ultimate goal of moving pan-subdevice stuff into include/linux. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Fix initialization error pathsJonathan Corbet2010-05-071-11/+24
| | | | | | | | | | | | | | | | Properly localize error cleanup, and make sure that the iomem regions are unmapped if framebuffer initialization fails. Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Do not remove gpiochip under spinlockJonathan Corbet2010-05-071-3/+2
| | | | | | | | | | | | | | | | gpiochip_remove() is not meant to be called with interrupts disabled, and there is no need for the lock here in any case. Reported-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: make procfs entries optionalFlorian Tobias Schandinat2010-05-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | viafb: make procfs entries optional This patch adds a config option to enable procfs entries for direct hardware access. This was the old behaviour but the option defaults to no as this is really ugly and should not be needed if the driver works correct (and if it doesn't, it needs to be fixed). That stuff is really something that should - not be needed at all (the driver should be capable of doing it) - not be there (debugfs would be better for such things) So add this option just for backwards compatiblity. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: fix proc entry removalFlorian Tobias Schandinat2010-05-071-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | viafb: fix proc entry removal Trying to remove unregistered proc entries became painful and is useless anyway. So remove the removal of an entry that was never registered and duplicate the logic for one which is added conditionally. Additionally move the removal above releasing fb_info as we still need the information. This prevents tainting the kernel by the procfs warn on and avoiding access to already freed memory is probably also a good idea. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: improve misc register handlingFlorian Tobias Schandinat2010-05-073-21/+17
| | | | | | | | | | | | | | | | | | | | | | viafb: improve misc register handling This patch improves the misc register handling by adding a modify function for this to via_io.h and moving expanded definitions of the relevant ports there. The code was changed to use those to improve readability. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: replace inb/outbFlorian Tobias Schandinat2010-05-071-15/+7
| | | | | | | | | | | | | | | | | | | | viafb: replace inb/outb This patch replaces occurences of inb/outb with via_write_reg and via_write_reg_mask where this is possible to improve code readability. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: move some modesetting functions to a seperate fileFlorian Tobias Schandinat2010-05-075-102/+166
| | | | | | | | | | | | | | | | | | | | viafb: move some modesetting functions to a seperate file This patch moves the modesetting functions which are already cleaned up to a seperate file. Just the beginning to bring some structure in this mess. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: unify modesetting functionsFlorian Tobias Schandinat2010-05-073-45/+46
| | | | | | | | | | | | | | | | | | | | | | viafb: unify modesetting functions This patch unifies some cleaned up modesetting functions to prepare for moving them to an extra file. This includes make them use via_io and changing there names to reflect that they do not depend on anything framebuffer specific. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: Reserve framebuffer memory for the upcoming camera driverJonathan Corbet2010-05-072-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The camera engine captures to framebuffer memory, so we need to set some aside for that purpose. There is no proper memory allocator for fbmem; instead, accel.c just trims some space off the top. Alas, without creating that proper memory allocator, the only way to make this work is to hack it into the same bit of code in accel.c. The allocation must happen *after* the others (some code, including user-space XV stuff, makes assumptions on where the cursor space is), and before the rest of the framebuffer is set up. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Add a simple VX855 DMA engine driverJonathan Corbet2010-05-072-0/+261
| | | | | | | | | | | | | | | | | | | | | | | | This code provides a minimal amount of access to the DMA engine as needed by the camera driver. VX855 only; it's guaranteed not to work on other chipsets, so it won't try. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Add a simple interrupt management infrastructureJonathan Corbet2010-05-072-1/+107
| | | | | | | | | | | | | | | | | | | | | | | | The viafb device shares a single interrupt control register among several distinct subunits. This adds a simple layer for management of that register. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * via: Rationalize vt1636 detectionJonathan Corbet2010-05-071-13/+7
| | | | | | | | | | | | | | | | | | | | | | The code was ugly and didn't check whether i2c operations were succeeding; make it a little better. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Introduce viafb_find_i2c_adapter()Jonathan Corbet2010-05-072-0/+14
| | | | | | | | | | | | | | | | | | | | The camera driver will need this to look up a specific adapter. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * via: Do not attempt I/O on inactive I2C adaptersJonathan Corbet2010-05-072-4/+11
| | | | | | | | | | | | | | | | | | | | | | If an adapter has been configured for GPIO (or off), we should not try to use it as an I2C port. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Turn GPIO and i2c into proper platform devicesJonathan Corbet2010-05-076-41/+140
| | | | | | | | | | | | | | | | | | | | Another step toward making this thing a real multifunction device driver. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Convert GPIO and i2c to the new indexed port opsJonathan Corbet2010-05-074-26/+38
| | | | | | | | | | | | Also add low-level locking to the i2c driver. Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: package often used basic io functionsFlorian Tobias Schandinat2010-05-073-25/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch puts redesigned versions of the basic io functions that are used overall the driver in an extra header. It is prefixed with via_ as no framebuffer dependend stuff is in there. They were inlined as they are really simple which reduced the module size about 2.5%. The parameter order of read and write was fixed as it really doesn't make sense to change the order as they are parts of the same address and not source and destination. Wrapper which use the new functions were added to hw.h to replicate the old interface and avoid changing all old code. [jc: added one comment] Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
| * viafb: add a driver for GPIO linesJonathan Corbet2010-05-074-1/+294
| | | | | | | | | | | | | | | | | | | | | | | | This is a simple gpiolib driver giving access to the GPIO lines in the VIA framebuffer system. A simple mechanism exists for switching lines between GPIO and I2C, but it's only compile-time for now. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Separate global and fb-specific dataJonathan Corbet2010-05-0712-185/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves data of interest into a new viafb_dev structure which describes the device as a whole; the idea here is to create a separation between what all devices may need and what the framebuffer device in particular needs. I've also made some small steps toward thinning out the global.h mess. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Move core stuff into via-core.cJonathan Corbet2010-05-0710-132/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | The first step toward turning viafb into a multifunction driver. This patch creates a new via-core.c file which serves as the main PCI driver; everything else comes below that. Some work has been done to rationalize the i2c drivers in this new scheme. Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Cc: Harald Welte <laforge@gnumonks.org> Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Only establish i2c busses on ports that always had themJonathan Corbet2010-04-272-6/+14
| | | | | | | | | | | | | | | | | | ...otherwise it seems we run into conflicts with shadowy other users which don't expect to see i2c taking control of ports it never used to do anything with. Reported-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * suppress verbose debug messages: change printk() to DEBUG_MSG()Paul Fox2010-04-271-2/+2
| | | | | | | | | | | | | | | | [jc: no signoff, added my own] Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: rework the I2C support in the VIA framebuffer driverHarald Welte2010-04-278-134/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the way how the various I2C busses are used internally inside the viafb driver: Previosuly, only a single i2c_adapter was created, even though two different hardware I2C busses are accessed: A structure member in a global variable was modified to indicate the bus to be used. Now, all existing hardware busses are registered with the i2c core, and the viafb_i2c_{read,write}byte[s]() function take the adapter number as function call parameter, rather than referring to the global structure member. [jc: even more painful merge with mainline changes ->2.6.34] [jc: painful merge with OLPC changes] Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Add 1200x900 DCON/LCD panel modes for OLPC XO-1.5Chris Ball2010-04-206-1/+34
| | | | | | | | | | | | | | | | [jc: extensive merge conflict fixes] Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Chris Ball <cjb@laptop.org>
| * viafb: complete support for VX800/VX855 accelerated framebufferJonathan Corbet2010-04-202-9/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a painful merge of change a90bab567ece3e915d0ccd55ab00c9bb333fa8c0 (viafb: Add support for 2D accelerated framebuffer on VX800/VX855) in the OLPC tree, originally by Harald Welte. Harald's changelog read: The VX800/VX820 and the VX855/VX875 chipsets have a different 2D acceleration engine called "M1". The M1 engine has some subtle (and some not-so-subtle) differences to the previous engines, so support for accelerated framebuffer on those chipsets was disabled so far. This merge tries to preserve Harald's changes in the framework of the much-changed 2.6.34 viafb code. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Determine type of 2D engine and store it in chip_infoHarald Welte2010-04-202-0/+23
| | | | | | | | | | | | | | | | This will help us for the upcoming support for 2D acceleration using the M1 engine. [jc: fixed merge conflicts] Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
| * viafb: Unify duplicated set_bpp() codeJonathan Corbet2010-04-201-45/+33
| | | | | | | | | | | | | | | | | | As suggested by Florian: make both mode-setting paths use the same code. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Retain GEMODE reserved bitsJonathan Corbet2010-04-201-16/+33
| | | | | | | | | | | | | | | | | | | | | | | | Commit c3e25673843153ea75fda79a47cf12f10a25ca37 (viafb: 2D engine rewrite) changed the setting of the GEMODE register so that the reserved bits are no longer preserved. Fix that; at the same time, move this code to its own function and restore the use of symbolic constants. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: Unmap the frame buffer on initialization errorJonathan Corbet2010-04-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | This was part of Harald's "make viafb a first-class citizen using pci_driver" patch, but somehow got dropped when that patch went into mainline. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Jonathan Corbet <corbet@lwn.net>
| * viafb: use proper pci config APIHarald Welte2010-04-203-26/+44
| | | | | | | | | | | | | | | | | | | | This patch alters viafb to use the proper Linux in-kernel API to access PCI configuration space, rather than poking at I/O ports by itself. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
| * viafb: Fix various resource leaks during module_init()Harald Welte2010-04-201-13/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code executed from module_init() in viafb does not have proper error checking and [partial] resoure release paths in case an error happens half way through driver initialization. This patch adresses the most obvious of those issues, such as a leftover i2c bus if module_init (and thus module load) fails. [jc: fixed merge conflicts] [jc: also restored -ENOMEM return on ioremap() fail] Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
OpenPOWER on IntegriCloud