Commit graph

179433 commits

Author SHA1 Message Date
Ben Skeggs
1959ca80e1 drm/nouveau: have ttm's fault handler called directly
There's no good reason for us to have our own anymore, this is left over
from an early port to these TTM interfaces.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:15 +10:00
Ben Skeggs
a908b96c22 drm/nv50: restore correct cache1 get/put address on fifoctx load
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:15 +10:00
Marcin Slusarz
c03ec7f91f drm/nouveau: create function for "dealing" with gpu lockup
It's mostly a cleanup, but in nv50_fbcon_accel_init gpu lockup
message was printed, but HWACCEL_DISBALED flag was not set.

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:14 +10:00
Ben Skeggs
e9dd8e11ed drm/nouveau: remove unused nouveau_channel_idle() function
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:13 +10:00
Ben Skeggs
7de3643f93 drm/nouveau: fix handling of fbcon colours in 8bpp
Depending on the visual, the colours handed to us in fillrect() can either be
an actual colour, or an index into the pseudo-palette.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:13 +10:00
Francisco Jerez
ea911a1cf4 drm/nv04: Context switching fixes.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:12 +10:00
Francisco Jerez
a5027ccd3c drm/nouveau: Use the software object for fencing.
This should avoid a race condition on nv0x, if we're doing it with
actual PGRAPH objects and a there's a fence within the FIFO DMA fetch
area when a context switch kicks in.

In that case we get an ILLEGAL_MTHD interrupt as expected, but the
values in PGRAPH_TRAPPED_ADDR aren't calculated correctly and they're
almost useless (e.g. you can see ILLEGAL_MTHDs for the now inactive
channel, with a wrong offset/data pair).

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:12 +10:00
Francisco Jerez
ca4362adb4 drm/nouveau: Allocate a per-channel instance of NV_SW.
It will be useful for various synchronization purposes, mostly stolen
from "[PATCH] drm/nv50: synchronize user channel after buffer object
move on kernel channel" by Maarten Maathuis.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:11 +10:00
Maarten Maathuis
0a2d090f99 drm/nv50: make the blocksize depend on vram size
- This should be better than what we have now.
- I'm less sure about the non power of two path.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2010-01-11 14:41:10 +10:00
Maarten Maathuis
c2b82924bd drm/nouveau: better alignment of bo sizes and use roundup instead of ALIGN
- Aligning to block size should ensure that the extra size is enough.
- Using roundup, because not all sizes are powers of two.

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
2010-01-11 14:41:10 +10:00
Francisco Jerez
8f71c29e44 drm/nouveau: Don't skip card take down on nv0x.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:09 +10:00
Francisco Jerez
b7f7e41b89 drm/nouveau: Implement nv42-nv43 TV load detection.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:08 +10:00
Francisco Jerez
02076da97a drm/nouveau: Clean up the nv17-nv4x load detection code a bit.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:08 +10:00
Marcin Slusarz
e55ca7e68e drm/nv50: fix fillrect color
struct fb_fillrect->color is not a color, but index into pseudo_palette
array

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:07 +10:00
Ben Skeggs
fbe36a7a06 drm/nv50: ignore vbios table's claim to the contrary if EDID says >8bpc
Should fix dim panel issues reported on Dell M6400/M6500.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-01-11 14:41:07 +10:00
Francisco Jerez
aeca15e596 drm/nouveau: Drop redundant placement initialization.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:06 +10:00
Francisco Jerez
69a18c328b drm/nouveau: No need to force evict=true when swapping evicted BOs back in.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:05 +10:00
Francisco Jerez
c6af6053be drm/nouveau: Fix "general protection fault" in the flipd/flips eviction path.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:05 +10:00
Francisco Jerez
73cb9276fd drm/i2c/ch7006: Drop build time dependency to nouveau.
This partially reverts e4b41066, as this driver is intended to be
useful with any KMS driver for suitable hardware. The missing build
dependency that commit workarounded was DRM_KMS_HELPER.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:04 +10:00
Francisco Jerez
287c153214 drm/nouveau: Make the MM aware of pre-G80 tiling.
This commit has also the following 3 bugfix commits squashed into it from
the nouveau git tree:

