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 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>
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: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>
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: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>
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
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.
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.
...
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
...
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:
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:
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>
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>
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.
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>
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 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>
Francisco Jerez [Fri, 23 Jul 2010 21:17:57 +0000 (23:17 +0200)]
drm/nouveau: Put back the old 2-messages I2C slave test.
I was hoping we could detect I2C devices at a given address without
actually writing data into them, but apparently some DDC slaves get
confused with 0-bytes transactions. Put the good old test back.
Reported-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Fri, 23 Jul 2010 18:29:13 +0000 (20:29 +0200)]
drm/nouveau: Reset AGP before running the init scripts.
BIOS scripts usually make an attempt to reset the AGP controller,
however on some nv4x cards doing it properly involves switching FW off
and on: if we do that without updating the AGP bridge settings
accordingly (e.g. with the corresponding calls to agp_enable()) we
will be locking ourselves out of the card MMIO space. Do it from
nouveau_mem_reset_agp() before the init scripts are executed.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Francisco Jerez [Tue, 13 Jul 2010 13:59:50 +0000 (15:59 +0200)]
drm/nv04-nv3x: Implement init-compute-mem.
Init-compute-mem was the last piece missing for nv0x-nv3x card
cold-booting. This implementation is somewhat lacking but it's been
reported to work on most chipsets it was tested in. Let me know if it
breaks suspend to RAM for you.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Tested-by: Patrice Mandin <patmandin@gmail.com> Tested-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Xavier Chantry <chantry.xavier@gmail.com> Tested-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Ben Skeggs [Fri, 16 Jul 2010 06:17:27 +0000 (16:17 +1000)]
drm/nv50: fix regression that break LVDS in some places
A previous commit started additionally using the SOR link when trying to
match the correct output script. However, we never fill in this field
for LVDS so we can never match a script at all.
Ben Skeggs [Thu, 15 Jul 2010 01:25:55 +0000 (11:25 +1000)]
drm/nouveau: remove quirk to fabricate DVI-A output on DCB 1.5 boards
There's a report of this quirk breaking modesetting on at least one board.
After discussion with Francisco Jerez, we've decided to remove it:
<darktama> it's not worth limiting the quirk to just where we know it can
work? i'm happy either way really :)
<curro> hmm, don't think so, most if not all DCB15 cards have just one DAC
<curro> and with that quirk there's no way to tell if the load comes from
the VGA or DVI port
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Acked-by: Francisco Jerez <currojerez@riseup.net>
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics - relax capability ID checks on newer hardware
Input: twl40300-keypad - fix handling of "all ground" rows
Input: gamecon - reference correct pad in gc_psx_command()
Input: gamecon - reference correct input device in NES mode
Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi'
Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table
Input: qt2160 - rename kconfig symbol name
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/radeon/kms: add quirk to make HP DV5000 laptop resume
drm/radeon/kms: fix RADEON_INFO_CRTC_FROM_ID info ioctl
Fix ttm_page_alloc.c build breakage
drm/radeon/kms: fix legacy LVDS dpms sequence
drm/radeon/kms: drop taking lock around crtc lookup.
Merge branch 'x86/auditsyscall' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland
* 'x86/auditsyscall' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-roland:
x86: auditsyscall: fix fastpath return value after reschedule
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/linux-2.6-kgdb:
sysrq,kdb: Use __handle_sysrq() for kdb's sysrq function
debug_core,kdb: fix kgdb_connected bit set in the wrong place
Fix merge regression from external kdb to upstream kdb
repair gdbstub to match the gdbserial protocol specification
kdb: break out of kdb_ll() when command is terminated