profile/ivi/kernel-x86-ivi.git
13 years agodrm/i915: Add support for precise vblank timestamping (v2)
Mario Kleiner [Wed, 8 Dec 2010 03:07:19 +0000 (04:07 +0100)]
drm/i915: Add support for precise vblank timestamping (v2)

v2: Change IS_IRONLAKE to IS_GEN5 to adapt to 2.6.37

This patch adds new functions for use by the drm core:

.get_vblank_timestamp() provides a precise timestamp
for the end of the most recent (or current) vblank
interval of a given crtc, as needed for the DRI2
implementation of the OML_sync_control extension.
It is a thin wrapper around the drm function
drm_calc_vbltimestamp_from_scanoutpos() which does
almost all the work.

.get_scanout_position() provides the current horizontal
and vertical video scanout position and "in vblank"
status of a given crtc, as needed by the drm for use by
drm_calc_vbltimestamp_from_scanoutpos().

The patch modifies the pageflip completion routine
to use these precise vblank timestamps as the timestamps
for pageflip completion events.

This code has been only tested on a HP-Mini Netbook with
Atom processor and Intel 945GME gpu. The codepath for
(IS_G4X(dev) || IS_GEN5(dev) || IS_GEN6(dev)) gpu's
has not been tested so far due to lack of hardware.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge remote branch 'airlied/drm-core-next' into drm-intel-next
Chris Wilson [Thu, 16 Dec 2010 21:02:15 +0000 (21:02 +0000)]
Merge remote branch 'airlied/drm-core-next' into drm-intel-next

13 years agodrm/radeon/kms: properly print ontario chip id
Alex Deucher [Fri, 3 Dec 2010 20:34:16 +0000 (15:34 -0500)]
drm/radeon/kms: properly print ontario chip id

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix vram start calculation on ontario (v2)
Alex Deucher [Wed, 15 Dec 2010 16:04:10 +0000 (11:04 -0500)]
drm/radeon/kms: fix vram start calculation on ontario (v2)

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge remote branch 'nouveau/drm-nouveau-next' of ../drm-nouveau-next into drm-core...
Dave Airlie [Thu, 16 Dec 2010 04:49:02 +0000 (14:49 +1000)]
Merge remote branch 'nouveau/drm-nouveau-next' of ../drm-nouveau-next into drm-core-next

* 'nouveau/drm-nouveau-next' of ../drm-nouveau-next: (93 commits)
  drm/nv50: fix a couple of vm init issues
  drm/nv04-nv40: Fix up PCI(E) GART DMA object bus address calculation.
  drm/nouveau: kick vram functions out into an "engine"
  drm/nouveau: allow gpuobj vinst to be a virtual address when necessary
  drm/nv50: tidy up PCIEGART implementation
  drm/nv50: enable non-contig vram allocations where requested
  drm/nv50: enable 4KiB pages for small vram allocations
  drm/nv50: implement global channel address space on new VM code
  drm/nv50: implement BAR1/BAR3 management on top of new VM code
  drm/nv50: import new vm code
  drm/nv50: implement custom vram mm
  drm/nouveau: Avoid potential race between nouveau_fence_update() and context takedown.
  drm/nouveau: fix use of drm_mm_node in semaphore object
  drm/nouveau: wrap calls to ttm_bo_validate()
  drm/nouveau: no need to zero dma objects, we fill them completely anyway
  drm/nouveau: introduce a util function to wait on reg != val
  drm/nouveau: implicitly insert non-DMA objects into RAMHT
  drm/nouveau: make fifo.create_context() responsible for mapping control regs
  drm/nouveau: Spin for a bit in nouveau_fence_wait() before yielding the CPU.
  drm/nouveau: Use WC memory on the AGP GART.
  ...

13 years agodrm/ttm: delay freeing of old node during move_memcpy until after iounmap
Ben Skeggs [Thu, 16 Dec 2010 04:47:46 +0000 (14:47 +1000)]
drm/ttm: delay freeing of old node during move_memcpy until after iounmap

Drivers using their own implementation of io_mem_reserve/io_mem_free are
likely to store the tracking information for the map in mem.mm_node, so
it can't be freed while still mapped.

Signed-off-by: Ben Skeggs<bskeggs@redhat.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon: add initial tracepoint support.
Dave Airlie [Tue, 23 Nov 2010 01:47:49 +0000 (11:47 +1000)]
drm/radeon: add initial tracepoint support.

this adds a bo create, and fence seq tracking tracepoints.

This is just an initial set to play around with, we should investigate
what others we need would be useful.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/nv50: fix a couple of vm init issues
Francisco Jerez [Thu, 16 Dec 2010 00:30:35 +0000 (10:30 +1000)]
drm/nv50: fix a couple of vm init issues

Fixes overwriting the first page table entry when testing that the PRAMIN
BAR can be correctly read/written, and adds an additional bar flush after
poking the BAR3 control regs.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/i915: Add frame buffer compression on Sandybridge
Yuanhan Liu [Wed, 15 Dec 2010 07:42:32 +0000 (15:42 +0800)]
drm/i915: Add frame buffer compression on Sandybridge

Add frame buffer compression on Sandybridge. The method is similar to
Ironlake, except that two new registers of type GTTMMADR must be written
with the right fence info.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Add self-refresh support on Sandybridge
Yuanhan Liu [Wed, 15 Dec 2010 07:42:31 +0000 (15:42 +0800)]
drm/i915: Add self-refresh support on Sandybridge

Add the support of memory self-refresh on Sandybridge, which is now
support 3 levels of watermarks and the source of the latency values
for watermarks has changed.

On Sandybridge, the LP0 WM value is not hardcoded any more. All the
latency value is now should be extracted from MCHBAR SSKPD register.
And the MCHBAR base address is changed, too.