drm/nouveau: Fix up the tiling alignment restrictions for nv1x.
drm/nouveau: Fix up the nv2x tiling alignment restrictions.
drm/nv50: fix align typo for g9x

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:03 +10:00
Francisco Jerez
0d87c10031 drm/nouveau: Pre-G80 tiling support.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:03 +10:00
Francisco Jerez
617e234b01 drm/nouveau: Add cache_flush/pull fifo engine functions.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-11 14:41:02 +10:00
Dave Airlie
94fd163d86 drm: reduce WARN_ON to a printk.
Lots of ppl keep thinking this is an oops, it was just a warning for
me to see, just make it a printk now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11 14:36:09 +10:00
Dave Airlie
509c7d83c3 drm/kms/fb: check for depth changes from userspace for resizing.
If userspace (plymouth in this case) asks for a deeper depth,
refuse it as well due to lack of resizing.

This fixes an issue since < 32MB cards went to 8bpp and plymouth
crashes on startup.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11 14:36:09 +10:00
David John
89347bb8ef drm: Keep disabled outputs disabled after suspend / resume
With the current DRM code, an output that has been powered off
from userspace will automatically power back on when resuming
from suspend. This patch fixes this behaviour.

Tested only with the Intel i915 driver on an Intel GM45 Express
chipset.

Signed-off-by: David John <davidjon@xenontk.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11 14:36:08 +10:00
Alex Deucher
804c7559e9 drm/radeon/kms: add additional safe regs for r4xx/rs6xx and r5xx
- r4xx/rs6xx: add support for extended pixel shader
instruction/temp regs
- r5xx: add SM3 regs

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-01-11 13:42:27 +10:00
Tetsuo Handa
cd7bec6ad8 TOMOYO: Remove memory pool for list elements.
Currently, TOMOYO allocates memory for list elements from memory pool allocated
by kmalloc(PAGE_SIZE). But that makes it difficult to kfree() when garbage
collector is added. Thus, remove memory pool and use kmalloc(sizeof()).

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
2010-01-11 09:27:40 +11:00
Tetsuo Handa
e41035a996 TOMOYO: Remove memory pool for string data.
Currently, TOMOYO allocates memory for string data from memory pool allocated
by kmalloc(PAGE_SIZE). But that makes it difficult to kfree() when garbage
collector is added. Thus, remove memory pool and use kmalloc(strlen()).

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: James Morris <jmorris@namei.org>
2010-01-11 09:27:38 +11:00
Tetsuo Handa
0ed731859e LSM: Update comment on security_sock_rcv_skb
It is not permitted to do sleeping operation inside security_sock_rcv_skb().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Serge Hallyn <serue@us.ibm.com>

--
Signed-off-by: James Morris <jmorris@namei.org>
2010-01-11 08:53:23 +11:00
Denis Kirjanov
fa15e99b6b vxge: use pci_dma_mapping_error to test return value
pci_dma_mapping_error should be used to test return value of
pci_map_single or pci_map_page.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-10 13:40:10 -08:00
Tetsuo Handa
f737d95ddf TOMOYO: Replace rw_semaphore by mutex.
Since readers no longer use down_read(), writers no longer
need to use rw_semaphore. Replace individual rw_semaphore by
single mutex.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
2010-01-11 07:57:44 +11:00
Márton Németh
3dd3a15635 hwmon: Make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_device_id also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I1, I2, x;
@@
	struct I1 {
	  ...
	  const struct I2 *x;
	  ...
	};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
	struct I1 y = {
	  .x = E,
	};
@c@
identifier r.I2;
identifier s.E;
@@
	const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+	const
	struct I2 E[] = ...;
// </smpl>

