aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2011-02-16Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson72-466/+1134
Grab the latest stabilisation bits from -fixes and some suspend and resume fixes from linus. Conflicts: drivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/i915_irq.c
2011-02-16drm/i915: Move the lvds OpRegion lid detection code to panel and reuse for eDPChris Wilson4-9/+25
Share the lid detection code for the all panels for consistent behaviour and a single place to add the eventual quirks for crap hardware. Signed-off-by: Chris Wilson <[email protected]>
2011-02-16drm/i915: don't enable FDI & transcoder interrupts after allJesse Barnes1-3/+3
We can enable some safely, but FDI and transcoder interrupts can occur and block other interrupts from being detected (like port hotplug events). So keep them disabled by default (they can be re-enabled for debugging display bringup, but should generally be off). Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-16drm/i915: Ignore a hung GPU when flushing the framebuffer prior to a switchChris Wilson1-5/+5
If the gpu is hung, then whatever was inside the render cache is lost and there is little point waiting for it. Or complaining if we see an EIO or EAGAIN instead. So, if the GPU is indeed in its death throes when we need to rewrite the registers for a new framebuffer, just ignore the error and proceed with the update. Signed-off-by: Chris Wilson <[email protected]>
2011-02-15Merge branch 'master' into for-nextJiri Kosina76-587/+909
2011-02-15drm/radeon/kms: hopefully fix pll issues for real (v3)Alex Deucher1-14/+8
The problematic boards have a recommended reference divider to be used when spread spectrum is enabled on the laptop panel. Enable the use of the recommended reference divider along with the new pll algo. v2: testing options v3: When using the fixed reference divider with LVDS, prefer min m to max p and use fractional feedback dividers. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28852 https://bugzilla.kernel.org/show_bug.cgi?id=24462 https://bugzilla.kernel.org/show_bug.cgi?id=26552 MacbookPro issues reported by Justin Mattock <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-15drm/radeon/kms: add bounds checking to avivo pll algoAlex Deucher1-0/+10
Prevent divider overflow. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28932 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-15drm/radeon/kms: fix a few more atombios endian issuesAlex Deucher2-7/+7
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixesDave Airlie11-99/+229
* 'intel/drm-intel-fixes' of /ssd/git/drm-next: drm/i915: Fix resume regression from 5d1d0cc drm/i915/tv: Use polling rather than interrupt-based hotplug drm/i915: Trigger modesetting if force-audio changes drm/i915/sdvo: If we have an EDID confirm it matches the mode of the connection drm/i915: Disable RC6 on Ironlake drm/i915/lvds: Restore dithering on native modes for gen2/3 drm/i915: Invalidate TLB caches on SNB BLT/BSD rings
2011-02-14drm/radeon/kms: improve 6xx/7xx CS error outputAlex Deucher1-20/+26
Makes debugging CS rejections much easier. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: check AA resolve registers on r300Marek Olšák8-13/+49
This is an important security fix because we allowed arbitrary values to be passed to AARESOLVE_OFFSET. This also puts the right buffer address in the register. Signed-off-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: fix tracking of BLENDCNTL, COLOR_CHANNEL_MASK, and GB_Z on r300Marek Olšák5-12/+5
Also move ZB_DEPTHCLEARVALUE to the list of safe regs. Signed-off-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: use linear aligned for evergreen/ni bo blitsAlex Deucher1-2/+2
Not only is linear aligned supposedly more performant, linear general is only supported by the CB in single slice mode. The texture hardware doesn't support linear general, but I think the hw automatically upgrades it to linear aligned. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: use linear aligned for 6xx/7xx bo blitsAlex Deucher1-2/+2
Not only is linear aligned supposedly more performant, linear general is only supported by the CB in single slice mode. The texture hardware doesn't support linear general, but I think the hw automatically upgrades it to linear aligned. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon: fix race between GPU reset and TTM delayed delete thread.Dave Airlie1-0/+4
My evergreen has been in a remote PC for week and reset has never once saved me from certain doom, I finally relocated to the box with a serial cable and noticed an oops when the GPU resets, and the TTM delayed delete thread tries to remove something from the GTT. This stops the delayed delete thread from executing across the GPU reset handler, and woot I can GPU reset now. Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: evergreen/ni big endian fixes (v2)Alex Deucher4-10/+40
Based on 6xx/7xx endian fixes from Cédric Cano. v2: fix typo in shader Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: 6xx/7xx big endian fixesCédric Cano6-20/+54
agd5f: minor cleanups Signed-off-by: Cédric Cano <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: atombios big endian fixesCédric Cano3-52/+52
agd5f: additional cleanups/fixes Signed-off-by: Cédric Cano <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon: 6xx/7xx non-kms endian fixesCédric Cano3-9/+34
agd5f: minor cleanups Signed-off-by: Cédric Cano <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: optimize CS state checking for r100->r500Marek Olšák4-12/+77
The colorbuffer, zbuffer, and texture states are checked only once when they get changed. This improves performance in the apps which emit lots of draw packets and few state changes. This drops performance in glxgears by a 1% or so, but glxgears is not a benchmark we care about. The time spent in the kernel when running Torcs dropped from 33% to 23% and the frame rate is higher, which is a good thing. r600 might need something like this as well. Signed-off-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm: do not leak kernel addresses via /proc/dri/*/vmaKees Cook1-4/+5
In the continuing effort to avoid kernel addresses leaking to unprivileged users, this patch switches to %pK for /proc/dri/*/vma. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: add connector table for mac g5 9600Alex Deucher2-0/+48
PPC Mac cards do not provide connector tables in their vbios. Their connector/encoder configurations must be hardcoded in the driver. verified by nyef on #radeon Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-14radeon mkregtable: Add missing fclose() callsJesper Juhl1-1/+4
drivers/gpu/drm/radeon/mkregtable.c:parser_auth() almost always remembers to fclose(file) before returning, but it misses two spots. This is not really important since the process will exit shortly after and thus close the file for us, but being explicit prevents static analysis tools from complaining about leaked memory and missing fclose() calls and it also seems to be the prefered style of the existing code to explicitly close the file. So, here's a patch to add the two missing fclose() calls. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon/kms: fix interlaced modes on dce4+Alex Deucher2-22/+20
- set scaler table clears the interleave bit, need to reset it in encoder quirks, this was already done for pre-dce4. - remove the interleave settings from set_base() functions this is now handled in the encoder quirks functions, and isn't technically part of the display base setup. - rename evergreen_do_set_base() to dce4_do_set_base() since it's used on both evergreen and NI asics. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28182 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-14drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46Dave Airlie1-2/+2
The old code dereferenced a value, the new code just needs to pass the ptr. fixes an oops looking at files in debugfs. cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-11drm/i915: disable PCH ports if needed when disabling a CRTCJesse Barnes2-25/+74
Disable any PCH ports associated with a pipe when disabling it. This should prevent transcoder disable failures due to ports still being on. Signed-off-by: Jesse Barnes <[email protected]> [ickle: introduce *_PIPE_ENABLED() macro] Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915: i915_mutex_interruptible() returns -EINTRChris Wilson1-0/+1
... so we handle that for i915_gem_fault() in the same manner as ERESTARTSYS, or we send a SIGBUS to the faulting application. Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915: Fix resume regression from 5d1d0ccChris Wilson1-2/+1
The irony of the patch to fix the resume regression on PineView causing a further regression on Ironlake is not lost on me. Reported-by: Jeff Chua <[email protected]> Reported-by: Björn Schließmann <[email protected]> Tested-by: Björn Schließmann <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28802 Signed-off-by: Chris Wilson <[email protected]>
2011-02-11drm/i915/tv: Use polling rather than interrupt-based hotplugChris Wilson1-13/+30
The documentation recommends that we should use a polling method for TV detection as this is more power efficient than the interrupt based mechanism (as the encoder can be completely switched off). A secondary effect is that leaving the hotplug enabled seems to be causing pipe underruns as reported by Hugh Dickins on his Crestline. Tested-by: Hugh Dickins <[email protected]> Signed-off-by: Chris Wilson <[email protected]> [This is a candidate for stable, but needs minor porting to 2.6.37]
2011-02-11drm/i915: Trigger modesetting if force-audio changesChris Wilson3-18/+91
If the user changes the force-audio property and it no longer reflects the current configuration, then we need to trigger a mode set in order to update the registers. Signed-off-by: Chris Wilson <[email protected]>
2011-02-09drm/i915/sdvo: If we have an EDID confirm it matches the mode of the connectionChris Wilson1-5/+27
If we have an EDID for a digital panel, but we are probing a non-TMDS connector then we know that this is a false detection, and vice versa. This should reduce the number of bogus outputs on multi-function adapters that report the same output on multiple connectors. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34101 Reported-by: Sebastien Caty <[email protected]> Tested-by: Sebastien Caty <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-09drm/i915: Disable RC6 on IronlakeChris Wilson4-44/+55
The automatic powersaving feature is once again causing havoc, with 100% reliable hangs on boot and resume on affected machines. Reported-by: Francesco Allertsen <[email protected]> Reported-by: Gui Rui <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28582 Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: cleanup per-pipe reg usageJesse Barnes13-647/+640
We had some conversions over to the _PIPE macros, but didn't get everything. So hide the per-pipe regs with an _ (still used in a few places for legacy) and add a few _PIPE based macros, then make sure everyone uses them. [update: remove usage of non-existent no-op macro] [update 2: keep modesetting suspend/resume code, update to new reg names] Signed-off-by: Jesse Barnes <[email protected]> [ickle: stylistic cleanups for checkpatch and taste] Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Skip the no-op domain changes when already in CPU|GTT domainsChris Wilson1-0/+6
Removes some superfluous fluff from tracing... Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Refine tracepointsChris Wilson11-359/+330
A lot of minor tweaks to fix the tracepoints, improve the outputting for ftrace, and to generally make the tracepoints useful again. It is a start and enough to begin identifying performance issues and gaps in our coverage. Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Fix infinite loop regression from 21dd3734Chris Wilson1-5/+25
By returning EAGAIN upon a wedged GPU before attempting to wait, we would hit an infinite loop of repeating operation without ever progressing. Instead this needs to be EIO so that userspace knows that the GPU is truly wedged and not in the process of error recovery. Similarly, we need to handle the error recovery during i915_gem_fault. Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: the PCH reference clocks are global, so don't clobber unconditionallyJesse Barnes1-46/+77
The PCH can drive several reference clocks simultaneously, and needs to with multiple display configurations. So we can't just clobber the existing state everytime we set a mode, we need to take into account what the other CRTCs are doing at the time. Doing so fixes an issue where you'd lose the LVDS display at boot if you had an LVDS+DP config. [updated: init bools and check CRTC status correctly] Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: add port assertion check when disabling transcodersJesse Barnes1-0/+59
When a transcoder is disabled, any ports pointing at it should also be disabled. If they're not, we may fail to disable the transcoder, leading to blank displays. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: don't check plane vs pipe enable on ILK+Jesse Barnes1-0/+4
These bits have a different meaning on ILK+, where planes are hardwired to pipes. Fixing this avoid some spurious assertion failures. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Set the transcoder port to none when disabling DP.Eric Anholt2-0/+2
The specs say to do so. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Use DEBUG_KMS for the self-refresh watermarksChris Wilson1-5/+6
For consistency and segregation from the noisy DRM_DEBUG(). Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm/i915: Include 'i915_error_state' hint for when the GPU catches fireChris Wilson1-1/+2
Signed-off-by: Chris Wilson <[email protected]>
2011-02-07drm: add usb frameworkDave Airlie3-1/+119
This adds an initial framework to plug USB graphics devices into the drm/kms subsystem. I've started writing a displaylink driver using this interface. Signed-off-by: Dave Airlie <[email protected]>
2011-02-07drm: rework PCI/platform driver interface.Dave Airlie23-304/+405
This abstracts the pci/platform interface out a step further, we can go further but this is far enough for now to allow USB to be plugged in. The drivers now just call the init code directly for their device type. Signed-off-by: Dave Airlie <[email protected]>
2011-02-07drm: dumb scanout create/mmap for intel/radeon (v3)Dave Airlie11-38/+194
This is just an idea that might or might not be a good idea, it basically adds two ioctls to create a dumb and map a dumb buffer suitable for scanout. The handle can be passed to the KMS ioctls to create a framebuffer. It looks to me like it would be useful in the following cases: a) in development drivers - we can always provide a shadowfb fallback. b) libkms users - we can clean up libkms a lot and avoid linking to libdrm_*. c) plymouth via libkms is a lot easier. Userspace bits would be just calls + mmaps. We could probably mark these handles somehow as not being suitable for acceleartion so as top stop people who are dumber than dumb. Signed-off-by: Dave Airlie <[email protected]>
2011-02-07drm/i810: remove the BKLArnd Bergmann3-20/+8
SMP i810 systems were practically nonexistent and the configuration was not officially supported by Intel at the time when Pentium-III was common. With this change, it is still possible to build a distribution kernel that has support for SMP and includes the i810 driver without the BKL. As a precaution, check for the theoretical SMP case at run time and refuse to load the driver. We also need to disable CONFIG_PREEMPT builds for this driver. Signed-off-by: Arnd Bergmann <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-07drm: remove i830 driverArnd Bergmann7-2183/+17
This driver is one of the last users of the big kernel lock, which is going away. All the hardware supported by this driver also works with the newer i915 driver, and recent X.org releases only work with that driver anyway. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Chris Wilson <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-06drm/i915/lvds: Restore dithering on native modes for gen2/3Chris Wilson1-6/+6
A regression introduced in bee17e5 cleared the dithering bit for native modes on gen2/3. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/711568 Signed-off-by: Chris Wilson <[email protected]>
2011-02-04Merge branch 'drm-fixes' of ↵Linus Torvalds26-127/+375
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: (27 commits) gpu/stub: fix acpi_video build error, fix stub kconfig dependencies drm/radeon/kms: dynamically allocate power state space drm/radeon/kms: fix s/r issues with bios scratch regs agp: ensure GART has an address before enabling it Revert "agp: AMD AGP is used on UP1100 & UP1500 alpha boxen" amd-k7-agp: remove non-x86 code drm/radeon/kms/evergreen: always set certain VGT regs at CP init drm/radeon/kms: add updated ib_execute function for evergreen drm/radeon: remove 0x4243 pci id drm/radeon/kms: Enable new pll calculation for avivo+ asics drm/radeon/kms: add new pll algo for avivo asics drm/radeon/kms: add pll debugging output drm/radeon/kms: switch back to min->max pll post divider iteration drm/radeon/kms: rv6xx+ thermal sensor fixes drm/nv50: fix display on 0x50 drm/nouveau: correctly pair hwmon_init and hwmon_fini drm/i915: Only bind to function 0 of the PCI device drm/i915: Suppress spurious vblank interrupts drm: Avoid leak of adjusted mode along quick set_mode paths drm: Simplify and defend later checks when disabling a crtc ...
2011-02-04drm: Only set DPMS ON when actually configuring a modeKeith Packard1-6/+6
In drm_crtc_helper_set_config, instead of always forcing all outputs to DRM_MODE_DPMS_ON, only set them if the CRTC is actually getting a mode set, as any mode set will turn all outputs on. This fixes https://lkml.org/lkml/2011/1/24/457 Signed-off-by: Keith Packard <[email protected]> Cc: [email protected] (2.6.37) Reported-and-tested-by: Carlos R. Mafra <[email protected]> Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>