aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2011-03-22video: s3c-fb: return proper error if clk_get failsaxel lin1-0/+1
Return PTR_ERR(sfb->bus_clk) instead of 0 if clk_get fails. Signed-off-by: Axel Lin <[email protected]> Acked-by: Kyungmin Park <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22uvesafb,vesafb: create WC or WB PAT-entriesThomas Schlichter2-29/+64
with an PAT-enabled kernel, when using uvesafb or vesafb, these drivers will create uncached-minus PAT entries for the framebuffer memory because they use ioremap() (not the *_cache or *_wc variants). When the framebuffer memory intersects with the video RAM used by Xorg, the complete video RAM will be mapped uncached-minus what results in a serve performance penalty. Here are the correct MTRR entries created by uvesafb: schlicht@netbook:~$ cat /proc/mtrr reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back reg01: base=0x06ff00000 ( 1791MB), size= 1MB, count=1: uncachable reg02: base=0x070000000 ( 1792MB), size= 256MB, count=1: uncachable reg03: base=0x0d0000000 ( 3328MB), size= 16MB, count=1: write-combining And here are the problematic PAT entries: schlicht@netbook:~$ sudo cat /sys/kernel/debug/x86/pat_memtype_list PAT memtype list: write-back @ 0x0-0x1000 uncached-minus @ 0x6fedd000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee3000-0x6fee4000 uncached-minus @ 0x6fee3000-0x6fee4000 uncached-minus @ 0x6fee3000-0x6fee4000 uncached-minus @ 0xd0000000-0xe0000000 <-- created by xserver-xorg uncached-minus @ 0xd0000000-0xd1194000 <-- created by uvesafb uncached-minus @ 0xf4000000-0xf4009000 uncached-minus @ 0xf4200000-0xf4400000 uncached-minus @ 0xf5000000-0xf5010000 uncached-minus @ 0xf5100000-0xf5104000 uncached-minus @ 0xf5400000-0xf5404000 uncached-minus @ 0xf5404000-0xf5405000 uncached-minus @ 0xf5404000-0xf5405000 uncached-minus @ 0xfed00000-0xfed01000 Therefore I created the attached patch for uvesafb which uses ioremap_wc() to create the correct PAT entries, as shown below: schlicht@netbook:~$ sudo cat /sys/kernel/debug/x86/pat_memtype_list PAT memtype list: write-back @ 0x0-0x1000 uncached-minus @ 0x6fedd000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee2000-0x6fee3000 uncached-minus @ 0x6fee3000-0x6fee4000 uncached-minus @ 0x6fee3000-0x6fee4000 uncached-minus @ 0x6fee3000-0x6fee4000 write-combining @ 0xd0000000-0xe0000000 write-combining @ 0xd0000000-0xd1194000 uncached-minus @ 0xf4000000-0xf4009000 uncached-minus @ 0xf4200000-0xf4400000 uncached-minus @ 0xf5000000-0xf5010000 uncached-minus @ 0xf5100000-0xf5104000 uncached-minus @ 0xf5400000-0xf5404000 uncached-minus @ 0xf5404000-0xf5405000 uncached-minus @ 0xf5404000-0xf5405000 uncached-minus @ 0xfed00000-0xfed01000 This results in a performance gain, objectively measurable with e.g. x11perf -comppixwin10 -comppixwin100 -comppixwin500: 1: x11perf_xaa.log 2: x11perf_xaa_patched.log 1 2 Operation -------- ---------------- ----------------- 124000.0 202000.0 ( 1.63) Composite 10x10 from pixmap to window 3340.0 24400.0 ( 7.31) Composite 100x100 from pixmap to window 131.0 1150.0 ( 8.78) Composite 500x500 from pixmap to window You can see the serve performance gain when composing larger pixmaps to window. The patches replace the ioremap() function with the variant matching the mtrr- parameter. To create "write-back" PAT entries, the ioremap_cache() function must be called after creating the MTRR entries, and the ioremap_cache() region must completely fit into the MTRR region, this is why the MTRR region size is now rounded up to the next power-of-two. Signed-off-by: Thomas Schlichter <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22video: ffb: fix ffb_probe error pathaxel lin1-1/+1
Current implementation calls of_iounmap for par->fbc twice in error path. In the case of goto out_unmap_dac, we should call of_iounmap for par->dac. Signed-off-by: Axel Lin <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22radeonfb: Let hwmon driver probe the "monid" I2C busJean Delvare1-0/+3
Some Radeon cards have an I2C-based thermal sensor chip connected to the "monid" I2C bus. Set the I2C probing class of this bus properly so that hwmon drivers can detect devices on it and bind to them. This closes kernel.org bug #26172. We exclude PPC for the time being, as Benjamin doesn't want us to mess up with them without explicit testing, and there is no evidence that this change is needed for them either. Reported-by: Alexander Goomenyuk <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22fbdev: sh_mobile_lcdc: checking NULL instead of IS_ERR()Dan Carpenter1-2/+3
backlight_device_register() returns an ERR_PTR. It doesn't return NULL. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22video: sh7760fb: use resource_size()axel lin1-2/+2
The size calculation is done incorrectly in request_mem_region because it should include both the start and end (end - start + 1). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22video: hpfb: use resource_size()axel lin1-3/+3
The size calculation is done incorrectly here because it should include both the start and end (end - start + 1). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: use new start address registerOndrej Zary1-1/+1
Use "new" start address register 0x69 (bits 16-20) instead of "old" 0x31 (bits 16-17) and 0x51 (bits 18-19). This is needed for panning to work correctly on Trio3D/2X cards (and does no harm on other ones). Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: enable DTPCOndrej Zary1-4/+24
Enable Data Transfer Position Control (DTPC). This is needed at least on Virge/DX to correctly display at higher pixclocks. Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: fix 15/16bpp modes with over 115MHz pixclocks on 86C365 Trio3DOndrej Zary1-0/+18
Enable pixel multiplexing in 15/16bpp modes when pixclock is over 115MHz on Trio3D (86C365) cards to fix artifacts on the left side of screen. Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: add support for 86C365 Trio3DOndrej Zary1-4/+13
Add support for S3 Trio3D (86C365) cards to s3fb driver. Tested with one 4MB card. Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: maximize virtual vertical size for fast scrollingOndrej Zary1-0/+8
Maximize virtual vertical framebuffer size during init to allow fast scrolling (accelerated by panning). Signed-off-by: Ondrej Zary <[email protected]> Acked-by: Ondrej Zajicek <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22vt8623fb: Compute VGA base iomem pointer explicitly.David Miller1-0/+11
This allows the driver to work in multi-domain PCI configurations. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22arkfb: Compute VGA base iomem pointer explicitly.David Miller1-0/+11
This allows the driver to work in multi-domain PCI configurations. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: Compute VGA base iomem pointer explicitly.David Miller1-0/+11
This allows the driver to work in multi-domain PCI configurations. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22vt8623fb: Don't clobber par->state.vgabase during open method.David Miller1-0/+3
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: Don't clobber par->state.vgabase during open method.David Miller1-0/+3
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22arkfb: Don't clobber par->state.vgabase during open method.David Miller1-0/+3
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22vt8623fb: Pass par->state.vgabase to vga_*() calls.David Miller1-16/+16
Instead of just plain NULL. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22s3fb: Pass par->state.vgabase to vga_*() calls.David Miller1-50/+52
Instead of just plain NULL. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22arkfb: Pass par->state.vgabase to vga_*() calls.David Miller1-26/+34
Instead of just plain NULL. Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_timings() take an iomem regbase pointer.David Miller4-19/+20
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_tilecursor() take an iomem regbase pointer.David Miller4-10/+30
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_textmode_vga_regs() take an iomem regbase pointer.David Miller4-23/+23
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_default_crt_regs() take an iomem regbase pointer.David Miller4-9/+9
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_wcrt_mask() take an iomem regbase pointer.David Miller4-91/+91
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_wseq_mask() take an iomem regbase pointer.David Miller4-37/+44
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_default_seq_regs take an iomem regbase pointer.David Miller4-9/+9
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_default_atc_regs take an iomem regbase pointer.David Miller4-15/+15
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_set_default_gfx_regs take an iomem regbase pointer.David Miller4-16/+16
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_wseq_multi take an iomem regbase pointer.David Miller2-5/+5
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_wcrt_multi take an iomem regbase pointer.David Miller4-30/+34
Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22svga: Make svga_wattr take an iomem regbase pointer.David Miller2-10/+10
And use vga_{r,w}(). Signed-off-by: David S. Miller <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: add support for XGI Z9 DDR2 POSTAaro Koskinen1-9/+68
Add support for ZGI Z9 DDR2 POST. The init sequence is from XGI's xgifb driver. Tested with ARM board using a PCI card with XGI Z9s and 32 MB DDR2 memory. After a cold reset the POST succeeds. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: move XGI POST DDR2 bootup code into subroutinesAaro Koskinen1-55/+84
Move DDR2 register setting code into separate subroutines. No changes in functionality. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: add RAM type detection for XGI Z9Aaro Koskinen1-1/+7
Detect the XGI Z9 RAM type as "documented" by the XGI's xgifb driver. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: add subroutine for detecting XGI Z9Aaro Koskinen3-0/+20
Z7 and Z9 have the same PCI ID, so additional checking is needed to detect Z9. The method was "documented" in XGI's xgifb driver. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: move XGI POST RAM type detection into a subroutineAaro Koskinen1-22/+35
Move XGI POST RAM type detection into a separate subroutine to make further code changes easier. No changes in functionality Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22sisfb: POST should fail if R/W test failsAaro Koskinen1-5/+17
Currently there is no indication if R/W test fails during POST. This can happen e.g. when user plugs in a card with unsupported type of memory. Since the driver will be unusable, it's better to fail the whole POST if the memory cannot be configured properly. Signed-off-by: Aaro Koskinen <[email protected]> Cc: Thomas Winischhofer <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22vmlfb: use list_move() instead of list_del()/list_add() combinationKirill A. Shutemov1-2/+1
Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22omap: use list_move() instead of list_del()/list_add() combinationKirill A. Shutemov2-4/+2
Signed-off-by: Kirill A. Shutemov <[email protected]> Acked-by: Tomi Valkeinen <[email protected]> Signed-off-by: Paul Mundt <[email protected]>
2011-03-22Merge branch 'apei-release' into releaseLen Brown6-134/+341
2011-03-22Merge branch 'for-paul' of git://gitorious.org/linux-omap-dss2/linuxPaul Mundt27-1244/+4520
Conflicts: arch/arm/mach-omap2/board-overo.c Signed-off-by: Paul Mundt <[email protected]>
2011-03-21ACPI, APEI, Add PCIe AER error information printing supportHuang Ying4-12/+81
The AER error information printing support is implemented in drivers/pci/pcie/aer/aer_print.c. So some string constants, functions and macros definitions can be re-used without being exported. The original PCIe AER error information printing function is not re-used directly because the overall format is quite different. And changing the original printing format may make some original users' scripts broken. Signed-off-by: Huang Ying <[email protected]> CC: Jesse Barnes <[email protected]> CC: Zhang Yanmin <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-03-21PCIe, AER, use pre-generated prefix in error information printingHuang Ying1-75/+48
When printing PCIe AER error information, each line is prefixed with PCIe device and driver information. In original implementation, the prefix is generated when each line is printed. In fact, all lines share the same prefix. So this patch pre-generated the prefix, and use that one when each line is printed. In addition to common prefix can be pre-generated, the trailing white spaces in string constants and NULLs in char * array constants can be removed too. These can reduce the object file size further. The size of object file before and after changing is as follow: text data bss dec before: 3038 0 0 3038 after: 2118 0 0 2118 Signed-off-by: Huang Ying <[email protected]> CC: Jesse Barnes <[email protected]> CC: Zhang Yanmin <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-03-21ACPI, APEI, Add ERST record ID cacheHuang Ying2-47/+212
APEI ERST firmware interface and implementation has no multiple users in mind. For example, if there is four records in storage with ID: 1, 2, 3 and 4, if two ERST readers enumerate the records via GET_NEXT_RECORD_ID as follow, reader 1 reader 2 1 2 3 4 -1 -1 where -1 signals there is no more record ID. Reader 1 has no chance to check record 2 and 4, while reader 2 has no chance to check record 1 and 3. And any other GET_NEXT_RECORD_ID will return -1, that is, other readers will has no chance to check any record even they are not cleared by anyone. This makes raw GET_NEXT_RECORD_ID not suitable for used by multiple users. To solve the issue, an in-memory ERST record ID cache is designed and implemented. When enumerating record ID, the ID returned by GET_NEXT_RECORD_ID is added into cache in addition to be returned to caller. So other readers can check the cache to get all record ID available. Signed-off-by: Huang Ying <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Signed-off-by: Len Brown <[email protected]>
2011-03-21veth: Fix the byte countersEric W. Biederman1-1/+1
Commit 44540960 "veth: move loopback logic to common location" introduced a bug in the packet counters. I don't understand why that happened as it is not explained in the comments and the mut check in dev_forward_skb retains the assumption that skb->len is the total length of the packet. I just measured this emperically by setting up a veth pair between two noop network namespaces setting and attempting a telnet connection between the two. I saw three packets in each direction and the byte counters were exactly 14*3 = 42 bytes high in each direction. I got the actual packet lengths with tcpdump. So remove the extra ETH_HLEN from the veth byte count totals. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-21macvlan: Fix use after free of struct macvlan_port.Eric W. Biederman1-6/+12
When the macvlan driver was extended to call unregisgter_netdevice_queue in 23289a37e2b127dfc4de1313fba15bb4c9f0cd5b, a use after free of struct macvlan_port was introduced. The code in dellink relied on unregister_netdevice actually unregistering the net device so it would be safe to free macvlan_port. Since unregister_netdevice_queue can just queue up the unregister instead of performing the unregiser immediately we free the macvlan_port too soon and then the code in macvlan_stop removes the macaddress for the set of macaddress to listen for and uses memory that has already been freed. To fix this add a reference count to track when it is safe to free the macvlan_port and move the call of macvlan_port_destroy into macvlan_uninit which is guaranteed to be called after the final macvlan_port_close. Signed-off-by: Eric W. Biederman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-21can: c_can: Do basic c_can configuration _before_ enabling the interruptsJan Altenberg1-3/+3
I ran into some trouble while testing the SocketCAN driver for the BOSCH C_CAN controller. The interface is not correctly initialized, if I put some CAN traffic on the line, _while_ the interface is being started (which means: the interface doesn't come up correcty, if there's some RX traffic while doing 'ifconfig can0 up'). The current implementation enables the controller interrupts _before_ doing the basic c_can configuration. I think, this should be done the other way round. The patch below fixes things for me. Signed-off-by: Jan Altenberg <[email protected]> Acked-by: Kurt Van Dijck <[email protected]> Acked-by: Wolfgang Grandegger <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-03-21[media] v4l: subdev: Events supportSakari Ailus1-1/+77
Provide v4l2_subdevs with v4l2_event support. Subdev drivers only need very little to support events. Signed-off-by: Sakari Ailus <[email protected]> Signed-off-by: David Cohen <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>