Signed-off-by: Márton Németh <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-01-10 20:52:35 +01:00
Yong Wang
1fe63ab47a hwmon: (coretemp) Fix TjMax for Atom N450/D410/D510 CPUs
The max junction temperature of Atom N450/D410/D510 CPUs is 100 degrees
Celsius. Since these CPUs are always coupled with Intel NM10 chipset in
one package, the best way to verify whether an Atom CPU is N450/D410/D510
is to check the host bridge device.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Acked-by: Huaxu Wan <huaxu.wan@intel.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-01-10 20:52:34 +01:00
Clemens Ladisch
c5114a1cd6 hwmon: (k10temp) Blacklist more family 10h processors
The latest version of the Revision Guide for AMD Family 10h Processors
lists two more processor revisions which may be affected by erratum 319.
Change the blacklisting code to correctly detect those processors, by
implementing AMD's recommended algorithm.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
2010-01-10 20:52:34 +01:00
Luca Tettamanti
7e5eab1128 hwmon: (asus_atk0110) Add debugfs interface
Expose the raw GGRP/GITM interface via debugfs. The hwmon interface is
reverse engineered and the driver tends to break on newer boards...
Using this interface it's possible to poke directly at the ACPI methods
without the need to recompile, reducing the guesswork and the round trips
needed to support a new revision of the interface.

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-01-10 20:52:33 +01:00
Luca Tettamanti
8ba406be53 hwmon: (asus_atk0110) Refactor interface probe code
The behaviour is unmodified, this makes easier to override the heuristic (which
is probably needed for some boards).

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-01-10 20:52:33 +01:00
Roger Blofeld
bb595c923b hwmon: (adt7462) Fix pin 28 monitoring
The ADT7462_PIN28_VOLT value is a 4-bit field, so the corresponding
shift must be 4.

Signed-off-by: Roger Blofeld <blofeldus@yahoo.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
2010-01-10 20:52:32 +01:00
Dave Chinner
fd45e47841 xfs: Ensure we force all busy extents in range to disk
When we search for and find a busy extent during allocation we
force the log out to ensure the extent free transaction is on
disk before the allocation transaction. The current implementation
has a subtle bug in it--it does not handle multiple overlapping
ranges.

That is, if we free lots of little extents into a single
contiguous extent, then allocate the contiguous extent, the busy
search code stops searching at the first extent it finds that
overlaps the allocated range. It then uses the commit LSN of the
transaction to force the log out to.

Unfortunately, the other busy ranges might have more recent
commit LSNs than the first busy extent that is found, and this
results in xfs_alloc_search_busy() returning before all the
extent free transactions are on disk for the range being
allocated. This can lead to potential metadata corruption or
stale data exposure after a crash because log replay won't replay
all the extent free transactions that cover the allocation range.

Modified-by: Alex Elder <aelder@sgi.com>

(Dropped the "found" argument from the xfs_alloc_busysearch trace
event.)

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:22:02 -06:00
Dave Chinner
44e08c45cc xfs: Don't flush stale inodes
Because inodes remain in cache much longer than inode buffers do
under memory pressure, we can get the situation where we have
stale, dirty inodes being reclaimed but the backing storage has
been freed.  Hence we should never, ever flush XFS_ISTALE inodes
to disk as there is no guarantee that the backing buffer is in
cache and still marked stale when the flush occurs.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:22:00 -06:00
Christoph Hellwig
d6d59bada3 xfs: fix timestamp handling in xfs_setattr
We currently have some rather odd code in xfs_setattr for
updating the a/c/mtime timestamps:

 - first we do a non-transaction update if all three are updated
   together
 - second we implicitly update the ctime for various changes
   instead of relying on the ATTR_CTIME flag
 - third we set the timestamps to the current time instead of the
   arguments in the iattr structure in many cases.

This patch makes sure we update it in a consistent way:

 - always transactional
 - ctime is only updated if ATTR_CTIME is set or we do a size
   update, which is a special case
 - always to the times passed in from the caller instead of the
   current time

The only non-size caller of xfs_setattr that doesn't come from
the VFS is updated to set ATTR_CTIME and pass in a valid ctime
value.

Reported-by: Eric Blake <ebb9@byu.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:21:58 -06:00
Christoph Hellwig
ea9a48881e xfs: use DECLARE_EVENT_CLASS
Using DECLARE_EVENT_CLASS allows us to to use trace event code
instead of duplicating it in the binary.  This was not available
before 2.6.33 so it had to be done as a separate step once the
prerequisite was merged.

This only requires changes to xfs_trace.h and the results are
rather impressive:

hch@brick:~/work/linux-2.6/obj-kvm$ size fs/xfs/xfs.o*
text	   data	    bss	    dec	    hex	filename
 607732	  41884	   3616	 653232	  9f7b0	fs/xfs/xfs.o
1026732	  41884	   3808	1072424	 105d28	fs/xfs/xfs.o.old

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-01-10 12:21:56 -06:00
Krzysztof Helt
c68db7175f ALSA: ac97: add AC97 STMicroelectronics' codecs
Add the STMicroelectronics ST7597 codec and an unknown codec
from the same manufacturer found on the Creative SB 128 card (CT4810).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:03:09 +01:00
Daniel T Chen
af9a75dd1a ALSA: ac97: Add Dell Dimension 2400 to Headphone/Line Jack Sense blacklist
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense' muted
for audible playback, so just add it to the ad1981 jack sense blacklist.

