aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-11-29drm: record monitor status in output_poll_executeKeith Packard1-3/+4
In order to correctly report monitor connected status changes, the previous monitor status must be recorded in the connector->status value instead of being discarded. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-29drm: Set connector DPMS status to ON in drm_crtc_helper_set_configKeith Packard1-0/+7
When setting a new crtc configuration, force the DPMS state of all connectors to ON. Otherwise, they'll be left at OFF and a future mode set that disables the specified connector will not turn the connector off. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-28drm/i915: fix regression due to ba3d8d749b01548b9Daniel Vetter1-25/+18
We don't track gpu flush request in any special way. So even with obj->write_domain == 0, a gpu flush might be outstanding but no yet executed. Even worse, the latest request might use the object only for reading. So and unconditional call to object_wait_rendering is needed for !pipelined. Hence revert that patch fully and untangle the flushing from the synchronization again. Reported-by: Keith Packard <keithp@keithp.com> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-26Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixesDave Airlie3-248/+346
* 'intel/drm-intel-fixes' of /ssd/git/drm-next: drm/i915/sdvo: Always add a 30ms delay to make SDVO TV detection reliable MAINTAINERS: INTEL DRM DRIVERS list (intel-gfx) is subscribers-only drm/i915/sdvo: Always fallback to querying the shared DDC line drm/i915: Handle pagefaults in execbuffer user relocations drm/i915/sdvo: Only enable HDMI encodings only if the commandset is supported drm/i915: Only save/restore cursor regs if !KMS drm/i915: Prevent integer overflow when validating the execbuffer
2010-11-26Revert "drm/radeon/kms: fix typo in r600 cs checker"Alex Deucher1-1/+1
This reverts commit d33ef52d9db8a36900dd53f2e32db9a521ace259. This change seems to expose a bug in the 3D driver tiggered by certain apps, so revert it to keep userspace working. Reported-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-24drm/i915/sdvo: Always add a 30ms delay to make SDVO TV detection reliableChris Wilson1-3/+5
Commit d09c23de intended to add a 30ms delay to give the ADD time to detect any TVs connected. However, it used the sdvo->is_tv flag to do so which is dependent upon the previous detection result and not whether the output supports TVs. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
2010-11-23drm/i915/sdvo: Always fallback to querying the shared DDC lineChris Wilson1-45/+6
On a few devices, like the Mac Mini, the CRT DDC pins are shared between the analog connector and the digital connector. In this scenario, rely on the EDID to determine if a digital panel is connected to the digital connector. Reported-and-tested-by: Tino Keitel <tino.keitel@tikei.de> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-23drm/i915: Handle pagefaults in execbuffer user relocationsChris Wilson1-168/+293
Currently if we hit a pagefault when applying a user relocation for the execbuffer, we bail and return EFAULT to the application. Instead, we need to unwind, drop the dev->struct_mutex, copy all the relocation entries to a vmalloc array (to avoid any potential circular deadlocks when resolving the pagefault), retake the mutex and then apply the relocations. Afterwards, we need to again drop the lock and copy the vmalloc array back to userspace. v2: Incorporate feedback from Daniel Vetter. Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2010-11-22drm/i915/sdvo: Only enable HDMI encodings only if the commandset is supportedChris Wilson1-11/+14
As we conflated intel_sdvo->is_hdmi with both having HDMI support on the ADD along with having HDMI support on the monitor, we would attempt to use HDMI encodings even if the interface did not support those commands. Reported-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
2010-11-22Merge remote branch 'linus' into drm-intel-fixesChris Wilson53-307/+813
2010-11-22drm/radeon/kms: fix resume regression for some r5xx laptopsAlex Deucher1-0/+1
I had removed this when I switched the atom indirect io methods to use the io bar rather than the mmio bar, but it appears it's still needed. Reported-by: Mark Lord <kernel@teksavvy.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-22drm/radeon/kms: fix regression in rs4xx i2c setupAlex Deucher1-1/+1
typo in my last i2c rework. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=23222 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-21drm/i915: Only save/restore cursor regs if !KMSChris Wilson1-20/+20
Under KMS, restoring the cursor is handled upon modeswitch in order to avoid enabling an undefined set of registers. At the moment, the cursor is restored before the aperture and modes are fully setup causing some invalid access during resume, such as: PGTBL_ER: 0x00040000 Invalid GTT entry during Cursor Fetch Fix this by only performing cursor register save/restore under UMS where it is done in the correct sequence. Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-21drm/i915: Prevent integer overflow when validating the execbufferChris Wilson1-1/+8
Commit 2549d6c2 removed the vmalloc used for temporary storage of the relocation lists used during execbuffer. However, our use of vmalloc was being protected by an integer overflow check which we do want to preserve! Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-19Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intelLinus Torvalds6-107/+157
* 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle/drm-intel: drm/i915: Disable FBC on Ironlake to save 1W drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardware drm/i915/crt: Introduce struct intel_crt drm/i915: Do not hold mutex when faulting in user addresses drm: radeon: fix error value sign drm/radeon/kms: fix and unify tiled buffer alignment checking for r6xx/7xx drm/i915: Retire any pending operations on the old scanout when switching drm/i915: Fix I2C adapter registration
2010-11-19Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6Linus Torvalds54-424/+1014
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (40 commits) drm/radeon/kms: i2c s/sprintf/snprintf/g for safety drm/radeon/kms: fix i2c pad masks on rs4xx drm/ttm: Fix up a theoretical deadlock drm/radeon/kms: fix tiling info on evergreen drm/radeon/kms: fix alignment when allocating buffers drm/vmwgfx: Fix up an error path during bo creation drm/radeon/kms: register an i2c adapter name for the dp aux bus drm/radeon/kms/atom: add proper external encoders support drm/radeon/kms/atom: cleanup and unify DVO handling drm/radeon/kms: properly power up/down the eDP panel as needed (v4) drm/radeon/kms/atom: set sane defaults in atombios_get_encoder_mode() drm/radeon/kms: turn the backlight off explicitly for dpms drm/radeon/kms: fix typo in r600 cs checker drm: radeon: fix error value sign drm/radeon/kms: fix and unify tiled buffer alignment checking for r6xx/7xx nouveau: Acknowledge HPD irq in handler, not bottom half drm/nouveau: Fix a few confusions between "chipset" and "card_type". drm/nouveau: don't expose backlight control when available through ACPI drm/nouveau/pm: improve memtiming mappings drm/nouveau: Make PCIE GART size depend on the available RAMIN space. ...
2010-11-19drm/i915: Disable FBC on Ironlake to save 1WAlex Shi1-1/+2
Frame buffer compression is broken on Ironlake due to buggy hardware. Currently it is disabled through chicken bits, but it still consumes over 1W more than if we simply never attempt to enable the FBC code paths. Signed-off-by: Alex Shi <alex.shi@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: stable@kernel.org
2010-11-19drm/i915: Take advantage of auto-polling CRT hotplug detection on PCH hardwareKeith Packard1-38/+57
Both IBX and CPT have an automatic hotplug detection mode which appears to work reliably enough that we can dispense with the manual force hotplug trigger stuff. This means that hotplug detection is as simple as reading the current hotplug register values. The first time the hotplug detection is activated, the code synchronously waits for a hotplug sequence in case the hardware hasn't bothered to do a detection cycle since being initialized. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-19drm/i915/crt: Introduce struct intel_crtChris Wilson1-27/+37
We will use this structure in future patches to store CRT specific information on the encoder. Split out and tweaked from a patch by Keith Packard. Signed-off-by: Keith Packard <keithp@kithp.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-19drm/i915: Do not hold mutex when faulting in user addressesChris Wilson1-36/+27
Linus Torvalds found that it was rather trivial to trigger a system freeze: In fact, with lockdep, I don't even need to do the sysrq-d thing: it shows the bug as it happens. It's the X server taking the same lock recursively. Here's the problem: ============================================= [ INFO: possible recursive locking detected ] 2.6.37-rc2-00012-gbdbd01a #7 --------------------------------------------- Xorg/2816 is trying to acquire lock: (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c626c>] i915_gem_fault+0x50/0x17e but task is already holding lock: (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a other info that might help us debug this: 2 locks held by Xorg/2816: #0: (&dev->struct_mutex){+.+.+.}, at: [<ffffffff812c403b>] i915_mutex_lock_interruptible+0x28/0x4a #1: (&mm->mmap_sem){++++++}, at: [<ffffffff81022d4f>] page_fault+0x156/0x37b This recursion was introduced by rearranging the locking to avoid the double locking on the fast path (4f27b5d and fbd5a26d) and the introduction of the prefault to encourage the fast paths (b5e4f2b). In order to undo the problem, we rearrange the code to perform the access validation upfront, attempt to prefault and then fight for control of the mutex. the best case scenario where the mutex is uncontended the prefaulting is not wasted. Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-11-19drm/radeon/kms: i2c s/sprintf/snprintf/g for safetyAlex Deucher1-3/+6
As per advice from Jean Delvare. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-19drm/radeon/kms: fix i2c pad masks on rs4xxAlex Deucher1-0/+13
These got lost in the last i2c cleanup. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=23222 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/ttm: Fix up a theoretical deadlockThomas Hellstrom1-0/+11
A process suspended waiting for a higher sequence or no sequence to unreserve, a bo may be beaten to the reservation by a process with a lower sequence. In that case the first process should give up trying to reserve and return -EAGAIN. In order for that to happen, we must wake waiting processes when we change sequence, so that they have a chance to detect the new sequence. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18Merge remote branch 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next into drm-fixesDave Airlie28-223/+384
* 'nouveau/for-airlied' of /ssd/git/drm-nouveau-next: (25 commits) nouveau: Acknowledge HPD irq in handler, not bottom half drm/nouveau: Fix a few confusions between "chipset" and "card_type". drm/nouveau: don't expose backlight control when available through ACPI drm/nouveau/pm: improve memtiming mappings drm/nouveau: Make PCIE GART size depend on the available RAMIN space. drm/nouveau: Return error from nouveau_gpuobj_new if we're out of RAMIN. drm/nouveau: Fix compilation issues in nouveau_pm when CONFIG_HWMON is not set drm/nouveau: Don't use load detection for connector polling. drm/nv10-nv20: Fix instability after MPLL changes. drm/nv50: implement possible workaround for NV86 PGRAPH TLB flush hang drm/nouveau: Don't poll LVDS outputs. drm/nouveau: Use "force" to decide if analog load detection is ok or not. drm/nv04: Fix scanout over the 16MB mark. drm/nouveau: fix nv40 pcie gart size drm/nva3: fix overflow in fixed point math used for pll calculation drm/nv10: Balance RTs expected to be accessed simultaneously by the 3d engine. drm/nouveau: Expose some BO usage flags to userspace. drm/nouveau: Reduce severity of the unknown getparam error. drm/nouveau: Avoid lock dependency between ramht and ramin spinlocks. drm/nouveau: Some random cleanups. ...
2010-11-18drm/radeon/kms: fix tiling info on evergreenAlex Deucher1-1/+30
We aren't currently using tiling in userspace on evergreen, but the info we currently return for the tiling info query (gb_addr_config) is no adequate for userspace tiling alignment calculations. It does not contain the bank info. Create a custom tiling info dword with all the necessary info (num channels, num banks, group size, row size). Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: fix alignment when allocating buffersAlex Deucher13-23/+25
We were previously dropping alignment requests on the floor when allocating buffers so we always ended up page aligned. Certain tiling modes on 6xx+ require larger alignment which wasn't happening before. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: Jerome Glisse <j.glisse@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/vmwgfx: Fix up an error path during bo creationThomas Hellstrom1-6/+8
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: register an i2c adapter name for the dp aux busAlex Deucher1-0/+1
This causes the connector to not be added since i2c init fails for the adapter. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31688 Noticed by Ari Savolainen. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: Ari Savolainen <ari.m.savolainen@gmail.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms/atom: add proper external encoders supportAlex Deucher2-0/+184
These are external encoder chips connected via DVO or DP. The actual external encoder programming is handled by the kms encoder functions for primary encoder. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms/atom: cleanup and unify DVO handlingAlex Deucher4-46/+52
Handle all the various asic family specific things for DVO. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: properly power up/down the eDP panel as needed (v4)Alex Deucher3-0/+70
The eDP panel must be powered up for aux transactions, so power it up for detect and mode probe functions, otherwise power it up or down based on dpms. v2: - only mess with eDP panel on DCE4+ - only mess with eDP panel on eDP connectors, not all DP connectors v3: - be extra careful to only mess with eDP panels on eDP connectors v4: - avoid possible null derefernce if a connector has not been assigned to the encoder Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms/atom: set sane defaults in atombios_get_encoder_mode()Alex Deucher1-3/+15
If there was no connector mapped to the encoder, atombios_get_encoder_mode() returned 0 which is the id for DP. Return something sane instead based on the encoder id. This avoids hitting the DP paths on non-DP encoders. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: turn the backlight off explicitly for dpmsAlex Deucher1-1/+14
Seems some newer systems require this explicitly. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: fix typo in r600 cs checkerAlex Deucher1-1/+1
Looks like a typo in: drm/radeon/r600: fix tiling issues in CS checker. (f30df2fad0c901e74ac9a52a488a54c69a373a41) Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm: radeon: fix error value signVasiliy Kulikov1-2/+2
enable_vblank implementations should use negative result to indicate error. radeon_enable_vblank() returns EINVAL in this case. Change this to -EINVAL. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18drm/radeon/kms: fix and unify tiled buffer alignment checking for r6xx/7xxAlex Deucher2-116/+199
Tiled buffers have the same alignment requirements regardless of whether the surface is for db, cb, or textures. Previously, the calculations where inconsistent for each buffer type. - Unify the alignment calculations in a common function - Standardize the alignment units (pixels for pitch/height/depth, bytes for base) - properly check the buffer base alignments Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2010-11-18nouveau: Acknowledge HPD irq in handler, not bottom halfAndy Lutomirski3-9/+33
The old code generated an interrupt storm bad enough to completely take down my system. Signed-off-by: Andy Lutomirski <luto@mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Fix a few confusions between "chipset" and "card_type".Francisco Jerez3-3/+3
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: don't expose backlight control when available through ACPIBen Skeggs1-0/+9
Avoid confusing userspace by not publishing backlight controls if ACPI equivalents are available. Reported-by: Aaron Sowry <aaron@aeneby.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau/pm: improve memtiming mappingsRoy Spliet1-12/+19
Improvements: - Fix bug in switch statement - Add parts of 0x10022c, 0x10023c - Clean up 0x100234 - Comment out assumption in 0x100228 until verified Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Make PCIE GART size depend on the available RAMIN space.Francisco Jerez1-5/+5
Reported-by: Tomas Miljenovic <tomasmiljenovic@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Return error from nouveau_gpuobj_new if we're out of RAMIN.Francisco Jerez1-1/+1
Reported-by: Tomas Miljenovic <tomasmiljenovic@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Fix compilation issues in nouveau_pm when CONFIG_HWMON is not setMartin Peres1-1/+6
Signed-off-by: Martin Peres <martin.peres@ensi-bourges.fr> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Don't use load detection for connector polling.Francisco Jerez1-23/+2
Analog output polling makes GL programs jerky when pageflip is being used because it's carried out with the mode_config mutex held. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nv10-nv20: Fix instability after MPLL changes.Francisco Jerez1-0/+9
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nv50: implement possible workaround for NV86 PGRAPH TLB flush hangBen Skeggs7-13/+82
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Don't poll LVDS outputs.Francisco Jerez1-4/+6
Reported-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: Use "force" to decide if analog load detection is ok or not.Francisco Jerez3-49/+28
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nv04: Fix scanout over the 16MB mark.Francisco Jerez2-1/+20
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2010-11-18drm/nouveau: fix nv40 pcie gart sizeLucas Stach1-1/+5
Nouveau sets the PCIE GART size to 64MiB for all cards before nv50, but nv40 has enough RAMIN space to support 512MiB GART size. This patch fixes this value to make use of this hardware capability. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>