aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-10-22fbdev/m68k: Fix section mismatches in q40fb.cHenrik Kretzschmar1-2/+2
This patch moves the q40_fix and q40_var structures from .init.data to .devinit.data. This is where now the probe function resides, which only uses them. Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2010-10-21Merge branch 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tipLinus Torvalds1-6/+2
* 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits) x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S xen: Cope with unmapped pages when initializing kernel pagetable memblock, bootmem: Round pfn properly for memory and reserved regions memblock: Annotate memblock functions with __init_memblock memblock: Allow memblock_init to be called early memblock/arm: Fix memblock_region_is_memory() typo x86, memblock: Remove __memblock_x86_find_in_range_size() memblock: Fix wraparound in find_region() x86-32, memblock: Make add_highpages honor early reserved ranges x86, memblock: Fix crashkernel allocation arm, memblock: Fix the sparsemem build memblock: Fix section mismatch warnings powerpc, memblock: Fix memblock API change fallout memblock, microblaze: Fix memblock API change fallout x86: Remove old bootmem code x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve x86: Remove not used early_res code x86, memblock: Replace e820_/_early string with memblock_ x86: Use memblock to replace early_res x86, memblock: Use memblock_debug to control debug message print out ... Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile
2010-10-21[media] Add the via framebuffer camera controller driverJonathan Corbet2-3/+15
Add a driver for the video capture port on VIA integrated chipsets. This version has a remaining OLPCism or two and expects to be talking to an ov7670; those can be improved as the need arises. This work was supported by the One Laptop Per Child project. Thanks to Laurent Pinchart for a number of useful comments. Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-10-21fbdev/xilinxfb: Microblaze driver supportMichal Simek1-6/+18
DCR bus is natively used for PowerPC. Microblaze has no infrastructure for compile DCR that's why is necessary to exclude it. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Grant Likely <grant.likely@secretlab.ca> CC: Andrei Konovalov <akonovalov@ru.mvista.com> CC: "David S. Miller" <davem@davemloft.net> CC: linux-kernel@vger.kernel.org
2010-10-18xenbus: prevent warnings on unhandled enumeration valuesNoboru Iwamatsu1-0/+2
XenbusStateReconfiguring/XenbusStateReconfigured were introduced by c/s 437, but aren't handled in many switch statements. .. also pulled from the linux-2.6-sparse-tree tree. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
2010-10-18Update broken web addresses in the kernel.Justin P. Mattock5-9/+8
The patch below updates broken web addresses in the kernel Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Finn Thain <fthain@telegraphics.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Matt Turner <mattst88@gmail.com> Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Acked-by: Ben Pfaff <blp@cs.stanford.edu> Acked-by: Hans J. Koch <hjk@linutronix.de> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2010-10-15llseek: automatically add .llseek fopArnd Bergmann2-0/+7
All file_operations should get a .llseek operation so we can make nonseekable_open the default for future file operations without a .llseek pointer. The three cases that we can automatically detect are no_llseek, seq_lseek and default_llseek. For cases where we can we can automatically prove that the file offset is always ignored, we use noop_llseek, which maintains the current behavior of not returning an error from a seek. New drivers should normally not use noop_llseek but instead use no_llseek and call nonseekable_open at open time. Existing drivers can be converted to do the same when the maintainer knows for certain that no user code relies on calling seek on the device file. The generated code is often incorrectly indented and right now contains comments that clarify for each added line why a specific variant was chosen. In the version that gets submitted upstream, the comments will be gone and I will manually fix the indentation, because there does not seem to be a way to do that using coccinelle. Some amount of new code is currently sitting in linux-next that should get the same modifications, which I will do at the end of the merge window. Many thanks to Julia Lawall for helping me learn to write a semantic patch that does all this. ===== begin semantic patch ===== // This adds an llseek= method to all file operations, // as a preparation for making no_llseek the default. // // The rules are // - use no_llseek explicitly if we do nonseekable_open // - use seq_lseek for sequential files // - use default_llseek if we know we access f_pos // - use noop_llseek if we know we don't access f_pos, // but we still want to allow users to call lseek // @ open1 exists @ identifier nested_open; @@ nested_open(...) { <+... nonseekable_open(...) ...+> } @ open exists@ identifier open_f; identifier i, f; identifier open1.nested_open; @@ int open_f(struct inode *i, struct file *f) { <+... ( nonseekable_open(...) | nested_open(...) ) ...+> } @ read disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ read_no_fpos disable optional_qualifier exists @ identifier read_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off) { ... when != off } @ write @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; expression E; identifier func; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { <+... ( *off = E | *off += E | func(..., off, ...) | E = *off ) ...+> } @ write_no_fpos @ identifier write_f; identifier f, p, s, off; type ssize_t, size_t, loff_t; @@ ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off) { ... when != off } @ fops0 @ identifier fops; @@ struct file_operations fops = { ... }; @ has_llseek depends on fops0 @ identifier fops0.fops; identifier llseek_f; @@ struct file_operations fops = { ... .llseek = llseek_f, ... }; @ has_read depends on fops0 @ identifier fops0.fops; identifier read_f; @@ struct file_operations fops = { ... .read = read_f, ... }; @ has_write depends on fops0 @ identifier fops0.fops; identifier write_f; @@ struct file_operations fops = { ... .write = write_f, ... }; @ has_open depends on fops0 @ identifier fops0.fops; identifier open_f; @@ struct file_operations fops = { ... .open = open_f, ... }; // use no_llseek if we call nonseekable_open //////////////////////////////////////////// @ nonseekable1 depends on !has_llseek && has_open @ identifier fops0.fops; identifier nso ~= "nonseekable_open"; @@ struct file_operations fops = { ... .open = nso, ... +.llseek = no_llseek, /* nonseekable */ }; @ nonseekable2 depends on !has_llseek @ identifier fops0.fops; identifier open.open_f; @@ struct file_operations fops = { ... .open = open_f, ... +.llseek = no_llseek, /* open uses nonseekable */ }; // use seq_lseek for sequential files ///////////////////////////////////// @ seq depends on !has_llseek @ identifier fops0.fops; identifier sr ~= "seq_read"; @@ struct file_operations fops = { ... .read = sr, ... +.llseek = seq_lseek, /* we have seq_read */ }; // use default_llseek if there is a readdir /////////////////////////////////////////// @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier readdir_e; @@ // any other fop is used that changes pos struct file_operations fops = { ... .readdir = readdir_e, ... +.llseek = default_llseek, /* readdir is present */ }; // use default_llseek if at least one of read/write touches f_pos ///////////////////////////////////////////////////////////////// @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read.read_f; @@ // read fops use offset struct file_operations fops = { ... .read = read_f, ... +.llseek = default_llseek, /* read accesses f_pos */ }; @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, ... + .llseek = default_llseek, /* write accesses f_pos */ }; // Use noop_llseek if neither read nor write accesses f_pos /////////////////////////////////////////////////////////// @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; identifier write_no_fpos.write_f; @@ // write fops use offset struct file_operations fops = { ... .write = write_f, .read = read_f, ... +.llseek = noop_llseek, /* read and write both use no f_pos */ }; @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier write_no_fpos.write_f; @@ struct file_operations fops = { ... .write = write_f, ... +.llseek = noop_llseek, /* write uses no f_pos */ }; @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; identifier read_no_fpos.read_f; @@ struct file_operations fops = { ... .read = read_f, ... +.llseek = noop_llseek, /* read uses no f_pos */ }; @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @ identifier fops0.fops; @@ struct file_operations fops = { ... +.llseek = noop_llseek, /* no read or write fn */ }; ===== End semantic patch ===== Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Julia Lawall <julia@diku.dk> Cc: Christoph Hellwig <hch@infradead.org>
2010-10-15fbdev: sh_mobile_hdmi: fix compilation without SOUND enabledGuennadi Liakhovetski1-0/+2
At least two more Kconfig options have to be selected to be able to compile sh_mobile_hdmi. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-15fbdev: sh_mobile_hdmi: add support for the "video=" kernel command line optionGuennadi Liakhovetski1-50/+88
Add support for specifying video modes on the kernel command line. Mode selection priorities are also changed such, that only exact matches of specified modes with monitor modes from EDID are accepted, at least in width and height. If none found - fall back to framebuffer default setting, if available. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15fbdev: sh_mobile_lcdc: relax .check_var() HSYNC testGuennadi Liakhovetski1-1/+1
Some valid and supported video modes have .hsync_len > 120. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-15fbdev: sh_mobile_lcdc: make platform videomode table optionalGuennadi Liakhovetski2-25/+51
Add a default 720p mode to the sh_mobile_lcdc driver to be used, when no videomode is specified in the platform data. This can be used, e.g., with HDMI. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-13sh: free-without-alloc fix for sh_mobile_lcdcfbMagnus Damm1-2/+4
Without this fix the LCDC driver will try to free framebuffer memory even though the allocation failed. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2010-10-12drivers: msm: video: add dev_set_name callDaniel Walker1-0/+1
This is required before the driver can successfully be registered. Adapted from Arve Hjønnevåg <arve@android.com> changes in the Google tree. Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-12drivers: video: msm: fix hang on disable_irqDaniel Walker1-1/+1
There's a resource race around disable_irq. Using the nosync version allows the function to continue and prevents the hang. Adapted from Arve Hjønnevåg <arve@android.com> changes in the Google tree. Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
2010-10-09ARM: pxa168fb: add .remove functionHaojian Zhuang1-0/+47
The pxa168fb driver is missing .remove function so the framebuffer isn't correctly shut down when the module is removed. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-10-09of/sparc: convert various prom_* functions to use phandleAndres Salomon1-1/+2
Rather than passing around ints everywhere, use the phandle type where appropriate for the various functions that talk to the PROM. Signed-off-by: Andres Salomon <dilinger@queued.net> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2010-10-08Merge commit 'v2.6.36-rc7' into core/memblockIngo Molnar5-19/+104
Merge reason: Update from -rc3 to -rc7. Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-10-08memblock/arm: Fix memblock_region_is_memory() typoYinghai Lu1-1/+1
Fix typo in commit dbe3039 ("memblock/arm: Use memblock_region_is_memory() for omap fb") - it should be memblock_is_region_memory(). Reported-by: Tomi Valkeinen <tomi.valkeinen@nokia.com> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Felipe Balbi <balbi@ti.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: ext Grazvydas Ignotas <notasas@gmail.com> LKML-Reference: <4CABFADA.9020305@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2010-09-29OMAP: DSS2: make filter coefficient tables human readableGrazvydas Ignotas1-120/+94
Reorganize scaler FIR filter data as FIR value tables from raw register values. This makes them easier to understand and simplifies register programming code. No functional changes. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-09-29OMAP: DSS2: Add SPI dependency to Kconfig of ACX565AKM panelJarkko Nikula1-1/+1
This panel driver is using SPI for its communication so add CONFIG_SPI dependency. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Roger Quadros <roger.quadros@nokia.com> Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
2010-09-27Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-2/+2
* master.kernel.org:/home/rmk/linux-2.6-arm: (28 commits) ARM: 6411/1: vexpress: set RAM latencies to 1 cycle for PL310 on ct-ca9x4 tile ARM: 6409/1: davinci: map sram using MT_MEMORY_NONCACHED instead of MT_DEVICE ARM: 6408/1: omap: Map only available sram memory ARM: 6407/1: mmu: Setup MT_MEMORY and MT_MEMORY_NONCACHED L1 entries ARM: pxa: remove pr_<level> uses of KERN_<level> ARM: pxa168fb: clear enable bit when not active ARM: pxa: fix cpu_is_pxa*() not expanding to zero when not configured ARM: pxa168: fix corrected reset vector ARM: pxa: Use PIO for PI2C communication on Palm27x ARM: pxa: Fix Vpac270 gpio_power for MMC ARM: 6401/1: plug a race in the alignment trap handler ARM: 6406/1: at91sam9g45: fix i2c bus speed leds: leds-ns2: fix locking ARM: dove: fix __io() definition to use bus based offset dmaengine: fix interrupt clearing for mv_xor ARM: kirkwood: Unbreak PCIe I/O port ARM: Fix build error when using KCONFIG_CONFIG ARM: 6383/1: Implement phys_mem_access_prot() to avoid attributes aliasing ARM: 6400/1: at91: fix arch_gettimeoffset fallout ARM: 6398/1: add proc info for ARM11MPCore/Cortex-A9 from ARM ...
2010-09-25Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6Russell King1-2/+2
2010-09-25ARM: pxa168fb: clear enable bit when not activeHaojian Zhuang1-2/+2
While fb isn't active, we should clear CFG_GRA_ENA bit. The existing code can't clear this bit. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2010-09-24viafb: use proper register for colour when doing fill opsFlorian Tobias Schandinat1-3/+4
The colour was written to a wrong register for fillrect operations. This sometimes caused empty console space (for example after 'clear') to have a different colour than desired. Fix this by writing to the correct register. Many thanks to Daniel Drake and Jon Nettleton for pointing out this issue and pointing me in the right direction for the fix. Fixes http://dev.laptop.org/ticket/9323 Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Daniel Drake <dsd@laptop.org> Cc: Jon Nettleton <jon.nettleton@gmail.com> Cc: stable@kernel.org
2010-09-24viafb: rename output devicesFlorian Tobias Schandinat3-30/+30
Now it looks like we finally know enough about the output devices to give them proper names. As VIA_96 is often referred to as DVP0 rename it to VIA_DVP0. As VIA_6C and VIA_93 seem to exist only on CLE266 and "replace" DVP0 and DVP1 there rename them to VIA_LDVP0 and VIA_LDVP1 (L as legacy). The proc names were changed accordingly which should be harmless as they were just introduced and not beyond RFC state. This patch should make things a bit more comfortable and less scary. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Andrew Morton <akpm@linux-foundation.org>
2010-09-24viafb: add a mapping of supported output devicesFlorian Tobias Schandinat1-0/+48
This patch maps supported output devices to IGP versions. This list may contain errors as most of it is derived of the driver source but it should be correct enough to provide a good help. The devices are exported via a proc entry in the same format as those showing the output devices per IGA. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Andrew Morton <akpm@linux-foundation.org>
2010-09-24viafb: set sync polarity for all output devicesFlorian Tobias Schandinat1-9/+25
This patch sets the sync polarity for all output devices, not only CRT. This may give some people a working screen but only if lcd scaling and centering are not used as it is currently too dificult to propagate a different resolution (from what the application thinks) to the correct output device. Hopefully this does not introduce regressions as the polarity of non-CRT devices was completly ignored before. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: add function to change sync polarity per deviceFlorian Tobias Schandinat2-3/+26
At the moment only the sync polarity for CRT is handled but there are also bits for controlling the sync polarity for other output devices. Add a function to change those similar to the other output device functions. There is no runtime change yet as the code still handles only CRT. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: reduce I2C timeout and delayFlorian Tobias Schandinat1-2/+2
This patch reduces the value for I2C timeout and udelay. The udelay was reduced to 10 (old: 40) which is still very high as for standard-mode I2C even 5 should work. This gives a speedup of factor 4 when talking to I2C devices. The timeout was reduced to 2 (old: 20) which is taken from the radeon driver so it should work as well. This gives a speedup of factor 10 when detecting that there is no I2C device we want to talk to. This causes a huge improvement of device initialization time. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: enable I2C for CRTFlorian Tobias Schandinat1-1/+1
This patch enables the I2C port to talk with the CRT. This allows adding EDID reading and parsing capability for CRTs. Just a small preparation, no notable changes in user experience yet. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: fix i2c_transfer error handlingFlorian Tobias Schandinat1-3/+24
i2c_transfer returns negative errno on error and number of messages processed on success. Just returning this value would give a poor interface as it is not obvious that you must compare with 2 after reading 1 or n bytes and with 1 after writing 1 byte to determine if it was successful. To avoid this error prone interface convert the error code of a successful read/write to zero and all other non-negative values to an negative error code. This fixes a regression introduced by via: Rationalize vt1636 detection which resulted in no longer detecting a VT1636 chip and therefore has broken the output in configurations which contain this chip. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: stable@kernel.org
2010-09-24viafb: vt1636 cleanupFlorian Tobias Schandinat5-131/+42
This patch merges tbl1636 into vt1636 and cleans it up as the data was only used there anyway. No runtime changes are expected. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: introduce per output device power managementFlorian Tobias Schandinat6-111/+137
This patch moves common parts of dvi.c, lcd.c and vt1636.c to hw.c to start a per output device power management. There should be no runtime changes aside that this patch enables the proc interface to enable/disable devices when needed which greatly increases the chances that changes to the output device configuration will work. However the power management is not yet complete so it might fail on some configurations. As this area is quite complex and touches undocumented things there is a slight chance of regressions. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: limit LCD code impactFlorian Tobias Schandinat1-31/+0
This patch cleans the LCD code up. It forbids overwritting global decissions like what IGA should be used as the source and whether to enable the second display channel. Additionally it removes a bit code duplication. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: add interface for output device configurationFlorian Tobias Schandinat4-24/+216
This patch extends the proc entry to contain a possibility to view and change the output devices for each IGA. This is useful for debugging output problems as it provides a reliable way to query which low level devices are active after VIAs output device configuration nightmare happended. It's as well suitable for daily use as one can change the output configuration on the fly for example to connect a projector. At the moment it's still unstable. The reason is that we have to handle a bunch of undocumented output devices (those without a proper name) and that this patch is the first step to collect and verify the needed information. Basically the only configuration change that is expected to work at the moment is switching output devices between IGA1 and IGA2. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Acked-by: Jonathan Corbet <corbet@lwn.net> Cc: Joseph Chan <JosephChan@via.com.tw> Cc: Andrew Morton <akpm@linux-foundation.org>
2010-09-24viafb: merge the remaining output path with enable functionsFlorian Tobias Schandinat4-205/+136
This patch merges the remaining functionality of the output path function in the associated enabling functions. This is very natural as most of the remaining code does actually enable the device. Just some more or less intelligent code merge. If no stupid mistakes occured there should be no regressions. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: use new device routingFlorian Tobias Schandinat1-63/+38
This patch uses the iga{1,2}_devices variables to select which IGA should be the source. Doing this is convinient, more powerfull than the older scheme and easy extendable to support further output devices. It is not yet completed as the device on/off selection needs to be converted to the same scheme to take full advantage. No visible changes yet as we want to complete the transition before anouncing any unstabke interface. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: add new output device managementFlorian Tobias Schandinat3-0/+114
This patch adds a new output device management that stores for each IGA which output devices are routed to it and a compatiblity layer that converts the old per-output device values in the new format. Bounding the output devices to each IGA is a central idea of the cleanup. Doing it this way should be easier and make much more sense than the old format which happily mixed different output devices together and did not even take into account that some devices are no longer available on newer chipsets. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: reduce viafb_set_iga_path usageFlorian Tobias Schandinat2-1/+2
The result of viafb_set_iga_path can change after init only in the hotplug ioctl. So we can move it there rather than doing it always when a new mode is set. The setup during init is done via a call from the init chip funtion. This change enables a stable mapping between the old device scheme and a new more powerfull one. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: propagate __init and __devinitFlorian Tobias Schandinat7-34/+38
There are a lot of init functions which are not marked as such. Fix this. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: rework output device routingFlorian Tobias Schandinat1-89/+94
This patch rips the device routing out of the 3 main functions to separate functions to make them available for transition to a better controlling scheme. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: enable second display channel at central placeFlorian Tobias Schandinat1-30/+5
Move the enabling of the second display channel to the generic output routing function and do it exactly if something is using it. This unifies a zoo of variants how to do it and does no longer disable it if LCD is not on the second display which is much saner as there can be other users who need it. Probably this did not cause any problems so far as we only recently started dual fb support and otherwise there won't be other users and LCD is preferred assigned to second display channel. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: unify output path configurationFlorian Tobias Schandinat3-7/+17
Move all output path routing directly in the viafb_setmode. This gives a better overview and allows to factor similar parts out. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: remove stubFlorian Tobias Schandinat1-17/+0
This is a nop so removing it is safe. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: remove lcdtbl.hFlorian Tobias Schandinat2-592/+7
This patch moves the power on/off sequences to lcd.c as they are only used there. This allows removing lcdtbl.h as the other stuff is not used. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-24viafb: reset correct PLLFlorian Tobias Schandinat1-2/+2
Looks like we did reset the PLL of the (whatever) engine instead of the PLL of the secondary display (IGA2, LCDCK). This patch fixes it. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
2010-09-22drivers/video/sis/sis_main.c: prevent reading uninitialized stack memoryDan Rosenberg1-0/+3
The FBIOGET_VBLANK device ioctl allows unprivileged users to read 16 bytes of uninitialized stack memory, because the "reserved" member of the fb_vblank 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> Cc: Thomas Winischhofer <thomas@winischhofer.net> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-22fbcon: fix lockdep warning from fbcon_deinit()Jarek Poplawski1-2/+3
Fix the lockdep warning: [ 13.657164] INFO: trying to register non-static key. [ 13.657169] the code is fine but needs lockdep annotation. [ 13.657171] turning off the locking correctness validator. [ 13.657177] Pid: 622, comm: modprobe Not tainted 2.6.36-rc3c #8 [ 13.657180] Call Trace: [ 13.657194] [<c13002c8>] ? printk+0x18/0x20 [ 13.657202] [<c1056cf6>] register_lock_class+0x336/0x350 [ 13.657208] [<c1058bf9>] __lock_acquire+0x449/0x1180 [ 13.657215] [<c1059997>] lock_acquire+0x67/0x80 [ 13.657222] [<c1042bf1>] ? __cancel_work_timer+0x51/0x230 [ 13.657227] [<c1042c23>] __cancel_work_timer+0x83/0x230 [ 13.657231] [<c1042bf1>] ? __cancel_work_timer+0x51/0x230 [ 13.657236] [<c10582b2>] ? mark_held_locks+0x62/0x80 [ 13.657243] [<c10b3a2f>] ? kfree+0x7f/0xe0 [ 13.657248] [<c105853c>] ? trace_hardirqs_on_caller+0x11c/0x160 [ 13.657253] [<c105858b>] ? trace_hardirqs_on+0xb/0x10 [ 13.657259] [<c117f4cd>] ? fbcon_deinit+0x16d/0x1e0 [ 13.657263] [<c117f4cd>] ? fbcon_deinit+0x16d/0x1e0 [ 13.657268] [<c1042dea>] cancel_work_sync+0xa/0x10 [ 13.657272] [<c117f444>] fbcon_deinit+0xe4/0x1e0 ... The warning is caused by trying to cancel an uninitialized work from fbcon_exit(). Fix it by adding a check for queue.func, similarly to other places in this code. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-22efifb: support the EFI framebuffer on more Apple hardwareLuke Macken1-0/+42
Enable the EFI framebuffer on 14 more Macs, including the iMac11,1 iMac10,1 iMac8,1 Macmini3,1 Macmini4,1 MacBook5,1 MacBook6,1 MacBook7,1 MacBookPro2,2 MacBookPro5,2 MacBookPro5,3 MacBookPro6,1 MacBookPro6,2 and MacBookPro7,1 Information gathered from various user submissions. https://bugzilla.redhat.com/show_bug.cgi?id=528232 http://ubuntuforums.org/showthread.php?t=1557326 [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Luke Macken <lmacken@redhat.com> Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-09-22efifb: check that the base address is plausible on pci systemsPeter Jones1-12/+49
Some Apple machines have identical DMI data but different memory configurations for the video. Given that, check that the address in our table is actually within the range of a PCI BAR on a VGA device in the machine. This also fixes up the return value from set_system(), which has always been wrong, but never resulted in bad behavior since there's only ever been one matching entry in the dmi table. The patch 1) stops people's machines from crashing when we get their display wrong, which seems to be unfortunately inevitable, 2) allows us to support identical dmi data with differing video memory configurations This also adds me as the efifb maintainer, since I've effectively been acting as such for quite some time. Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>