For the WM values, if any calculated watermark values is larger than
the maximum value that can be programmed into the associated watermark
register, that watermark must be disabled.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
[ickle: remove duplicate compute routines and fixup for checkpatch]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Wait for vblank before unpinning old fb
Chris Wilson [Tue, 14 Dec 2010 16:09:31 +0000 (16:09 +0000)]
drm/i915: Wait for vblank before unpinning old fb

Be paranoid and ensure that the vblank has passed and the scanout has
switched to the new fb, before unpinning the old one and possibly
tearing down its PTEs.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoRevert "drm/i915: Avoid using PIPE_CONTROL on Ironlake"
Chris Wilson [Wed, 15 Dec 2010 09:56:50 +0000 (09:56 +0000)]
Revert "drm/i915: Avoid using PIPE_CONTROL on Ironlake"

Restore PIPE_CONTROL once again just for Ironlake, as it appears that
MI_USER_INTERRUPT does not have the same coherency guarantees, that is
on Ironlake the interrupt following a GPU write is not guaranteed to
arrive after the write is coherent from the CPU, as it does on the
other generations.

Reported-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Reported-by: Shuang He <shuang.he@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32402
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Pass clock limits down to PLL matcher
Chris Wilson [Tue, 14 Dec 2010 20:04:54 +0000 (20:04 +0000)]
drm/i915: Pass clock limits down to PLL matcher

As we already know the limits for the hardware clock, pass it down
rather than recomputing them for each match.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Poll for seqno completion if IRQ is disabled
Chris Wilson [Tue, 14 Dec 2010 12:17:15 +0000 (12:17 +0000)]
drm/i915: Poll for seqno completion if IRQ is disabled

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32288
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'drm-intel-fixes' into drm-intel-next
Chris Wilson [Tue, 14 Dec 2010 11:34:51 +0000 (11:34 +0000)]
Merge branch 'drm-intel-fixes' into drm-intel-next

13 years agodrm/i915/ringbuffer: Make IRQ refcnting atomic
Chris Wilson [Mon, 13 Dec 2010 16:54:50 +0000 (16:54 +0000)]
drm/i915/ringbuffer: Make IRQ refcnting atomic

In order to enforce the correct memory barriers for irq get/put, we need
to perform the actual counting using atomic operations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoagp/intel: Fix missed cached memory flags setting in i965_write_entry()
Chris Wilson [Tue, 14 Dec 2010 11:29:23 +0000 (11:29 +0000)]
agp/intel: Fix missed cached memory flags setting in i965_write_entry()

This fixes regression from a6963596a13e62f8e65b1cf3403a330ff2db407c,
that missed to set cached memory type in GTT entry.

Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'drm-intel-fixes' into drm-intel-next
Chris Wilson [Thu, 9 Dec 2010 20:22:04 +0000 (20:22 +0000)]
Merge branch 'drm-intel-fixes' into drm-intel-next

13 years agodrm/i915/sdvo: Only use the SDVO pin if it is in the valid range
Chris Wilson [Wed, 8 Dec 2010 16:48:21 +0000 (16:48 +0000)]
drm/i915/sdvo: Only use the SDVO pin if it is in the valid range

BIOSes. Can't live without them (apparently), definitely can't live with
them.

Reported-by: Ben Gamari <bgamari@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=24312
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Enable RC6 autodownclocking on Sandybridge
Chris Wilson [Wed, 8 Dec 2010 18:40:43 +0000 (18:40 +0000)]
drm/i915: Enable RC6 autodownclocking on Sandybridge

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Terminate the FORCE WAKE after we have finished reading
Chris Wilson [Wed, 8 Dec 2010 17:32:24 +0000 (17:32 +0000)]
drm/i915: Terminate the FORCE WAKE after we have finished reading

Once we have read the value out of the GT power well, we need to remove
the FORCE WAKE bit to allow the system to auto-power down.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/gtt: Clear the cachelines upon resume
Chris Wilson [Wed, 8 Dec 2010 14:28:54 +0000 (14:28 +0000)]
drm/i915/gtt: Clear the cachelines upon resume

Required for my pineview system to not barf after resuming.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Restore GTT mapping first upon resume
Chris Wilson [Wed, 8 Dec 2010 14:26:19 +0000 (14:26 +0000)]
drm/i915: Restore GTT mapping first upon resume

As suggested by Daniel Vetter, this is a safeguard should any of the
registers cause reference to PTE entries.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: driver.suspend and .resume are always set
Chris Wilson [Wed, 8 Dec 2010 13:31:49 +0000 (13:31 +0000)]
drm/i915: driver.suspend and .resume are always set

So we can remove the repeated initialisation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Mark the user reloc error paths as unlikely
Chris Wilson [Wed, 8 Dec 2010 10:43:06 +0000 (10:43 +0000)]
drm/i915: Mark the user reloc error paths as unlikely

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Eliminate drm_gem_object_lookup during relocation
Chris Wilson [Wed, 8 Dec 2010 10:38:14 +0000 (10:38 +0000)]
drm/i915: Eliminate drm_gem_object_lookup during relocation

As we provide a list of all objects that will be accessed from the
batchbuffer, we can build a lut of the handles associated with those
objects for this invocation and use that to avoid the overhead of
looking up those objects again for every relocation.

The cost of building and searching a small hash table is much less than
that of acquiring a spinlock, searching a radix tree and manipulating an
atomic refcnt per relocation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Re-arm the idle timers if the device is still busy
Chris Wilson [Wed, 8 Dec 2010 09:43:41 +0000 (09:43 +0000)]
drm/i915: Re-arm the idle timers if the device is still busy

Don't post a downclocking task if the device is still active when the
idle timer fires. A pathological process could queue up several seconds
worth of processing and then go to sleep, during which time the idle
timer would kick in and downclock the GPU.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/ringbuffer: Handle wrapping of the autoreported HEAD
Chris Wilson [Thu, 9 Dec 2010 12:56:37 +0000 (12:56 +0000)]
drm/i915/ringbuffer: Handle wrapping of the autoreported HEAD

