aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAge
* drm/nouveau: reduce severity of some "error" messagesBen Skeggs2010-08-05
| | | | | | | There's some known configurations where the lack of these tables/scripts is perfectly normal, reduce visibilty of complaint messages to debug. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: backup bar3 channel on suspendBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement init table opcodex 0x5e and 0x9aMarcin Kościelnicki2010-08-05
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
* drm/nouveau: implement init table op 0x57, INIT_LTIMEMarcin Kościelnicki2010-08-05
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
* drm/nvc0: implement crtc pll settingBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: fix evo dma object so we display somethingBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: rudimentary instmem supportBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: implement memory detectionBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: allow INIT_GPIOBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0: starting point for GF100 support, everything stubbedBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv30: Workaround dual TMDS brain damage.Francisco Jerez2010-08-05
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: No need to set slave TV encoder configs explicitly.Francisco Jerez2010-08-05
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv17-nv4x: Attempt to init some external TMDS transmitters.Francisco Jerez2010-08-05
| | | | | | | | | | | sil164 and friends are the most common, usually they just need to be poked once because a fixed configuration is enough for any modes and clocks, so they worked without this patch if the BIOS had done a good job on POST. Display couldn't survive a suspend/resume cycle though. Unfortunately, BIOS scripts are useless here. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv10: Fix up switching of NV10TCL_DMA_VTXBUF.Francisco Jerez2010-08-05
| | | | | | | Not very nice, but I don't think there's a simpler workaround. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Ack the context switch interrupt before switching contexts.Francisco Jerez2010-08-05
| | | | | | | | Leaving the IRQ unack'ed while switching contexts makes the switch fail randomly on some nv1x. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix the INIT_CONFIGURE_PREINIT BIOS opcode.Francisco Jerez2010-08-05
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Don't pass misaligned offsets to io_mapping_map_atomic_wc().Francisco Jerez2010-08-05
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: unwind on load errorsDan Carpenter2010-08-05
| | | | | | | | | | nouveau_load() just returned directly if there was an error instead of releasing resources. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix AGP reset when AGP FW is already enabled on init.Francisco Jerez2010-08-05
| | | | | | | | | | | Previously nouveau_mem_reset_agp() was only disabling AGP fast writes when coming back from suspend. However, the "locked out of the card because of FW" problem can also be reproduced on init if you unload/reload nouveau.ko several times. This patch makes the AGP code reset FW on init. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unused ttm bo listBen Skeggs2010-08-05
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: use custom i2c algo for dp auxchBen Skeggs2010-08-05
| | | | | | | | | | This makes it easier to see how this is working, and lets us transfer the EDID in blocks of 16 bytes. The primary reason for this change is because debug logs are rather hard to read with the hundreds of single-byte auxch transactions that occur. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* agp: intel-agp: do not use PCI resources before pci_enable_device()Kulikov Vasiliy2010-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* agp: efficeon-agp: do not use PCI resources before pci_enable_device()Kulikov Vasiliy2010-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | IRQ and resource[] may not have correct values until after PCI hotplug setup occurs at pci_enable_device() time. The semantic match that finds this problem is as follows: // <smpl> @@ identifier x; identifier request ~= "pci_request.*|pci_resource.*"; @@ ( * x->irq | * x->resource | * request(x, ...) ) ... *pci_enable_device(x) // </smpl> Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: kill BKL from common codeArnd Bergmann2010-08-04
| | | | | | | | | | | | | | | | | | | | | | | | | | This restricts the use of the big kernel lock to the i830 and i810 device drivers. The three remaining users in common code (open, ioctl and release) get converted to a new mutex, the drm_global_mutex, making the locking stricter than the big kernel lock. This may have a performance impact, but only in those cases that currently don't use DRM_UNLOCKED flag in the ioctl list and would benefit from that anyway. The reason why i810 and i830 cannot use drm_global_mutex in their mmap functions is a lock-order inversion problem between the current use of the BKL and mmap_sem in these drivers. Since the BKL has release-on-sleep semantics, it's harmless but it would cause trouble if we replace the BKL with a mutex. Instead, these drivers get their own ioctl wrappers that take the BKL around every ioctl call and then set their own handlers as DRM_UNLOCKED. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/kms: Simplify setup of the initial I2C encoder config.Francisco Jerez2010-08-04
| | | | | | | | | In most use cases the driver will be using the same static config all the time: interpreting i2c_board_info::platform_data as the default config we can can save the GPU driver a redundant set_config() call. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm,io-mapping: Specify slot to use for atomic mappingsChris Wilson2010-08-04
| | | | | | | | | This is required should we ever attempt to use an io-mapping where KM_USER0 is verboten, such as inside an IRQ context. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: only expose underscan on avivo chipsAlex Deucher2010-08-04
| | | | | | | | R4xx also uses the atom add connector function, but underscan is only supported on avivo chips. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Cleanup after failing to create master->unique and dev->nameChris Wilson2010-08-04
| | | | | | | | | | | | | v2: Userspace (notably xf86-video-{intel,ati}) became confused when drmSetInterfaceVersion() started returning -EBUSY as they used a second call (the first done in drmOpen()) to check their master credentials. Since userspace wants to be able to repeatedly call drmSetInterfaceVersion() allow them to do so. v3: Rebase to drm-core-next. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: tone down overchatty acpi debug messages.Dave Airlie2010-08-03
| | | | | | | On non laptop systems we'll see these the whole time, so make them less important. Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: enable underscan option for digital connectorsAlex Deucher2010-08-03
| | | | | | | | | | | | | | | This connector attribute allows you to enable or disable underscan on a digital output to compensate for panels that automatically overscan (e.g., many HDMI TVs). Valid values for the attribute are: off - forces underscan off on - forces underscan on auto - enables underscan if an HDMI TV is connected, off otherwise default value is auto. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix calculation of h/v scaling factorsAlex Deucher2010-08-03
| | | | | | | | | | | Prior to this patch the code was dividing the src_v by the dst_h and vice versa, rather than src_v/dst_v and src_h/dst_h. This could lead to problems in the calculation of the display watermarks. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge remote branch 'intel/drm-intel-next' of /ssd/git/drm-next into ↵Dave Airlie2010-08-03
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | drm-core-next * 'intel/drm-intel-next' of /ssd/git/drm-next: (230 commits) drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it. drm/agp/i915: trim stolen space to 32M drm/i915: Unset cursor if out-of-bounds upon mode change (v4) drm/i915: Unreference object not handle on creation drm/i915: Attempt to uncouple object after catastrophic failure in unbind drm/i915: Repeat unbinding during free if interrupted (v6) drm/i915: Refactor i915_gem_retire_requests() drm/i915: Warn if we run out of FIFO space for a mode drm/i915: Round up the watermark entries (v3) drm/i915: Typo in (unused) register mask for overlay. drm/i915: Check overlay stride errata for i830 and i845 drm/i915: Validate the mode for eDP by using fixed panel size drm/i915: Always use the fixed panel timing for eDP drm/i915: Enable panel fitting for eDP drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode in VBT drm/i915/sdvo: Set sync polarity based on actual mode drm/i915/hdmi: Set sync polarity based on actual mode drm/i915/pch: Set transcoder sync polarity for DP based on actual mode drm/i915: Initialize LVDS and eDP outputs before anything else drm/i915/dp: Correctly report eDP in the core connector type ...
| * drm/i915: Clear the Ironlake dithering flags when the pipe doesn't want it.Eric Anholt2010-08-03
| | | | | | | | | | | | | | My fine DisplayPort output was getting ST dithering forever after having had the LVDS enabled at one point. Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/agp/i915: trim stolen space to 32MJesse Barnes2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some BIOSes will claim a large chunk of stolen space. Unless we reclaim it, our aperture for remapping buffer objects will be constrained. So clamp the stolen space to 32M and ignore the rest. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15469 among others. Adding the ignored stolen memory back into the general pool using the memory hotplug code is left as an exercise for the reader. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.com> Tested-by: Artem S. Tashkinov <t.artem@mailcity.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Unset cursor if out-of-bounds upon mode change (v4)Chris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs warn that to position the cursor such that no part of it is visible on the pipe is an undefined operation. Avoid such circumstances upon changing the mode, or at any other time, by unsetting the cursor if it moves out of bounds. "For normal high resolution display modes, the cursor must have at least a single pixel positioned over the active screen.” (p143, p148 of the hardware registers docs). Fixes: Bug 24748 - [965G] Graphics crashes when resolution is changed with KMS enabled https://bugs.freedesktop.org/show_bug.cgi?id=24748 v2: Only update the cursor registers if they change. v3: Fix the unsigned comparision of x,y against width,height. v4: Always set CUR.BASE or else the cursor may become corrupt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Christian Eggers <ceggers@gmx.de> Cc: Christopher James Halse Rogers <chalserogers@gmail.com> Cc: stable@kernel.org Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Unreference object not handle on creationChris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating an object, we create the handle by which it is known to the process and which own the reference to the object. That reference to the new handle is what we want to transfer to the process, not the lost reference to the object; so free the local object reference *not* the process's handle reference. This brings i915_gem_object_create_ioctl() into line with drm_gem_open_ioctl() Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Attempt to uncouple object after catastrophic failure in unbindChris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | If we fail to flush outstanding GPU writes but return the memory to the system, we risk corrupting memory should the GPU recovery and complete those writes. On the other hand, if we bail early and free the object then we have a definite use-after-free and real memory corruption. Choose the lesser of two evils, since in order to recover from the hung GPU we need to completely reset it, those pending writes should never happen. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Repeat unbinding during free if interrupted (v6)Chris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If during the freeing of an object the unbind is interrupted by a system call, which is quite possible if we have outstanding GPU writes that must be flushed, the unbind is silently aborted. This still leaves the AGP region and backing pages allocated, and perhaps more importantly, the object remains upon the various lists exposing us to memory corruption. I think this is the cause behind the use-after-free, such as Bug 15664 - Graphics hang and kernel backtrace when starting Azureus with Compiz enabled https://bugzilla.kernel.org/show_bug.cgi?id=15664 v2: Daniel Vetter reminded me that kernel space programming is never easy. We cannot simply spin to clear the pending signal and so must deferred the freeing of the object until later. v3: Run from the top level retire requests. v4: Tested with P(return -ERESTARTSYS)=.5 from i915_gem_do_wait_request() v5: Rebase against Eric's for-linus tree. v6: Refactor, split and add a comment about avoiding unbounded recursion. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Refactor i915_gem_retire_requests()Chris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | Combine the iteration over active render rings into a common function. This is in preparation for reusing the idle function to also retire deferred free requests. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Warn if we run out of FIFO space for a modeChris Wilson2010-08-01
| | | | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Round up the watermark entries (v3)Chris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * drm/i915: Typo in (unused) register mask for overlay.Chris Wilson2010-08-01
| | | | | | | | | | Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915: Check overlay stride errata for i830 and i845Chris Wilson2010-08-01
| | | | | | | | | | | | | | | | | | 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>
| * drm/i915: Validate the mode for eDP by using fixed panel sizeZhao Yakui2010-08-01
| | | | | | | | | | | | | | 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>
| * drm/i915: Always use the fixed panel timing for eDPZhao Yakui2010-08-01
| | | | | | | | | | | | | | 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>
| * drm/i915: Enable panel fitting for eDPZhao Yakui2010-08-01
| | | | | | | | | | | | | | | | | | | | 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>
| * drm/i915: Add fixed panel mode parsed from EDID for eDP without fixed mode ↵Zhao Yakui2010-08-01
| | | | | | | | | | | | | | | | | | 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>
| * drm/i915/sdvo: Set sync polarity based on actual modeAdam Jackson2010-08-01
| | | | | | | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915/hdmi: Set sync polarity based on actual modeAdam Jackson2010-08-01
| | | | | | | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
| * drm/i915/pch: Set transcoder sync polarity for DP based on actual modeAdam Jackson2010-08-01
| | | | | | | | | | Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>