Cc: stable@kernel.org
Tested-by: Pete <x41215201@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-01-10 19:01:12 +01:00
Santosh Shilimkar
62a8c5bcb5 ARM: 5872/1: ARM: include needed linux/cpu.h in asm/cpu.h
The file arch/arm/include/asm/cpu.h needs to include 'linux/cpu.h' to
meet its dependency. Otherwise when using "struct cpuinfo_arm" and
including just 'asm/cpu.h' throws below error -
	arch/arm/include/asm/cpu.h:16: error: field 'cpu' has incomplete type

To fix this  otherway, one can also include both linux/cpu.h and
asm/cpu.h but it shoudn't be that way.  So this patch fixes this by
including the linux/cpu.h in asm/cpu.h, so that including alone
asm/cpu.h is enough.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 13:03:52 +00:00
Dmitry Torokhov
dd38d6889d Input: xbox - do not use GFP_KERNEL under spinlock
xbox_play_effect() is called while holding dev->event_lock with
interrupts disabled and thus may not use GFP_KERNEL when submitting
urbs.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-01-09 23:44:03 -08:00
Peter Hüwe
657b366a28 ARM: 5871/1: arch/arm: Fix build failure for lpd7a404_defconfig caused by missing includes
This patch fixes a build failure [1] due to missing includes
This should make the arm tree build again with lpd7a404_defconfig

References:
http://kisskb.ellerman.id.au/kisskb/buildresult/1983329/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 00:08:14 +00:00
Peter Hüwe
f892027c02 ARM: 5870/1: arch/arm: Fix build failure for defconfigs without CONFIG_ISA_DMA_API set
A lot of ARM-defconfigs (those without CONFIG_ISA_DMA_API set) fail to
build [1][2][3] due to the changes of the patch
    [PATCH] PCI: Clean up build for CONFIG_PCI_QUIRKS unset
    by Rafael J. Wysocki (Sat, 2 Jan 2010 22:57:24 +0100) [4]
as the referenced variable 'isa_dma_bridge_buggy' in asm/dma.h is
enclosed by the CONFIG_ISA_DMA_API conditional all configs without this
setting fail to build.

I'm not sure wether moving the condition is the right way to solve the
issue, but atleast it fixes the issue :)

References:
[1] http://kisskb.ellerman.id.au/kisskb/buildresult/1983354/
[2] http://kisskb.ellerman.id.au/kisskb/buildresult/1983333/
[3] http://kisskb.ellerman.id.au/kisskb/buildresult/1983337/
[4] http://lkml.org/lkml/2010/1/2/102

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-01-10 00:08:03 +00:00
Rafael J. Wysocki
50f411e34d DRM / i915: Fix resume regression on MSI Wind U100 w/o KMS
Commit cbda12d77e (drm/i915: implement
new pm ops for i915), among other things, removed the .suspend and
.resume pointers from the struct drm_driver object in i915_drv.c,
which broke resume without KMS on my MSI Wind U100.

Fix this by reverting that part of commit cbda12d77e.

[ The DRM layer will not use the class-specific suspend/resume functions
  if the driver is marked MODESET-aware, and conversely it will not
  register the PCI device if the drievr isn't so marked, so you always
  end up with _either_ the drm-class suspend/resume _or_ the PCI layer
  PM functionality, never both.  - Linus ]

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-01-08 17:19:41 -08:00
Tony Lindgren
27dba4bcf8 Merge branch 'for_2.6.33rc_c' of git://git.pwsan.com/linux-2.6 into omap-fixes-for-linus 2010-01-08 14:27:56 -08:00
Paul Walmsley
cdf1a91556 OMAP2 clock: dynamically allocate CPUFreq frequency table
Dynamically allocate the CPUFreq frequency table on OMAP2xxx chips.
This fixes some compilation problems, since the kernel may not know
what chip it is running on until boot-time.  This also reduces the size
of the CPUFreq frequency table.

Problem originally reported by Felipe Balbi <felipe.balbi@nokia.com>.
Thanks also for comments on the patch from Felipe and Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Felipe Balbi <felipe.balbi@nokia.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
2010-01-08 15:23:17 -07:00