aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
AgeCommit message (Collapse)AuthorFilesLines
2011-02-04drm/radeon/kms: dynamically allocate power state spaceAlex Deucher4-15/+42
We previously used a static array, but some new systems had more states then we had array space, so dynamically allocate space based on the number of states in the vbios. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33851 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-04drm/radeon/kms: fix s/r issues with bios scratch regsAlex Deucher1-3/+6
The accelerate mode bit gets checked by certain atom command tables to set up some register state. It needs to be clear when setting modes and set when not. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=26942 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-04drm/radeon/kms/evergreen: always set certain VGT regs at CP initAlex Deucher1-1/+6
These should be handled by the clear_state setup, but set them directly as well just to be sure. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-04drm/radeon/kms: add updated ib_execute function for evergreenAlex Deucher5-6/+26
Adds new packet to disable DX9 constant emulation. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-02drm/i915: Invalidate TLB caches on SNB BLT/BSD ringsChris Wilson2-11/+19
Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-02drm/radeon/kms: Enable new pll calculation for avivo+ asicsAlex Deucher3-12/+19
New algo is used for r5xx+ and legacy is used for r1xx-r4xx, rv515. I've tested on all relevant GPUs and monitors that I have access to and have found no problems. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=26562 https://bugzilla.kernel.org/show_bug.cgi?id=26552 May fix: https://bugs.freedesktop.org/show_bug.cgi?id=32556 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-02drm/radeon/kms: add new pll algo for avivo asicsAlex Deucher4-19/+137
Based on the vbios code. This should hopefully fix the pll problems on a number of avivo asics once it's enabled. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-02drm/radeon/kms: add pll debugging outputAlex Deucher1-0/+4
Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-02drm/radeon/kms: switch back to min->max pll post divider iterationAlex Deucher1-1/+1
Seems more reliable. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=26552 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-02-02drm/radeon/kms: rv6xx+ thermal sensor fixesAlex Deucher5-25/+37
Some fixes to the thermal sensor code: - handle negative numbers - properly handle temp calculation on different asics Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-02-02Merge remote branch 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next ↵Dave Airlie2-3/+2
into drm-fixes * 'nouveau/drm-nouveau-next' of /ssd/git/drm-nouveau-next: drm/nv50: fix display on 0x50 drm/nouveau: correctly pair hwmon_init and hwmon_fini
2011-02-02Merge remote branch 'intel/drm-intel-fixes' of /ssd/git/drm-next into drm-fixesDave Airlie8-43/+96
* 'intel/drm-intel-fixes' of /ssd/git/drm-next: 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 drm: Don't switch fb when disabling an output drm/i915: Reset crtc after resume drm/i915/crt: Force the initial probe after reset drm/i915: Reset state after a GPU reset or resume drm: Add an interface to reset the device drm/i915/sdvo: If at first we don't succeed in reading the response, wait
2011-02-02drm/nv50: fix display on 0x50Ben Skeggs1-2/+1
Accidently busted a while back. We'll be creating objects that aren't necessary here, but, they're never used so no harm.. Signed-off-by: Ben Skeggs <[email protected]>
2011-02-02drm/nouveau: correctly pair hwmon_init and hwmon_finiLucas Stach1-1/+1
I broke this with my commit 07cfe0e7a820ecad078c04e9c2a102521709145d This fixes fdo #33434 Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2011-02-01drm/i915: Only bind to function 0 of the PCI deviceChris Wilson1-0/+8
Early chipsets (gen2/3) used function 1 as a placeholder for multi-head. We used to ignore these since they were not assigned to PCI_CLASS_DISPLAY_VGA. However with 934f992c7 we attempt to bind to all Intel PCI_CLASS_DISPLAY devices (and functions) to work in multi-gpu systems. This fails hard on gen2/3. Reported-by: Ferenc Wágner <[email protected]> Tested-by: Ferenc Wágner <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=28012 Signed-off-by: Chris Wilson <[email protected]> Cc: [email protected]
2011-02-01drm/i915: Enable GMBUS for post-gen2 chipsetsChris Wilson1-1/+2
With the recent SDVO fix, this is working on all the machines I have to hand - except for an 845G. Signed-off-by: Chris Wilson <[email protected]>
2011-02-01Merge branch 'drm-intel-fixes' into drm-intel-nextChris Wilson8-43/+88
Merge resume fixes from -fixes and an important fix for SDVO GMBUS.
2011-02-01drm/i915: Remove unreachable conditionChris Wilson1-2/+1
Fortunately unreachable. For Crestline, the watermarks must always be programmed to 8... Signed-off-by: Chris Wilson <[email protected]>
2011-02-01drm/i915: Override SDVO panel type in VBTChris Wilson3-8/+18
Judging by comments in the BIOS, if the SDVO LVDS option h40 is enabled, then we are supposed to query the real panel type via Int15. We don't do this and so for the Sony Vaio VGC-JS210J which has otherwise default values, we choose the wrong mode. This patch adds a driver option, i915.vbt_sdvo_panel_type, which can be used to override the value in the VBT. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33691 Signed-off-by: Chris Wilson <[email protected]>
2011-02-01drm/i915: Trivial spelling mistake 'assertiing'Chris Wilson1-2/+2
Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm/i915: Suppress spurious vblank interruptsChris Wilson2-7/+8
Hugh Dickins found that characters in xterm were going missing and oft delayed. Being the curious type, he managed to associate this with the new high-precision vblank patches; disabling these he found, restored the orderliness of his characters. The oddness begins when one realised that Hugh was not using vblanks at all on his system (fvwm and some xterms). Instead, all he had to go on were warning of a pipe underrun, curiously enough at around 60Hz. He poked and found that in addition to the underrun warning, the hardware was flagging the start of a new frame, a vblank, which in turn was kicking off the pending vblank processing code. There is little we can do for the underruns on Hugh's machine, a Crestline [965GM], which must have its FIFO watermarks set to 8. However, we do not need to process the vblank if we know that they are disabled... Reported-by: Hugh Dickins <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm: Avoid leak of adjusted mode along quick set_mode pathsChris Wilson1-5/+3
Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm: Simplify and defend later checks when disabling a crtcChris Wilson1-3/+6
By setting the FB of a CRTC to NULL, we are turning off the CRTC (and so disable the unused encoders and connectors). As such we can simplify the later tests by making sure the set->mode is NULL. Setting the num_connectors to zero means that we do not need to loop over the unused connectors. All current usage appears correct, this only builds additional defense into the routine. References: https://bugzilla.kernel.org/show_bug.cgi?id=27722 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm: Don't switch fb when disabling an outputChris Wilson1-2/+2
In drm_crtc_helper_set_config, we call drm_crtc_helper_set_mode which may return early and do no operation if the crtc is to be disabled. In this case we merrily swap to the new fb, discarding the old_fb believing that it has been cleaned up. However, due to the early return, the old_fb was not presented to the backend for correct reaping, and nor was the new one - which is about to be reaped via the drm_helper_disable_unused_functions(), leading to incorrect refcounting of the pinned objects. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27722 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29230 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-31drm/radeon: Fix wrong boolean operatorStefan Weil1-1/+1
This error is reported by cppcheck: drivers/gpu/drm/radeon/radeon_encoders.c:1066: warning: Mutual exclusion over || always evaluates to true. Did you intend to use && instead? It looks like cppcheck is correct, so fix this. No test was run. Cc: David Airlie <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-28drm/i915: Record all error ringbuffersChris Wilson3-18/+29
Signed-off-by: Chris Wilson <[email protected]>
2011-01-28Merge branch 'drm-fixes' of ↵Linus Torvalds20-45/+132
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/nv50: fix regression on IGPs drm/radeon/kms: re-emit full context state for evergreen blits drm/radeon/kms: release CMASK access in preclose_kms drm/radeon/kms: fix r6xx+ scanout on BE systems drm/radeon/kms: clean up some magic numbers drm/radeon/kms: only enable HDMI mode if radeon audio is enabled radeon/kms: fix dp displayport mode validation drm/nvc0/grctx: correct an off-by-one drm/nv50: Fix race with PFIFO during PGRAPH context destruction. drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200. drm/nvc0: implement irq handler for whatever's at 0x14xxxx drm/nvc0: fix incorrect TPC register setup drm/nouveau: probe for adt7473 before f75375 drm/nouveau: remove dead function definition
2011-01-28Merge branch 'drm-nouveau-next' of ↵Dave Airlie1-5/+0
git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes * 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nv50: fix regression on IGPs
2011-01-28drm/nv50: fix regression on IGPsBen Skeggs1-5/+0
Signed-off-by: Ben Skeggs <[email protected]>
2011-01-28drm/radeon/kms: re-emit full context state for evergreen blitsAlex Deucher1-6/+33
clear state doesn't seem to work properly in some cases Fixes hangs in heavy 3D on some evergreen cards reported on IRC. May fix: https://bugs.freedesktop.org/show_bug.cgi?id=33381 possibly others. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] Signed-off-by: Dave Airlie <[email protected]>
2011-01-28drm/radeon/kms: release CMASK access in preclose_kmsMarek Olšák1-0/+2
Signed-off-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-27ttm: Expand (*populate) to support an array of DMA addresses.Konrad Rzeszutek Wilk5-5/+9
We pass in the array of ttm pages to be populated in the GART/MM of the card (or AGP). Patch titled: "ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set." uses the DMA API to make those pages have a proper DMA addresses (in the situation where page_to_phys or virt_to_phys do not give use the DMA (bus) address). Since we are using the DMA API on those pages, we should pass in the DMA address to this function so it can save it in its proper fields (later patches use it). [v2: Added reviewed-by tag] Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Ian Campbell <[email protected]>
2011-01-27ttm: Utilize the DMA API for pages that have TTM_PAGE_FLAG_DMA32 set.Konrad Rzeszutek Wilk1-3/+23
For pages that have the TTM_PAGE_FLAG_DMA32 flag set we use the DMA API. We save the bus address in our array which we use to program the GART (see "radeon/ttm/PCIe: Use dma_addr if TTM has set it." and "nouveau/ttm/PCIe: Use dma_addr if TTM has set it."). The reason behind using the DMA API is that under Xen we would end up programming the GART with the bounce buffer (SWIOTLB) DMA address instead of the physical DMA address of the TTM page. The reason being that alloc_page with GFP_DMA32 does not allocate pages under the the 4GB mark when running under Xen hypervisor. Under baremetal this means we do the DMA API call earlier instead of when we program the GART. For details please refer to: https://lkml.org/lkml/2011/1/7/251 [v2: Fixed indentation, revised desc, added Reviewed-by] Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Ian Campbell <[email protected]>
2011-01-27ttm: Introduce a placeholder for DMA (bus) addresses.Konrad Rzeszutek Wilk2-5/+13
This is right now limited to only non-pool constructs. [v2: Fixed indentation issues, add review-by tag] Reviewed-by: Thomas Hellstrom <[email protected]> Signed-off-by: Konrad Rzeszutek Wilk <[email protected]> Tested-by: Ian Campbell <[email protected]>
2011-01-27drm/i915: Defer reporting EIO until we try to use the GPUChris Wilson4-28/+18
Instead of reporting EIO upfront in the entrance of an ioctl that may or may not attempt to use the GPU, defer the actual detection of an invalid ioctl to when we issue a GPU instruction. This allows us to continue to use bo in video memory (via pread/pwrite and mmap) after the GPU has hung. Signed-off-by: Chris Wilson <[email protected]>
2011-01-27drm/i915: Check wedged status before throttlingChris Wilson1-0/+3
Signed-off-by: Chris Wilson <[email protected]>
2011-01-27drm/radeon/kms: fix r6xx+ scanout on BE systemsAlex Deucher2-1/+22
R6xx+ have per-block swappers. BE content in the framebuffer will now be swapped properly during scanout. Untested, however, the same code is reported working in the UMS ddx. Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-27drm/radeon/kms: clean up some magic numbersAlex Deucher7-21/+29
Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-27drm/radeon/kms: only enable HDMI mode if radeon audio is enabledAlex Deucher1-3/+3
Force DVI mode if the user specifies radeon.audio=0. The driver doesn't handle HDMI mode properly in some cases. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27731 Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-27radeon/kms: fix dp displayport mode validationJerome Glisse1-2/+2
Check if there is a big enough dp clock & enough dp lane to drive the video mode provided. Signed-off-by: Jerome Glisse <[email protected]> Reviewed-By: Alex Deucher <[email protected]> Cc: <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2011-01-26drm/i915/sdvo: Add BUILD_BUG_ON to warn if the structs are ever miscompiledChris Wilson1-0/+9
Signed-off-by: Chris Wilson <[email protected]>
2011-01-26drm/i915/sdvo: Use a compact test for determining a multi-function deviceChris Wilson1-27/+3
Signed-off-by: Chris Wilson <[email protected]>
2011-01-26Merge branch 'drm-nouveau-next' of ↵Dave Airlie6-7/+41
git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes * 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nvc0/grctx: correct an off-by-one drm/nv50: Fix race with PFIFO during PGRAPH context destruction. drm/nouveau: Workaround incorrect DCB entry on a GeForce3 Ti 200. drm/nvc0: implement irq handler for whatever's at 0x14xxxx drm/nvc0: fix incorrect TPC register setup drm/nouveau: probe for adt7473 before f75375 drm/nouveau: remove dead function definition
2011-01-26console: rename acquire/release_console_sem() to console_lock/unlock()Torben Hohn2-9/+9
The -rt patches change the console_semaphore to console_mutex. As a result, a quite large chunk of the patches changes all acquire/release_console_sem() to acquire/release_console_mutex() This commit makes things use more neutral function names which dont make implications about the underlying lock. The only real change is the return value of console_trylock which is inverted from try_acquire_console_sem() This patch also paves the way to switching console_sem from a semaphore to a mutex. [[email protected]: coding-style fixes] [[email protected]: make console_trylock return 1 on success, per Geert] Signed-off-by: Torben Hohn <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Greg KH <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2011-01-25drm/i915: Reset crtc after resumeChris Wilson1-3/+14
Based on a patch by Takashi Iwai. Reported-by: Matthias Hopf <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=27272 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915/crt: Force the initial probe after resetChris Wilson1-0/+10
Upon resume, like after a cold boot, we need to forcibly probe the analog connector and cannot rely on the hotplug status. Based on a patch by Takashi Iwai. Reported-by: Stefan Dirsch <[email protected]> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=26952 Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: Reset state after a GPU reset or resumeChris Wilson1-0/+2
Call drm_mode_config_reset() after an invalidation event to restore any cached state to unknown. Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm: Add an interface to reset the deviceChris Wilson1-0/+20
Iterate over the attached CRTCs, encoders and connectors and call the supplied reset vfunc in order to reset any cached state back to unknown. Useful after an invalidation event such as a GPU reset or resuming. Tested-by: Takashi Iwai <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915/sdvo: If at first we don't succeed in reading the response, waitChris Wilson1-23/+23
We were not pausing after detecting the response was pending and so did not allow the hardware sufficient time to complete before aborting. This lead to transient failures whilst probing SDVO devices. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30235 Reported-by: Knut Petersen <[email protected]> Signed-off-by: Chris Wilson <[email protected]>
2011-01-25drm/i915: use VDD AUX override to make panel power sequencing look betterJesse Barnes2-7/+59
Rather than power cycling the panel when there are no bits to display, use the VDD AUX bit to power the panel up just enough for DP AUX transactions to work. This prevents a bit of unnecessary ugliness as mode sets occur on the panel. Signed-off-by: Jesse Barnes <[email protected]> Signed-off-by: Chris Wilson <[email protected]>