If the tail advances beyond the autoreport HEAD value, then we need to
fallback to an uncached read of the HEAD register in order to ascertain
the correct amount of remaining space in the ringbuffer.

Reported-by: Fang, Xun <xunx.fang@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32259
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter
David Flynn [Wed, 8 Dec 2010 16:10:21 +0000 (16:10 +0000)]
drm/i915/dp: Fix I2C/EDID handling with active DisplayPort to DVI converter

The DisplayPort standard (1.1a) states that:
  The I2C-over-AUX Reply field is valid only when Native AUX CH Reply
  field is AUX_ACK (00). When Native AUX CH Reply field is not 00, then,
  I2C-over-AUX Reply field must be 00 and be ignored.

This fixes broken EDID reading when using an active DisplayPort to
duallink DVI converter.  If the AUX CH replier chooses to defer the
transaction, a short read occurs and erroneous data is returned as
the i2c reply due to a lack of length checking and failure to check
for AUX ACK.

As a result, broken EDIDs can look like:
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: bc bc bc ff bc bc bc ff bc bc bc ac bc bc bc 45    ???.???.???????E
10: bc bc bc 10 bc bc bc 34 bc bc bc ee bc bc bc 4c    ???????4???????L
20: bc bc bc 50 bc bc bc 00 bc bc bc 40 bc bc bc 00    ???P???.???@???.
30: bc bc bc 01 bc bc bc 01 bc bc bc a0 bc bc bc 40    ???????????????@
40: bc bc bc 00 bc bc bc 00 bc bc bc 00 bc bc bc 55    ???.???.???.???U
50: bc bc bc 35 bc bc bc 31 bc bc bc 20 bc bc bc fc    ???5???1??? ????
60: bc bc bc 4c bc bc bc 34 bc bc bc 46 bc bc bc 00    ???L???4???F???.
70: bc bc bc 38 bc bc bc 11 bc bc bc 20 bc bc bc 20    ???8??????? ???
80: bc bc bc ff bc bc bc ff bc bc bc ff bc bc bc ff    ???.???.???.???.
...

