Chris Wilson [Mon, 19 Jul 2010 20:46:08 +0000 (21:46 +0100)]
drm/i915: Warn if we run out of FIFO space for a mode
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 19 Jul 2010 18:59:52 +0000 (19:59 +0100)]
drm/i915: Round up the watermark entries (v3)
Even though "we have enough padding that it should be ok", round up the
watermark entries to the next unit to be on the safe side...
v2: Use the DIV_ROUND_UP macro
v3: Spotted a few more missing round-ups.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Tue, 13 Jul 2010 12:52:17 +0000 (13:52 +0100)]
drm/i915: Typo in (unused) register mask for overlay.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 12 Jul 2010 18:35:38 +0000 (19:35 +0100)]
drm/i915: Check overlay stride errata for i830 and i845
Apparently i830 and i845 cannot handle any stride that is not a multiple
of 256, unlike their brethren which do support 64 byte aligned strides.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Mon, 19 Jul 2010 08:43:14 +0000 (09:43 +0100)]
drm/i915: Validate the mode for eDP by using fixed panel size
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Mon, 19 Jul 2010 08:43:13 +0000 (09:43 +0100)]
drm/i915: Always use the fixed panel timing for eDP
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Mon, 19 Jul 2010 08:43:12 +0000 (09:43 +0100)]
drm/i915: Enable panel fitting for eDP
When trying to set other display mode besides the fixed panel mode, the
panel fitting should be enabled. This is similar to LVDS.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Mon, 19 Jul 2010 08:43:11 +0000 (09:43 +0100)]
drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:32 +0000 (14:46 -0400)]
drm/i915/sdvo: Set sync polarity based on actual mode
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:31 +0000 (14:46 -0400)]
drm/i915/hdmi: Set sync polarity based on actual mode
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:30 +0000 (14:46 -0400)]
drm/i915/pch: Set transcoder sync polarity for DP based on actual mode
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:29 +0000 (14:46 -0400)]
drm/i915: Initialize LVDS and eDP outputs before anything else
This makes them sort to the front in X, which makes them likely to be
the primary outputs if you haven't specified a preference in your DE,
which is likely to be what you want.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:28 +0000 (14:46 -0400)]
drm/i915/dp: Correctly report eDP in the core connector type
Do this for both real eDP and for PCH_DP_D when used as the eDP
connection.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 16 Jul 2010 18:46:27 +0000 (14:46 -0400)]
drm/i915/dp: Rename has_edp to is_pch_edp to reflect its real meaning
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 18 Jul 2010 11:05:54 +0000 (12:05 +0100)]
drm/i915: Refactor panel fitting on the LVDS. (v2)
Move the common routines into separate functions to not only increase
readability, but also throwaway surplus code.
In doing so, we review the calculation of the aspect preserving scaling
and avoid the use of fixed-point until we need to calculate the accurate
scale factor.
v2: Improve comments as suggested by Jesse.
1 files changed, 105 insertions(+), 194 deletions(-)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sat, 17 Jul 2010 12:38:43 +0000 (13:38 +0100)]
drm/i915: Remove the redundant check for a fixed_panel_mode
We already checked just a couple of lines above that we have found a
fixed_panel_mode for the LVDS, so remove the surplus check.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Wed, 21 Jul 2010 20:57:47 +0000 (13:57 -0700)]
drm/i915: apply DP bandwidth workaround for PCH eDP as well
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29141 though the
workaround itself is still a bit of a mystery.
Tested-by: Adam Hill <sidepipeuk@yahoo.co.uk>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sat, 24 Jul 2010 17:29:37 +0000 (18:29 +0100)]
agp/intel: Destroy the scatterlist on allocation failure
A side-effect of being able to use custom page allocations with the
sg_table is that it cannot reap the partially constructed scatterlist if
fails to allocate a page. So we need to call sg_free_table() ourselves
if sg_alloc_table() fails.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc Dave Airlie <airlied@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt [Mon, 2 Aug 2010 02:23:53 +0000 (19:23 -0700)]
Merge remote branch 'origin/master' into drm-intel-next
This resolves the conflict in the EDP code, which has been rather
popular to hack on recently.
Conflicts:
drivers/gpu/drm/i915/intel_dp.c
Zhenyu Wang [Fri, 9 Jul 2010 17:45:17 +0000 (10:45 -0700)]
agp/intel: Add actual definitions of the Sandybridge PTE caching bits.
Zhenyu Wang [Fri, 9 Jul 2010 17:40:58 +0000 (10:40 -0700)]
agp/intel: Support the extended physical addressing bits on Sandybridge.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
[anholt: Split this patch out of a larger patch for Sandybridge fixes]
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 5 Jul 2010 17:01:47 +0000 (18:01 +0100)]
drm/i915: Include any alternate names by which the device is known.
When trying to keep track of features between the kernel, the 2D driver,
mesa and the specs, it helps to list any other name by which the device
is referred to.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 5 Jul 2010 17:01:46 +0000 (18:01 +0100)]
drm/i915: Use 128k alignment for untiled display surface on i965 (v2)
The original i965, including the revised G35 and Q35, requires an
alignment of 128K for the display surface with linear memory, so
increase the requirement from 64k for these chipsets. For the later
chipsets in the i965 family, only a 4k alignment is required. (So
long as we do not start performing asynchronous flips.)
Note the impact of this should be slight as on i965 we should be using a
tiled frontbuffer for anything up to a 4096x4096 display.
v2: compilation fixes and note that the docs do not exclude the G35 from
the extra alignment.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Adam Jackson [Fri, 25 Jun 2010 19:32:14 +0000 (15:32 -0400)]
drm/i915/pch: Cosmetic fix to FDI link training
Unmask the bits for link training reporting before starting link
training. If stage 1 training finished before we unmask them, then we'd
spin around in a loop a few times until smashing on through. Which is
harmless, since training _did_ succeed, it just looks ugly in dmesg.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Dan Carpenter [Wed, 23 Jun 2010 17:29:54 +0000 (19:29 +0200)]
drm/i915: cleanup: use ARRAY_SIZE()
NUM_TV_MODES is the same as ARRAY_SIZE(tv_modes). In the end, I
decided it was cleaner to remove NUM_TV_MODES and just use
ARRAY_SIZE(tv_modes) through out.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 11:16:24 +0000 (12:16 +0100)]
drm/i915: Include instdone[1] in hangcheck
References:
Bug 26691 - Spurious hangcheck whilst executing a long shader over a
large vertex buffer
https://bugs.freedesktop.org/show_bug.cgi?id=26691
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 12:21:26 +0000 (13:21 +0100)]
drm/i915: Remove the WARN when failing to set tiling.
We generally issue an error message at the point of failure, and so this
warning with a fairly pointless stacktrace is superfluous and ugly.
Needless to say, the common trigger for this WARN happens to be EIO
where this is pure noise.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Wed, 7 Jul 2010 21:06:43 +0000 (14:06 -0700)]
drm/i915: fix FDI frequency check
Since mode->clock is in kHz we should be checking against 2700000
instead of just 27000. This patch gets my x201s working again (well
working as well as it ever was anyway).
When looking for this I also noticed we set link_bw to 270000, but the
calculation is different. Does it also need to use kHz or we using
10kHz internally?
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 14:40:23 +0000 (15:40 +0100)]
drm/i915: Sparse warning about invalid value for burst_ena in tv_modes
drivers/gpu/drm/i915/intel_tv.c|479 col 16| warning: cast truncates bits
from constant value (8 becomes 0)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 14:40:22 +0000 (15:40 +0100)]
drm/i915: Sparse warns about the incorrect sign for storing bit17
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 14:40:20 +0000 (15:40 +0100)]
drm/i915: Silence sparse over non-static local structure.
drivers/gpu/drm/i915/i915_drv.c|485 col 25| warning: symbol 'i915_pm_ops' was not declared. Should it be static?
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 14:40:19 +0000 (15:40 +0100)]
drm/i915: Silence sparse over duplicate members in static initializer
drivers/gpu/drm/i915/i915_drv.c|100 col 18| warning: Initializer entry defined twice
drivers/gpu/drm/i915/i915_drv.c|101 col 3| also defined here
drivers/gpu/drm/i915/i915_drv.c|117 col 18| warning: Initializer entry defined twice
drivers/gpu/drm/i915/i915_drv.c|118 col 3| also defined here
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Sun, 6 Jun 2010 14:40:18 +0000 (15:40 +0100)]
drm/i915: Silence sparse complaints over insufficient bitfield int types.
drivers/gpu/drm/i915/i915_drv.h|676 col 19| warning: dubious bitfield without explicit `signed' or `unsigned'
drivers/gpu/drm/i915/i915_drv.h|712 col 19| warning: dubious bitfield without explicit `signed' or `unsigned'
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 7 Jun 2010 13:03:05 +0000 (14:03 +0100)]
drm/i915: Propagate error from i915_gem_object_flush_gpu_write_domain()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 7 Jun 2010 13:03:04 +0000 (14:03 +0100)]
drm/i915: Propagate error from drm_vblank_get() during page-flipping.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Mon, 7 Jun 2010 13:03:03 +0000 (14:03 +0100)]
drm/i915: Propagate error from drm_install_irq() during EnterVT
Simple fix for error propagation along the old UMS path.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Nicolas Kaiser [Tue, 8 Jun 2010 19:18:06 +0000 (21:18 +0200)]
drm/i915: Typo in #define
checkpatch complains about this define:
WARNING: space prohibited between function name and open parenthesis '('
+#define GEN6_RENDER TIMEOUT_COUNTER_EXPIRED (1 << 6)
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Acked-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:27 +0000 (14:32 +0800)]
drm/i915: Add frame buffer compression support on Ironlake mobile
About 0.2W power can be saved on one HP laptop.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:26 +0000 (14:32 +0800)]
drm/i915: Calculate cursor watermark under non-SR state for Ironlake
The hardware team suggest that the "large buffer" method should be
used to calculate the cursor watermark under non-SR state as well,
which is to avoid the flicker when FBC is enabled on Ironlake.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:25 +0000 (14:32 +0800)]
drm/i915: Apply self-refresh watermark calculation for cursor plane
In SR mode cursor plane watermark calculation uses same formula
like display plane. This one fixes the case for 965G and G45.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:24 +0000 (14:32 +0800)]
drm/i915: Fix fifo size for self-refresh watermark on 965G
The total self-refresh fifo entry size for display plane is 512
instead of 128 for 965G. Also fix WM value mask for 965G.
About 1.0W power can be saved on one T61 laptop after the self-refresh
watermark is configured correctly.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:23 +0000 (14:32 +0800)]
drm/i915: Fix watermark calculation in self-refresh mode
For self-refresh mode WM calculation's "line time" should use
mode's htotal instead of hdisplay. "surface width" is the hdisplay
for display plane and 64 for cursor plane.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Zhao Yakui [Sat, 12 Jun 2010 06:32:21 +0000 (14:32 +0800)]
drm/i915: Add the support of eDP on DP-D for Ibex/CPT
This one adds support for eDP that connected on PCH DP-D port
instead of CPU DP-A port, and only DP-D port could be used for eDP.
https://bugs.freedesktop.org/show_bug.cgi?id=27220
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Jan-Hendrik Zab <jan@jhz.name>
Tested-by: Templar <templar@rshc.de>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Wed, 30 Jun 2010 20:16:00 +0000 (13:16 -0700)]
drm/i915: remove duplicate PIPE*STAT bit definitions
Having two sets has made me think I caught a bug more than once now.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Jesse Barnes [Wed, 30 Jun 2010 20:15:19 +0000 (13:15 -0700)]
drm/i915: remove unused vblank_enable var from i915_driver_irq_handler
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Ondrej Zary [Wed, 16 Jun 2010 08:13:52 +0000 (10:13 +0200)]
intel_agp: Don't oops with zero stolen memory
When "onboard video memory" is set do "disabled" in BIOS on Asus P4P800-VM
board (i865G), kernel oopses with memory corruption:
https://bugs.freedesktop.org/show_bug.cgi?id=28430
Fix that by cleanly aborting the initialization.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Chris Wilson [Fri, 2 Jul 2010 07:57:15 +0000 (08:57 +0100)]
drm/i915: Explosion following OOM in do_execbuffer.
Oops, when merging the extra details following an OOM, I missed that
driver_private is now NULL and the correct way to convert from the
drm_gem_object into the drm_i915_gem_object is to use to_intel_bo().
BUG: unable to handle kernel NULL pointer dereference at
00000069
IP: [<
c11a4a02>] i915_gem_do_execbuffer+0x71f/0xbb6
*pde =
00000000
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/vc/vcsa3/uevent
Pid: 10993, comm: X Not tainted 2.6.35-rc2+ #67 /
EIP: 0060:[<
c11a4a02>] EFLAGS:
00213202 CPU: 0
EIP is at i915_gem_do_execbuffer+0x71f/0xbb6
EAX:
f647e8a8 EBX:
00000000 ECX:
00000003 EDX:
00000000
ESI:
00424000 EDI:
00000000 EBP:
f6508e48 ESP:
f6508dd4
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process X (pid: 10993, ti=
f6508000 task=
f6432880 task.ti=
f6508000)
Stack:
f6508de0 f7130000 00000001 00000000 00000000 f647e8a8 00000000 f64f8480
<0>
f7974414 00000000 00000006 00000000 00000000 f6578000 00000008 00000006
<0>
f6797880 00400000 00000000 ffffffe4 f7974400 000000d0 000000d0 000001c0
Call Trace:
[<
c11a4f3a>] ? i915_gem_execbuffer2+0xa1/0xe7
[<
c118ab96>] ? drm_ioctl+0x22c/0x2fa
[<
c11a4e99>] ? i915_gem_execbuffer2+0x0/0xe7
[<
c107e88c>] ? do_sync_read+0x8f/0xca
[<
c1088cbd>] ? vfs_ioctl+0x2c/0x96
[<
c118a96a>] ? drm_ioctl+0x0/0x2fa
[<
c10891f4>] ? do_vfs_ioctl+0x429/0x45a
[<
c107e5c9>] ? fsnotify_access+0x54/0x5f
[<
c107ee1c>] ? vfs_read+0x9a/0xae
[<
c1089258>] ? sys_ioctl+0x33/0x4d
[<
c1002610>] ? sysenter_do_call+0x12/0x26
Code: d0 89 4d c4 31 c9 89 45 d8 eb 44 8b 45 cc 8b 14 88 8b 42 50 89 45
bc 8b 45 a0 8b 52 38 89 55 d0 31 d2 f6 40 20 01 74 0d 8b 55 bc <f6> 42
69 30 0f 95 c2 0f b6 d2 8b 45 d0 c7 45 d4 00 00 00 00 89
EIP: [<
c11a4a02>] i915_gem_do_execbuffer+0x71f/0xbb6 SS:ESP 0068:
f6508dd4
CR2:
0000000000000069
---[ end trace
3f1d514b34d39381 ]---
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Thomas Bächler [Fri, 2 Jul 2010 08:44:23 +0000 (10:44 +0200)]
gpu/drm/i915: Add a blacklist to omit modeset on LID open
On some machines (currently only the Toshiba Tecra A11 is known), the GPU
locks up when modeset is forced on LID open. This patch adds a new DMI
blacklist and omits modesetting for all matches.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15550
Signed-off-by: Thomas Bächler <thomas@archlinux.org>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Dave Airlie [Mon, 2 Aug 2010 00:31:47 +0000 (10:31 +1000)]
Merge remote branch 'nouveau/for-airlied' of ../drm-nouveau-next into drm-core-next
* 'nouveau/for-airlied' of ../drm-nouveau-next: (77 commits)
drm/nouveau: set TASK_(UN)INTERRUPTIBLE before schedule_timeout()
drm/nv50: fix some not-error error messages
drm/nouveau: introduce gpio engine
drm/nv50: correct wait condition for instmem flush
drm/nouveau: Fix TV-out detection on unposted cards lacking a usable DCB table.
drm/nouveau: Get rid of the remaining VGA CRTC locking.
drm/nouveau: Move display init to a new nouveau_engine.
drm/nouveau: Put back the old 2-messages I2C slave test.
drm/nouveau: Reset AGP before running the init scripts.
drm/nv30: Init the PFB+0x3xx memory timing regs.
drm/nouveau: disable hotplug detect around DP link training
drm/nv50: add function to control GPIO IRQ reporting
drm/nouveau: add nv_mask register accessor
drm/nouveau: fix build without CONFIG_ACPI
drm/nouveau: Reset CRTC owner to 0 before BIOS init.
drm/nouveau: No need to lock/unlock the VGA CRTC regs all the time.
drm/nouveau: Remove useless CRTC_OWNER logging.
drm/nouveau: Add some generic I2C gadget detection code.
drm/i2c/ch7006: Don't assume that the specified config points to static memory.
drm/nv04-nv3x: Implement init-compute-mem.
...
Conflicts:
drivers/gpu/drm/nouveau/nouveau_bios.c
Dave Airlie [Mon, 2 Aug 2010 00:24:46 +0000 (10:24 +1000)]
Merge branch 'drm-radeon-next' of ../drm-radeon-next into drm-core-next
* 'drm-radeon-next' of ../drm-radeon-next: (333 commits)
drm/radeon/kms: trivial code style fixes for audio
drm/radeon: remove viewport transform from r6xx/r7xx blit emit
drm/radeon: group r6xx/r7xx newly sequential blit state
drm/radeon: reorder r6xx/r7xx blit state emit to make more regs sequential
drm/radeon: r6xx/r7xx move vport clipping to a single packet
drm/radeon: group r6xx/r7xx sequential blit state
drm/radeon: remove duplicate state emit in r6xx/r7xx blit
drm/radeon: add comments to r6xx/r7xx blit state
drm/radeon/kms/r7xx: add workaround for hw issue with HDP flush
drm/radeon/kms: remove rs4xx gart limit
drm: radeon: fix sign bug
drm/radeon/kms: check/restore sanity before doing anything else with GPU.
drm/radeon: fall back to GTT if bo creation/validation in VRAM fails.
drm/radeon/kms: add ioport register access
drm/radeon/kms: enable HDMI audio on RS600/RS690/RS740
drm/radeon/kms: track audio engine state, do not use not setup timer
drm/radeon/kms/r6xx+: add query for tile config (v2)
drm/radeon/kms: fix CS alignment checking for tiling (v2)
drm/radeon/kms: add tiling support to the cs checker for r6xx/r7xx
drm/radeon/kms: Add crtc tiling setup support for evergreen
...
Francisco Jerez [Thu, 22 Jul 2010 15:06:18 +0000 (17:06 +0200)]
drm: Import driver for the sil164 I2C TMDS transmitter.
sil164 transmitters are used for DVI outputs on Intel/nvidia and ATI setups.
So far only nouveau can use this driver.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Tested-by: Patrice Mandin <patmandin@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Fri, 9 Jul 2010 14:47:28 +0000 (16:47 +0200)]
drm/sis: fixed brace and spacing coding style issues
Fixed brace and spacing coding style issues.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Mon, 12 Jul 2010 11:44:23 +0000 (13:44 +0200)]
drm/r128: fixed brace and spacing coding style issues
Fixed brace and spacing coding style issues.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Sun, 11 Jul 2010 23:46:57 +0000 (01:46 +0200)]
drm/mga: fixed brace, macro and spacing coding style issues
Fixed brace, macro and spacing coding style issues.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Sun, 11 Jul 2010 13:32:42 +0000 (15:32 +0200)]
drm/via: fixed coding style issues, simplified return
Fixed brace, macro and spacing coding style issues.
Simplified
-if (ret) return ret;
-return 0;
+return ret;
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Rafał Miłecki [Fri, 25 Jun 2010 19:24:20 +0000 (21:24 +0200)]
drm/radeon/kms: trivial code style fixes for audio
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Wed, 14 Jul 2010 22:14:43 +0000 (00:14 +0200)]
drm/i830: fixed brace and spacing coding style issues
Fixed brace and spacing coding style issues.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Nicolas Kaiser [Wed, 14 Jul 2010 19:54:13 +0000 (21:54 +0200)]
drm/i810: fixed coding style issues
Fixed brace, macro and spacing coding style issues, and a C99 comment.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chris Wilson [Sat, 24 Jul 2010 17:29:36 +0000 (18:29 +0100)]
drm: Free devname along with master->unique
The device name is tightly coupled and created at the same time as the
master->unique address, so we need to free it with the master. Currently
we overwrite it each time we create a new master:
unreferenced object 0xe32c54b0 (size 32):
comm "Xorg", pid 1455, jiffies
4294721798 (age 3196.879s)
hex dump (first 32 bytes):
69 39 31 35 40 70 63 69 3a 30 30 30 30 3a 30 30 i915@pci:0000:00
3a 30 32 2e 30 00 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 :02.0.kkkkkkkkk.
backtrace:
[<
c04e5657>] create_object+0x124/0x1f1
[<
c07cf0f0>] kmemleak_alloc+0x4c/0x90
[<
c04db84c>] __kmalloc+0x155/0x175
[<
f8316665>] drm_setversion+0x11d/0x1b1 [drm]
[<
f83148d4>] drm_ioctl+0x29a/0x356 [drm]
[<
c04f27c4>] vfs_ioctl+0x33/0x91
[<
c04f31cf>] do_vfs_ioctl+0x46b/0x496
[<
c04f3240>] sys_ioctl+0x46/0x66
[<
c040325f>] sysenter_do_call+0x12/0x38
[<
ffffffff>] 0xffffffff
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Chris Wilson [Sat, 24 Jul 2010 21:28:25 +0000 (22:28 +0100)]
drm: Free the idr layers before calling idr_destroy()
/* A typical clean-up sequence for objects stored in an idr tree, will
* use idr_for_each() to free all objects, if necessary, then
* idr_remove_all() to remove all ids, and idr_destroy() to free
* up the cached idr_layers.
*/
We were missing the vital idr_rmove_all() step and so were leaking
the used layers for every dri client:
unreferenced object 0xf32133c0 (size 148):
comm "plymouthd", pid 131, jiffies
4294678490 (age 2308.030s)
hex dump (first 32 bytes):
04 00 00 00 00 00 00 00 00 00 00 00 00 40 19 f3 .............@..
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<
c04e5657>] create_object+0x124/0x1f1
[<
c07cf100>] kmemleak_alloc+0x4c/0x90
[<
c04db6a9>] kmem_cache_alloc+0xee/0x13c
[<
c05c3d25>] idr_pre_get+0x24/0x61
[<
f8315c9c>] drm_gem_handle_create+0x27/0x7f [drm]
[<
f89925b2>] i915_gem_create_ioctl+0x4f/0x71 [i915]
[<
f83148ac>] drm_ioctl+0x272/0x356 [drm]
[<
c04f27c4>] vfs_ioctl+0x33/0x91
[<
c04f31cf>] do_vfs_ioctl+0x46b/0x496
[<
c04f3240>] sys_ioctl+0x46/0x66
[<
c040325f>] sysenter_do_call+0x12/0x38
[<
ffffffff>] 0xffffffff
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15803
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Kulikov Vasiliy [Mon, 26 Jul 2010 08:23:54 +0000 (12:23 +0400)]
drm/nouveau: set TASK_(UN)INTERRUPTIBLE before schedule_timeout()
set_current_state() is called only once before the first iteration.
After return from schedule_timeout() current state is TASK_RUNNING. If
we are going to wait again, set_current_state() must be called.
Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Chris Wilson [Sat, 24 Jul 2010 16:15:11 +0000 (17:15 +0100)]
drm/vmgfx: operation on ‘par->dirty.y1’ may be undefined
Trivial fix to set y1 = y2 = 0.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Tue, 27 Jul 2010 15:01:15 +0000 (11:01 -0400)]
drm/radeon: remove viewport transform from r6xx/r7xx blit emit
We aren't using it, so no need. Save additional dwords.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Tue, 27 Jul 2010 15:20:54 +0000 (11:20 -0400)]
drm/radeon: group r6xx/r7xx newly sequential blit state
group state that is emitted sequentially into fewer packets.
This saves a number of dwords.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Tue, 27 Jul 2010 15:17:44 +0000 (11:17 -0400)]
drm/radeon: reorder r6xx/r7xx blit state emit to make more regs sequential
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Mon, 26 Jul 2010 17:47:54 +0000 (13:47 -0400)]
drm/radeon: r6xx/r7xx move vport clipping to a single packet
Saves lots of dwords in blit emit
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Tue, 27 Jul 2010 22:57:06 +0000 (18:57 -0400)]
drm/radeon: group r6xx/r7xx sequential blit state
group state that is emitted sequentially into fewer packets.
This saves a number of dwords.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Tue, 27 Jul 2010 15:11:19 +0000 (11:11 -0400)]
drm/radeon: remove duplicate state emit in r6xx/r7xx blit
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Mon, 26 Jul 2010 16:39:00 +0000 (12:39 -0400)]
drm/radeon: add comments to r6xx/r7xx blit state
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Mon, 26 Jul 2010 22:51:53 +0000 (18:51 -0400)]
drm/radeon/kms/r7xx: add workaround for hw issue with HDP flush
Use of HDP_*_COHERENCY_FLUSH_CNTL can cause a hang in certain
situations. Add workaround.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Fri, 16 Jul 2010 14:39:16 +0000 (10:39 -0400)]
drm/radeon/kms: remove rs4xx gart limit
We used to limit the rs4xx gart aperture to 32 MB, but I suspect
that was due to not meeting the alignment requirements of the
aperture. This patch should only be applied after:
"drm/radeon/kms: fix gtt MC base alignment on rs4xx/rs690/rs740 asics"
has been applied.
This patch should probably soak for a bit in d-r-t.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Mon, 2 Aug 2010 00:05:18 +0000 (10:05 +1000)]
Merge tag 'v2.6.35-rc6' into drm-radeon-next
Need this to avoid conflicts with future radeon fixes
Dan Carpenter [Sat, 17 Jul 2010 10:28:02 +0000 (12:28 +0200)]
drm: radeon: fix sign bug
The "error" variable is unsigned so it's never less than zero. I
changed it to check if (freq < current_freq) directly.
"best_error" is also unsigned so "best_error - 100" could be a large
number instead of a negative. Since "error" is unsigned it is never
less than a negative and so the cases where "best_error" is less than or
equal to 100 are false.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Thu, 15 Jul 2010 02:13:50 +0000 (12:13 +1000)]
drm/radeon/kms: check/restore sanity before doing anything else with GPU.
On systems using kexec, the new kernel is booted straight from the old kernel, without any warning to the graphics driver. So the GPU is basically left as-is in a running state, however the CPU side is completly reset.
Without stating the saneness of anyone using kexec on live systems, we should at least try not to crash the GPU. This patch resets 3 registers to 0 that could cause bad things to happen to the running system.
This allows kexec to work on a Power6/RN50 system.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Michel Dänzer [Thu, 8 Jul 2010 02:43:28 +0000 (12:43 +1000)]
drm/radeon: fall back to GTT if bo creation/validation in VRAM fails.
This fixes a problem where on low VRAM cards we'd run out of space for validation.
[airlied: Tested on my M7, Thinkpad T42, compiz works with no problems.]
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Wed, 30 Jun 2010 15:52:50 +0000 (11:52 -0400)]
drm/radeon/kms: add ioport register access
This is required for the NB_MISC regs on rs780/rs880 which
means HDMI/DVI/DP ports using PCIEPHY won't work without
it. It might also help with s/r (asic init) issues on other
atombios cards.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28774
and similar issues reported by Alberto Milone.
[airlied: Squash io fix patch]
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Rafał Miłecki [Sat, 19 Jun 2010 10:24:57 +0000 (12:24 +0200)]
drm/radeon/kms: enable HDMI audio on RS600/RS690/RS740
We will need method of selecting encoder that should receive HDMI block. For
now we assign HDMI block to first enabled encoder. Hopefully there are not many
RS6x0 chips with two digital encoders.
[airlied: add RS740 checks as per Alex suggestion.]
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Rafał Miłecki [Sat, 19 Jun 2010 10:24:56 +0000 (12:24 +0200)]
drm/radeon/kms: track audio engine state, do not use not setup timer
This is needed to enable audio support on devices using polling. In case user
decides to disable audio (module parameter) we still will try to use timer in
r600_audio_enable_polling. This would lead to BUG in kernel/timer.c.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Fri, 4 Jun 2010 17:10:12 +0000 (13:10 -0400)]
drm/radeon/kms/r6xx+: add query for tile config (v2)
Userspace needs this information to access tiled
buffers via the CPU.
v2: rebased on evergreen accel changes
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Fri, 4 Jun 2010 22:41:42 +0000 (18:41 -0400)]
drm/radeon/kms: fix CS alignment checking for tiling (v2)
Covers depth, cb, and textures. Hopefully I got this right.
v2: - fix bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=28327
https://bugs.freedesktop.org/show_bug.cgi?id=28381
- use ALIGNED(), IS_ALIGNED() macros
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Thu, 20 May 2010 16:43:52 +0000 (12:43 -0400)]
drm/radeon/kms: add tiling support to the cs checker for r6xx/r7xx
Check for relocs for DB_DEPTH_INFO, CB_COLOR*_INFO, and texture
resources.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Thu, 20 May 2010 16:12:48 +0000 (12:12 -0400)]
drm/radeon/kms: Add crtc tiling setup support for evergreen
Needed for scanning out of a tiled buffer.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Thu, 20 May 2010 16:04:59 +0000 (12:04 -0400)]
drm/radeon/kms: Add crtc tiling setup support for r6xx/r7xx
Needed for scanning out of a tiled buffer.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Fri, 2 Jul 2010 16:58:16 +0000 (12:58 -0400)]
drm/radeon/kms: add support for internal thermal sensors (v3)
rv6xx/rv7xx/evergreen families supported; older asics did
not have an internal thermal sensor.
Note, not all oems use the internal thermal sensor, so it's
only exposed in cases where it is used.
Note also, that most laptops use an oem specific ACPI solution for
GPU thermal information rather than using the internal thermal
sensor directly.
v2: export millidegrees celsius, use hwmon device properly.
v3: fix Kconfig
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alberto Milone [Tue, 6 Jul 2010 15:40:24 +0000 (11:40 -0400)]
drm/radeon: Add support for the ATIF ACPI method to the radeon driver
By calling the ATIF method in the radeon driver we can make sure
that hotkeys such as the video switch key emit ACPI events when
pressed.
agd5f: fix warning
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Wed, 30 Jun 2010 18:58:59 +0000 (14:58 -0400)]
drm/radeon/kms/atom: bump atom loop timeout from 1 sec to 5 secs
Some tables have delays that can cause the timeout to hit
even when not intended.
Should fix:
https://bugs.freedesktop.org/show_bug.cgi?id=27744
and related bugs.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alex Deucher [Wed, 30 Jun 2010 16:13:55 +0000 (12:13 -0400)]
drm/radeon/kms: minor driver cleanups
- Make the logic in r100_pll_errata_after_index() match the other
errata functions
- Use rdev->family rather than rdev->flags & RADEON_FAMILY_MASK for kms
- replace rn50 check using ids with ASIC_IS_RN50 convenience macro
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Linus Torvalds [Sun, 1 Aug 2010 22:11:14 +0000 (15:11 -0700)]
Linux 2.6.35
Trond Myklebust [Sun, 1 Aug 2010 17:40:40 +0000 (13:40 -0400)]
NFS: Fix a typo in include/linux/nfs_fs.h
nfs_commit_inode() needs to be defined irrespectively of whether or not
we are supporting NFSv3 and NFSv4.
Allow the compiler to optimise away code in the NFSv2-only case by
converting it into an inlined stub function.
Reported-and-tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sat, 31 Jul 2010 02:02:51 +0000 (19:02 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
cyber2000fb: fix console in truecolor modes
cyber2000fb: fix machine hang on module load
SA1111: Eliminate use after free
ARM: Fix Versatile/Realview/VExpress MMC card detection sense
ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt
ARM: Add barriers to io{read,write}{8,16,32} accessors as well
ARM: 6273/1: Add barriers to the I/O accessors if ARM_DMA_MEM_BUFFERABLE
ARM: 6272/1: Convert L2x0 to use the IO relaxed operations
ARM: 6271/1: Introduce *_relaxed() I/O accessors
ARM: 6275/1: ux500: don't use writeb() in uncompress.h
ARM: 6270/1: clean files in arch/arm/boot/compressed/
ARM: Fix csum_partial_copy_from_user()
Linus Torvalds [Sat, 31 Jul 2010 02:02:21 +0000 (19:02 -0700)]
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: Ensure that writepage respects the nonblock flag
NFS: kswapd must not block in nfs_release_page
nfs: include space for the NUL in root path
Linus Torvalds [Sat, 31 Jul 2010 02:01:11 +0000 (19:01 -0700)]
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/edid: Fix the HDTV hack sync adjustment
drm/radeon/kms: fix radeon mid power profile reporting
Hugh Dickins [Fri, 30 Jul 2010 17:58:26 +0000 (10:58 -0700)]
mm: fix ia64 crash when gcore reads gate area
Debian's ia64 autobuilders have been seeing kernel freeze or reboot
when running the gdb testsuite (Debian bug 588574): dannf bisected to
2.6.32
62eede62dafb4a6633eae7ffbeb34c60dba5e7b1 "mm: ZERO_PAGE without
PTE_SPECIAL"; and reproduced it with gdb's gcore on a simple target.
I'd missed updating the gate_vma handling in __get_user_pages(): that
happens to use vm_normal_page() (nowadays failing on the zero page),
yet reported success even when it failed to get a page - boom when
access_process_vm() tried to copy that to its intermediate buffer.
Fix this, resisting cleanups: in particular, leave it for now reporting
success when not asked to get any pages - very probably safe to change,
but let's not risk it without testing exposure.
Why did ia64 crash with 16kB pages, but succeed with 64kB pages?
Because setup_gate() pads each 64kB of its gate area with zero pages.
Reported-by: Andreas Barth <aba@not.so.argh.org>
Bisected-by: dann frazier <dannf@debian.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Tested-by: dann frazier <dannf@dannf.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Fri, 30 Jul 2010 14:25:19 +0000 (15:25 +0100)]
CIFS: Remove __exit mark from cifs_exit_dns_resolver()
Remove the __exit mark from cifs_exit_dns_resolver() as it's called by the
module init routine in case of error, and so may have been discarded during
linkage.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ondrej Zary [Thu, 29 Jul 2010 20:40:54 +0000 (22:40 +0200)]
cyber2000fb: fix console in truecolor modes
Return value was not set to 0 in setcolreg() with truecolor modes. This causes
fb_set_cmap() to abort after first color, resulting in blank palette - and
blank console in 24bpp and 32bpp modes.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Ondrej Zary [Thu, 29 Jul 2010 20:32:20 +0000 (22:32 +0200)]
cyber2000fb: fix machine hang on module load
I was testing two CyberPro 2000 based PCI cards on x86 and the machine always
hanged completely when the cyber2000fb module was loaded. It seems that the
card hangs when some registers are accessed too quickly after writing RAMDAC
control register. With this patch, both card work.
Add delay after RAMDAC control register write to prevent hangs on module load.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Julia Lawall [Fri, 30 Jul 2010 15:17:28 +0000 (17:17 +0200)]
SA1111: Eliminate use after free
__sa1111_remove always frees its argument, so the subsequent reference to
sachip->saved_state represents a use after free. __sa1111_remove does not
appear to use the saved_state field, so the patch simply frees it first.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E,E2;
@@
__sa1111_remove(E)
...
(
E = E2
|
* E
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King [Thu, 29 Jul 2010 14:58:59 +0000 (15:58 +0100)]
ARM: Fix Versatile/Realview/VExpress MMC card detection sense
The MMC card detection sense has become really confused with negations
at various levels, leading to some platforms not detecting inserted
cards. Fix this by converting everything to positive logic throughout,
thereby getting rid of these negations.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Gary King [Thu, 29 Jul 2010 16:37:20 +0000 (17:37 +0100)]
ARM: 6279/1: highmem: fix SMP preemption bug in kmap_high_l1_vipt
smp_processor_id() must not be called from a preemptible context (this
is checked by CONFIG_DEBUG_PREEMPT). kmap_high_l1_vipt() was doing so.
This lead to a problem where the wrong per_cpu kmap_high_l1_vipt_depth
could be incremented, causing a BUG_ON(*depth <= 0); in
kunmap_high_l1_vipt().
The solution is to move the call to smp_processor_id() after the call
to preempt_disable().
Originally by: Andrew Howe <ahowe@nvidia.com>
Signed-off-by: Gary King <gking@nvidia.com>
Acked-by: Nicolas Pitre <nico.as.pitre@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Trond Myklebust [Fri, 30 Jul 2010 19:31:57 +0000 (15:31 -0400)]
NFS: Ensure that writepage respects the nonblock flag
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>