which can lead to:
[drm:drm_edid_block_valid] *ERROR* EDID checksum is invalid, remainder
[drm:drm_edid_block_valid] *ERROR* Raw EDID:
<3>30 30 30 30 30 30 30 32 38 32 30 32 63 63 31 61  000000028202cc1a
<3>28 00 02 8c 00 00 00 00 18 00 00 00 00 00 00 00  (...............
<3>20 4c 61 73 74 20 62 65 61 63 6f 6e 3a 20 33 32   Last beacon: 32
<3>32 30 6d 73 20 61 67 6f 46 00 05 8c 00 00 00 00  20ms agoF.......
<3>36 00 00 00 00 00 00 00 00 0c 57 69 2d 46 69 20  6.........Wi-Fi
<3>52 6f 75 74 65 72 01 08 82 84 8b 96 24 30 48 6c  Router......$0Hl
<3>03 01 01 06 02 00 00 2a 01 00 2f 01 00 32 04 0c  .......*../..2..
<3>12 18 60 dd 09 00 10 18 02 00 00 01 00 00 18 00  ..`.............

Signed-off-by: David Flynn <davidf@rd.bbc.co.uk>
[ickle: fix up some surrounding checkpatch warnings]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agoMerge branches 'x86-fixes-for-linus', 'perf-fixes-for-linus' and 'sched-fixes-for...
Linus Torvalds [Wed, 8 Dec 2010 14:40:59 +0000 (06:40 -0800)]
Merge branches 'x86-fixes-for-linus', 'perf-fixes-for-linus' and 'sched-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86/pvclock: Zero last_value on resume

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  perf record: Fix eternal wait for stillborn child
  perf header: Don't assume there's no attr info if no sample ids is provided
  perf symbols: Figure out start address of kernel map from kallsyms
  perf symbols: Fix kallsyms kernel/module map splitting

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  nohz: Fix printk_needs_cpu() return value on offline cpus
  printk: Fix wake_up_klogd() vs cpu hotplug

13 years agoMerge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
Linus Torvalds [Wed, 8 Dec 2010 14:34:39 +0000 (06:34 -0800)]
Merge branch 'drm-fixes' of git://git./linux/kernel/git/airlied/drm-2.6

* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
  drm/i915: i915 cannot provide switcher services.
  drm/radeon/kms: fix vram base calculation on rs780/rs880
  drm/radeon/kms: fix formatting of vram and gtt info
  drm/radeon/kms: forbid big bo allocation (fdo 31708) v3
  drm: Don't try and disable an encoder that was never enabled
  drm: Add missing drm_vblank_put() along queue vblank error path
  drm/i915/dp: Only apply the workaround if the select is still active
  drm/i915: Emit a request to clear a flushed and idle ring for unbusy bo
  drm/i915/lvds: Always restore panel-fitter when enabling the LVDS
  drm/i915/ringbuffer: Only print an error on the second attempt to reset head
  drm/i915: announce to userspace that the bsd ring is coherent
  agp/intel: Fix wrong kunmap in i830_cleanup()
  drm/i915: Factor in pixel-repeat in FDI M/N calculation
  drm/i915: Death to the unnecessary 64bit divide
  drm/i915: Clean conflicting modesetting registers upon init
  drm/i915: Apply a workaround for transitioning from DP on pipe B to HDMI.
  drm/i915: Always set the DP transcoder config to 8BPC.

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Wed, 8 Dec 2010 14:34:02 +0000 (06:34 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: wacom - add new Bamboo PT (0xdb)
  Input: add input driver for polled GPIO buttons
  Input: turbografx - fix reference counting
  Input: synaptics - fix handling of 2-button ClickPads
  Input: wacom - add IDs for two new Bamboo PTs
  Input: document struct input_absinfo
  Input: add keycodes for touchpad on/off keys
  Input: usbtouchscreen - add support for LG Flatron T1710B

13 years agodrm/nv04-nv40: Fix up PCI(E) GART DMA object bus address calculation.
Francisco Jerez [Wed, 8 Dec 2010 01:37:12 +0000 (02:37 +0100)]
drm/nv04-nv40: Fix up PCI(E) GART DMA object bus address calculation.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/i915: i915 cannot provide switcher services.
Dave Airlie [Mon, 6 Dec 2010 02:42:46 +0000 (12:42 +1000)]
drm/i915: i915 cannot provide switcher services.

it has a DSM but the switcher is done via WMI.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoInput: wacom - add new Bamboo PT (0xdb)
David Foley [Wed, 8 Dec 2010 05:05:59 +0000 (21:05 -0800)]
Input: wacom - add new Bamboo PT (0xdb)

Adds new Bamboo Pen & Touch model - Bamboo P & T Special Edition
Medium (CTH661/L; Product ID = 0xdb).

Tested-by: Tobias Verbeke <tobias.verbeke@gmail.com>
Signed-off-by: David Foley <favux.is@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agodrm/nouveau: kick vram functions out into an "engine"
Ben Skeggs [Mon, 6 Dec 2010 05:28:54 +0000 (15:28 +1000)]
drm/nouveau: kick vram functions out into an "engine"

NVC0 will be able to share some of nv50's paths this way.  This also makes
it the card-specific vram code responsible for deciding if a given set
of tile_flags is valid, rather than duplicating the allowed types in
nv50_vram.c and nouveau_gem.c

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: allow gpuobj vinst to be a virtual address when necessary
Ben Skeggs [Mon, 22 Nov 2010 00:48:51 +0000 (10:48 +1000)]
drm/nouveau: allow gpuobj vinst to be a virtual address when necessary

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: tidy up PCIEGART implementation
Ben Skeggs [Tue, 16 Nov 2010 00:13:05 +0000 (10:13 +1000)]
drm/nv50: tidy up PCIEGART implementation

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: enable non-contig vram allocations where requested
Ben Skeggs [Fri, 12 Nov 2010 05:13:59 +0000 (15:13 +1000)]
drm/nv50: enable non-contig vram allocations where requested

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: enable 4KiB pages for small vram allocations
Ben Skeggs [Fri, 12 Nov 2010 05:12:51 +0000 (15:12 +1000)]
drm/nv50: enable 4KiB pages for small vram allocations

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: implement global channel address space on new VM code
Ben Skeggs [Mon, 15 Nov 2010 01:54:21 +0000 (11:54 +1000)]
drm/nv50: implement global channel address space on new VM code

As of this commit, it's guaranteed that if an object is in VRAM that its
GPU virtual address will be constant.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: implement BAR1/BAR3 management on top of new VM code
Ben Skeggs [Mon, 15 Nov 2010 01:53:16 +0000 (11:53 +1000)]
drm/nv50: implement BAR1/BAR3 management on top of new VM code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: import new vm code
Ben Skeggs [Fri, 27 Aug 2010 00:00:25 +0000 (10:00 +1000)]
drm/nv50: import new vm code

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv50: implement custom vram mm
Ben Skeggs [Wed, 25 Aug 2010 05:26:04 +0000 (15:26 +1000)]
drm/nv50: implement custom vram mm

This is required on nv50 as we need to be able to have more precise control
over physical VRAM allocations to avoid buffer corruption when using
buffers of mixed memory types.

This removes some nasty overallocation/alignment that we were previously
using to "control" this problem.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Avoid potential race between nouveau_fence_update() and context takedown.
Francisco Jerez [Wed, 8 Dec 2010 01:35:45 +0000 (02:35 +0100)]
drm/nouveau: Avoid potential race between nouveau_fence_update() and context takedown.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: fix use of drm_mm_node in semaphore object
Ben Skeggs [Thu, 2 Dec 2010 23:05:20 +0000 (09:05 +1000)]
drm/nouveau: fix use of drm_mm_node in semaphore object

At some point in the future, this bo won't necessarily be backed by
a drm_mm_node, so use the start/size fields of the ttm_mem_reg instead.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: wrap calls to ttm_bo_validate()
Ben Skeggs [Sun, 21 Nov 2010 22:50:27 +0000 (08:50 +1000)]
drm/nouveau: wrap calls to ttm_bo_validate()

This will be used later to fixup bo.offset with a buffer's fixed GPU
virtual address.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: no need to zero dma objects, we fill them completely anyway
Ben Skeggs [Fri, 26 Nov 2010 00:32:22 +0000 (10:32 +1000)]
drm/nouveau: no need to zero dma objects, we fill them completely anyway

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: introduce a util function to wait on reg != val
Ben Skeggs [Fri, 19 Nov 2010 04:32:56 +0000 (14:32 +1000)]
drm/nouveau: introduce a util function to wait on reg != val

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: implicitly insert non-DMA objects into RAMHT
Ben Skeggs [Tue, 23 Nov 2010 00:10:24 +0000 (10:10 +1000)]
drm/nouveau: implicitly insert non-DMA objects into RAMHT

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: make fifo.create_context() responsible for mapping control regs
Ben Skeggs [Mon, 22 Nov 2010 06:05:54 +0000 (16:05 +1000)]
drm/nouveau: make fifo.create_context() responsible for mapping control regs

The regs belong to PFIFO, they're different for pretty much the same
generations we need different PFIFO control for, and NVC0 is going
to be even more different than the rest.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Spin for a bit in nouveau_fence_wait() before yielding the CPU.
Francisco Jerez [Thu, 25 Nov 2010 15:37:17 +0000 (16:37 +0100)]
drm/nouveau: Spin for a bit in nouveau_fence_wait() before yielding the CPU.

Sleeping doesn't pay off for very short delays in comparison with the
minimum granularity of schedule_timeout().

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Use WC memory on the AGP GART.
Francisco Jerez [Sat, 20 Nov 2010 21:11:22 +0000 (22:11 +0100)]
drm/nouveau: Use WC memory on the AGP GART.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nouveau: Synchronize with the user channel before GPU object destruction.
Francisco Jerez [Thu, 18 Nov 2010 22:57:46 +0000 (23:57 +0100)]
drm/nouveau: Synchronize with the user channel before GPU object destruction.

There have been reports of PFIFO cache errors during context take down
(fdo bug 31637). They are caused by some GPU objects being taken out
while the channel is still potentially processing commands. Make sure
that all the previous rendering has landed before releasing a GPU
object.

Reported-by: Grzesiek Sójka <pld@pfu.pl>
Reported-by: Patrice Mandin <patmandin@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv04-nv10: Don't re-enable FIFO access multiple times after IRQ dispatch.
Francisco Jerez [Sat, 20 Nov 2010 13:43:51 +0000 (14:43 +0100)]
drm/nv04-nv10: Don't re-enable FIFO access multiple times after IRQ dispatch.

nvxx_graph_isr is already taking care of it. In some cases this
could've made you miss PGRAPH interrupts (e.g. when you were supposed
to get several IRQs of the same kind in a row).

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agodrm/nv04-nv40: Give "gpuobj->cinst" the same meaning as on nv50.
Francisco Jerez [Sat, 20 Nov 2010 13:42:57 +0000 (14:42 +0100)]
drm/nv04-nv40: Give "gpuobj->cinst" the same meaning as on nv50.

No functional changes, just simplify some code paths a bit.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
13 years agoMerge branch 'fixes/2637-rc5/s3c24xx' of git://git.fluff.org/bjdooks/linux
Linus Torvalds [Wed, 8 Dec 2010 01:13:50 +0000 (17:13 -0800)]
Merge branch 'fixes/2637-rc5/s3c24xx' of git://git.fluff.org/bjdooks/linux

* 'fixes/2637-rc5/s3c24xx' of git://git.fluff.org/bjdooks/linux:
  ARM: S3C24XX: Fix mess with gpio {set,get}_pull callbacks
  ARM: mini2440: Fix Kconfig to allow kernel to build
  ARM: S3C2412: Fix typo in CONFIG_CPU_S3C2412_ONLY definition
  ARM: S3C2443: Select properly ARM core type
  ARM: SMDK2416: Select MACH_SMDK, S3C_DEV_NAND, S3C_DEV_USB_HOST

13 years agoARM: S3C24XX: Fix mess with gpio {set,get}_pull callbacks
Vasily Khoruzhick [Wed, 1 Dec 2010 06:29:23 +0000 (08:29 +0200)]
ARM: S3C24XX: Fix mess with gpio {set,get}_pull callbacks

Currently the {set,get}_pull callbacks of the s3c24xx_gpiocfg_default structure
are initalized via s3c_gpio_{get,set}pull_1up. This results in a linker
error when only CONFIG_CPU_S3C2442 is selected:

arch/arm/plat-s3c24xx/built-in.o:(.data+0x13f4): undefined reference to
`s3c_gpio_getpull_1up'
arch/arm/plat-s3c24xx/built-in.o:(.data+0x13f8): undefined reference to
`s3c_gpio_setpull_1up'

The s3c2442 has pulldowns instead of pullups compared to the s3c2440.
The method of controlling them is the same though.
So this patch modifies the existing s3c_gpio_{get,set}pull_1up helper functions
to take an additional parameter deciding whether the pin has a pullup or pulldown.
The s3c_gpio_{get,set}pull_1{down,up} functions then wrap that functions passing
either S3C_GPIO_PULL_UP or S3C_GPIO_PULL_DOWN.

Furthermore this patch sets up the s3c24xx_gpiocfg_default.{get,set}_pull fields
in the s3c244{0,2}_map_io function to the new pulldown helper functions.

Based on patch from "Lars-Peter Clausen" <lars@metafoo.de>

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
13 years agodrm/radeon/kms: fix vram base calculation on rs780/rs880
Alex Deucher [Fri, 3 Dec 2010 19:37:22 +0000 (14:37 -0500)]
drm/radeon/kms: fix vram base calculation on rs780/rs880

Avoid overflowing a 32 bit value.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: fix formatting of vram and gtt info
Alex Deucher [Fri, 3 Dec 2010 19:37:21 +0000 (14:37 -0500)]
drm/radeon/kms: fix formatting of vram and gtt info

print the full 64 bit values.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm/radeon/kms: forbid big bo allocation (fdo 31708) v3
Jerome Glisse [Fri, 3 Dec 2010 21:38:19 +0000 (16:38 -0500)]
drm/radeon/kms: forbid big bo allocation (fdo 31708) v3

Forbid allocating buffer bigger than visible VRAM or GTT, also
properly set lpfn field.

v2 - use max macro
   - silence warning
v3 - don't explicitly set range limit
   - use min macro

Cc: stable <stable@kernel.org>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: Don't try and disable an encoder that was never enabled
Chris Wilson [Mon, 6 Dec 2010 11:24:07 +0000 (11:24 +0000)]
drm: Don't try and disable an encoder that was never enabled

Prevents code that assumes that the encoder is active when asked to be
disabled from dying a horrible death.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agodrm: Add missing drm_vblank_put() along queue vblank error path
Chris Wilson [Wed, 1 Dec 2010 19:41:31 +0000 (19:41 +0000)]
drm: Add missing drm_vblank_put() along queue vblank error path

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoMerge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle...
Dave Airlie [Tue, 7 Dec 2010 23:30:59 +0000 (09:30 +1000)]
Merge branch 'drm-intel-fixes' of git://git./linux/kernel/git/ickle/drm-intel into drm-fixes

13 years agodrm/i915: Disable renderctx powersaving support for Ironlake
Chris Wilson [Tue, 7 Dec 2010 23:04:14 +0000 (23:04 +0000)]
drm/i915: Disable renderctx powersaving support for Ironlake

... still causes a failure during suspend.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoMerge branch 'drm-intel-fixes' into drm-intel-next
Chris Wilson [Tue, 7 Dec 2010 23:00:20 +0000 (23:00 +0000)]
Merge branch 'drm-intel-fixes' into drm-intel-next

Conflicts:
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_dp.c

13 years agodrm/i915/dp: Only apply the workaround if the select is still active
Chris Wilson [Mon, 6 Dec 2010 11:20:45 +0000 (11:20 +0000)]
drm/i915/dp: Only apply the workaround if the select is still active

As we may try to power down the link at various times, it is not
necessarily still coupled with an encoder and so we must be careful not
to depend upon an operation that is only valid when the link is still
attached to a pipe.

Fixes regression in 5bddd17.

Reported-and-tested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org [after applying 5bddd17]
13 years agoMN10300: Fix interrupt mask alteration function call name in gdbstub
David Howells [Tue, 7 Dec 2010 17:41:40 +0000 (17:41 +0000)]
MN10300: Fix interrupt mask alteration function call name in gdbstub

Fix the name of interrupt mask alteration function (ie the
local_change_intr_mask_level() fn) called in gdbstub to have an arch_
prefix to match the definition in asm/irqflags.h.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Tue, 7 Dec 2010 16:14:28 +0000 (08:14 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix incorrect proc spurious output

13 years agoMerge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platf...
Linus Torvalds [Tue, 7 Dec 2010 16:14:04 +0000 (08:14 -0800)]
Merge branch 'for_linus' of git://git./linux/kernel/git/mjg59/platform-drivers-x86

* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86:
  wmi: use memcmp instead of strncmp to compare GUIDs
  ACPI, hp-wmi: Fix memory leak in acpi query
  msi-wmi: fix semantically incorrect use of keycode instead of scancode
  msi-wmi: Add mute key support
  asus-laptop: add wimax and wwan support
  eeepc-wmi: fix compiler warning
  ibm_rtl: _RTL_ is not available in UEFI mode
  ibm_rtl: Loosen the DMI criteria to all IBM machines
  drivers/platform/x86/thinkpad_acpi.c: delete double assignment
  eeepc-wmi: add cpufv sysfs documentation
  toshiba_acpi.c: Add key_entry for a lone FN keypress
  ibm_rtl: fix printk format warning

13 years agoMerge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
Linus Torvalds [Tue, 7 Dec 2010 16:04:08 +0000 (08:04 -0800)]
Merge branch 'for-linus' of git://git390.marist.edu/linux-2.6

* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6:
  [S390] css: fix rsid evaluation for 2nd crw
  [S390] nohz/s390: fix arch_needs_cpu() return value on offline cpus

13 years agoautofs4 - remove ioctl mutex (bz23142)
Ian Kent [Tue, 7 Dec 2010 05:04:00 +0000 (13:04 +0800)]
autofs4 - remove ioctl mutex (bz23142)

With the recent changes to remove the BKL a mutex was added to the
ioctl entry point for calls to the old ioctl interface. This mutex
needs to be removed because of the need for the expire ioctl to call
back to the daemon to perform a umount and receive a completion
status (via another ioctl).

This should be fine as the new ioctl interface uses much of the same
code and it has been used without a mutex for around a year without
issue, as was the original intention.

Ref: Bugzilla bug 23142

Signed-off-by: Ian Kent <raven@themaw.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm/i915: Emit a request to clear a flushed and idle ring for unbusy bo
Chris Wilson [Tue, 7 Dec 2010 10:38:40 +0000 (10:38 +0000)]
drm/i915: Emit a request to clear a flushed and idle ring for unbusy bo

In order for bos to retire eventually, a request must be sent down the
ring. This is expected, for example, by occlusion queries for which mesa
will wait upon (whilst running glean) before issuing more batches and so
the normal activity upon the ring is suspended and we need to emit a
request to clear the idle ring.

Reported-by: Jinjin, Wang <jinjin.wang@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30380
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoLinux 2.6.37-rc5 v2.6.37-rc5
Linus Torvalds [Tue, 7 Dec 2010 04:09:04 +0000 (20:09 -0800)]
Linux 2.6.37-rc5

13 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec...
Linus Torvalds [Tue, 7 Dec 2010 04:08:25 +0000 (20:08 -0800)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/jlbec/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2:
  ocfs2_connection_find() returns pointer to bad structure
  ocfs2: char is not always signed
  Ocfs2: Stop tracking a negative dentry after dentry_iput().
  ocfs2: fix memory leak
  fs/ocfs2/dlm: Use GFP_ATOMIC under spin_lock

13 years agoARM: tegra: fix regression from addruart rewrite
Olof Johansson [Tue, 7 Dec 2010 01:36:32 +0000 (19:36 -0600)]
ARM: tegra: fix regression from addruart rewrite

Commit 0ea129300982 ("arm: return both physical and virtual addresses
from addruart") took out the test for MMU on/off but didn't switch the
ldr instructions to no longer be conditionals based on said test.

Fix that.

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoInput: add input driver for polled GPIO buttons
Gabor Juhos [Tue, 7 Dec 2010 01:14:47 +0000 (17:14 -0800)]
Input: add input driver for polled GPIO buttons

The existing gpio-keys driver can be usable only for GPIO lines with
interrupt support. Several devices have buttons connected to a GPIO
line which is not capable to generate interrupts. This patch adds a
new input driver using the generic GPIO layer and the input-polldev
to support such buttons.

[Ben Gardiner <bengardiner@nanometrics.ca: fold code to use more
 of the original gpio_keys infrastructure; cleanups and other
 improvements.]

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
13 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
Linus Torvalds [Mon, 6 Dec 2010 23:51:14 +0000 (15:51 -0800)]
Merge branch 'pm-fixes' of git://git./linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix memory corruption related to swap
  PM / Hibernate: Use async I/O when reading compressed hibernation image

13 years agoPM / Hibernate: Fix memory corruption related to swap
Rafael J. Wysocki [Fri, 3 Dec 2010 21:57:45 +0000 (22:57 +0100)]
PM / Hibernate: Fix memory corruption related to swap

There is a problem that swap pages allocated before the creation of
a hibernation image can be released and used for storing the contents
of different memory pages while the image is being saved.  Since the
kernel stored in the image doesn't know of that, it causes memory
corruption to occur after resume from hibernation, especially on
systems with relatively small RAM that need to swap often.

This issue can be addressed by keeping the GFP_IOFS bits clear
in gfp_allowed_mask during the entire hibernation, including the
saving of the image, until the system is finally turned off or
the hibernation is aborted.  Unfortunately, for this purpose
it's necessary to rework the way in which the hibernate and
suspend code manipulates gfp_allowed_mask.

This change is based on an earlier patch from Hugh Dickins.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-by: Ondrej Zary <linux@rainbow-software.org>
Acked-by: Hugh Dickins <hughd@google.com>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: stable@kernel.org
13 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 6 Dec 2010 22:49:51 +0000 (14:49 -0800)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  ARM: 6524/1: GIC irq desciptor bug fix
  ARM: 6523/1: iop: ensure sched_clock() is notrace
  ARM: 6456/1: Fix for building DEBUG with sa11xx_base.c as a module.
  ARM: 6519/1: kuser: Fix incorrect cmpxchg syscall in kuser helpers
  ARM: 6505/1: kprobes: Don't HAVE_KPROBES when CONFIG_THUMB2_KERNEL is selected
  ARM: 6508/1: vexpress: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
  ARM: 6507/1: RealView: Correct data alignment in headsmp.S for CONFIG_THUMB2_KERNEL
  ARM: 6504/1: Thumb-2: Fix long-distance conditional branches in head.S for Thumb-2.
  ARM: 6503/1: Thumb-2: Restore sensible zImage header layout for CONFIG_THUMB2_KERNEL
  ARM: 6502/1: Thumb-2: Fix CONFIG_THUMB2_KERNEL breakage in compressed/head.S
  ARM: 6501/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S
  ARM: 6500/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in kernel/head.S
  ARM: 6499/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in bootp/init.S
  ARM: 6498/1: vfp: Correct data alignment for CONFIG_THUMB2_KERNEL
  ARM: 6497/1: kexec: Correct data alignment for CONFIG_THUMB2_KERNEL
  ARM: 6496/1: GIC: Do not try to register more then NR_IRQS interrupts
  ARM: cns3xxx: Fix build with CONFIG_PCI=y

13 years agoPM / Hibernate: Use async I/O when reading compressed hibernation image
Bojan Smojver [Thu, 25 Nov 2010 22:41:39 +0000 (23:41 +0100)]
PM / Hibernate: Use async I/O when reading compressed hibernation image

This is a fix for reading LZO compressed image using async I/O.
Essentially, instead of having just one page into which we keep
reading blocks from swap, we allocate enough of them to cover the
largest compressed size and then let block I/O pick them all up. Once
we have them all (and here we wait), we decompress them, as usual.
Obviously, the very first block we still pick up synchronously,
because we need to know the size of the lot before we pick up the
rest.

Also fixed the copyright line, which I've forgotten before.

Signed-off-by: Bojan Smojver <bojan@rexursive.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
13 years agowmi: use memcmp instead of strncmp to compare GUIDs
Thadeu Lima de Souza Cascardo [Sun, 28 Nov 2010 21:46:50 +0000 (19:46 -0200)]
wmi: use memcmp instead of strncmp to compare GUIDs

While looking for the duplicates in /sys/class/wmi/, I couldn't find
them. The code that looks for duplicates uses strncmp in a binary GUID,
which may contain zero bytes. The right function is memcmp, which is
also used in another section of wmi code.

It was finding 49142400-C6A3-40FA-BADB-8A2652834100 as a duplicate of
39142400-C6A3-40FA-BADB-8A2652834100. Since the first byte is the fourth
printed, they were found as equal by strncmp.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: stable@kernel.org
13 years agoperf record: Fix eternal wait for stillborn child
Arnaldo Carvalho de Melo [Mon, 6 Dec 2010 17:13:38 +0000 (15:13 -0200)]
perf record: Fix eternal wait for stillborn child

When execvp fails to find the specified command on the path we won't get
SIGCHLD, so send a SIGUSR1 and exit right away.

Current situation would require a SIGINT performed by the user and would
produce meaningless summary.

Now:

[acme@emilia linux]$ ./foo
-bash: ./foo: No such file or directory
[acme@emilia linux]$ perf record ./foo
./foo: No such file or directory
[acme@emilia linux]$

Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
13 years agoMerge branch 'for-rmk-fixes' of git://git.infradead.org/users/cbou/linux-cns3xxx
Russell King [Mon, 6 Dec 2010 15:39:23 +0000 (15:39 +0000)]
Merge branch 'for-rmk-fixes' of git://git.infradead.org/users/cbou/linux-cns3xxx

13 years agodrm/i915: Wait for the bo if a display flip is pipelined on the other ring
Chris Wilson [Mon, 6 Dec 2010 14:36:27 +0000 (14:36 +0000)]
drm/i915: Wait for the bo if a display flip is pipelined on the other ring

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Only emit a flush if there is an outstanding gpu write
Chris Wilson [Mon, 6 Dec 2010 14:36:02 +0000 (14:36 +0000)]
drm/i915: Only emit a flush if there is an outstanding gpu write

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoARM: 6524/1: GIC irq desciptor bug fix
Chao Xie [Mon, 6 Dec 2010 06:01:10 +0000 (07:01 +0100)]
ARM: 6524/1: GIC irq desciptor bug fix

gic_set_cpu will directly use irq_desc[]. If CONFIG_SPARSE_IRQ is
enabled, there is no irq_desc[]. So we need use irq_to_desc(irq) to
get the descriptor for irq.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
13 years agoMerge branch 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg...
Linus Torvalds [Mon, 6 Dec 2010 00:45:02 +0000 (16:45 -0800)]
Merge branch 'slab/urgent' of git://git./linux/kernel/git/penberg/slab-2.6

* 'slab/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6:
  slub: Fix a crash during slabinfo -v

13 years agoMerge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuil...
Linus Torvalds [Mon, 6 Dec 2010 00:41:13 +0000 (16:41 -0800)]
Merge branch 'rc-fixes' of git://git./linux/kernel/git/mmarek/kbuild-2.6

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
  initramfs: Really fix build break on symbol-prefixed archs
  [media] Fix Kconfig errors due to two visible menus
  i2c/algos: convert Kconfig to use the menu's `visible' keyword
  media/video: convert Kconfig to use the menu's `visible' keyword
  Revert "i2c: Fix Kconfig dependencies"
  kconfig: regen parser
  kconfig: add an option to determine a menu's visibility

13 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Mon, 6 Dec 2010 00:40:31 +0000 (16:40 -0800)]
Merge branch 'fixes' of git://git./linux/kernel/git/kyle/parisc-2.6

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: Fix GSC PS/2 driver name for keyboard and mouse
  parisc: KittyHawk LCD fix
  parisc: convert the rest of the irq handlers to simple/percpu
  parisc: fix dino/gsc interrupts
  parisc: remove redundant initialization in sigsegv path of sys_rt_sigreturn

13 years agoRevert "vfs: show unreachable paths in getcwd and proc"
Eric W. Biederman [Sun, 5 Dec 2010 23:51:21 +0000 (15:51 -0800)]
Revert "vfs: show unreachable paths in getcwd and proc"

Because it caused a chroot ttyname regression in 2.6.36.

As of 2.6.36 ttyname does not work in a chroot.  It has already been
reported that screen breaks, and for me this breaks an automated
distribution testsuite, that I need to preserve the ability to run the
existing binaries on for several more years.  glibc 2.11.3 which has a
fix for this is not an option.

The root cause of this breakage is:

    commit 8df9d1a4142311c084ffeeacb67cd34d190eff74
    Author: Miklos Szeredi <mszeredi@suse.cz>
    Date:   Tue Aug 10 11:41:41 2010 +0200

    vfs: show unreachable paths in getcwd and proc

    Prepend "(unreachable)" to path strings if the path is not reachable
    from the current root.

    Two places updated are
     - the return string from getcwd()
     - and symlinks under /proc/$PID.

    Other uses of d_path() are left unchanged (we know that some old
    software crashes if /proc/mounts is changed).

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
So remove the nice sounding, but ultimately ill advised change to how
/proc/fd symlinks work.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrm/i915: Completely disable fence pipelining.
Chris Wilson [Sun, 5 Dec 2010 21:04:18 +0000 (21:04 +0000)]
drm/i915: Completely disable fence pipelining.

I'm still seeing tiling corruption of PutImage and CopyArea (I think)
under mutter on pnv, so obviously the pipelining logic is deeply flawed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Uncouple render/power ctx before suspending
Chris Wilson [Sun, 5 Dec 2010 17:27:06 +0000 (17:27 +0000)]
drm/i915: Uncouple render/power ctx before suspending

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Ignore fenced commands for gpu access on gen4
Chris Wilson [Sun, 5 Dec 2010 17:11:54 +0000 (17:11 +0000)]
drm/i915: Ignore fenced commands for gpu access on gen4

Userspace should not have been declaring that it needed fenced GPU
access with gen4+ as those GPUs have no fenced commands, but to be on
the safe side it is easier to ignore userspace in case they did.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: caps.has_rc6 is no longer used, remove it.
Chris Wilson [Sun, 5 Dec 2010 16:49:51 +0000 (16:49 +0000)]
drm/i915: caps.has_rc6 is no longer used, remove it.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Power Context register is only available for gen4 mobiles
Chris Wilson [Sun, 5 Dec 2010 16:45:02 +0000 (16:45 +0000)]
drm/i915: Power Context register is only available for gen4 mobiles

The ability to save the hardware context upon powering down the render
clock through PWRCTXA is only available on a couple of gen4 chipsets.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915: Avoid using PIPE_CONTROL on Ironlake
Chris Wilson [Sun, 5 Dec 2010 15:08:31 +0000 (15:08 +0000)]
drm/i915: Avoid using PIPE_CONTROL on Ironlake

The workaround is hideous and we are using the STORE_DWORD on all other
generations on all other rings, so use for the gen5 render ring as
well.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/lvds: Always restore panel-fitter when enabling the LVDS
Chris Wilson [Sun, 5 Dec 2010 19:21:18 +0000 (19:21 +0000)]
drm/i915/lvds: Always restore panel-fitter when enabling the LVDS

Linus Torvalds pointed out that our code was unbalanced when powering on
the panel with respect to the power off sequence in that we were failing
to restore the panel-fitter. The consequence of this would be that
across a simple DPMS off/on for a non-native mode, without an intervening
modeset, the panel fitter would remain disabled and the output would shift
on the panel.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodrm/i915/ringbuffer: Only print an error on the second attempt to reset head
Chris Wilson [Sun, 5 Dec 2010 20:42:33 +0000 (20:42 +0000)]
drm/i915/ringbuffer: Only print an error on the second attempt to reset head

There's not much we can do here but hope for the best. However the first
failure happens quite frequently and if often remedied by the second
attempt to reset HEAD. So only print the error if that attempt also
fails.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=19802
Reported-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
13 years agodrm/i915/dp: Trivial code tidy
Chris Wilson [Sun, 5 Dec 2010 14:54:05 +0000 (14:54 +0000)]
drm/i915/dp: Trivial code tidy

Locally scope the crtc to where it is used.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>