summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon
Commit message (Collapse)AuthorAgeFilesLines
* drm/radeon: fix regression with AA resolve checkingDave Airlie2011-02-231-1/+1
| | | | | | | | Some userspaces can emit a whole packet without disabling AA resolve by the looks of it, so we have to deal with them. Signed-off-by: Dave Airlie <airlied@redhat.com> Tested-by: Jorg Otte <jrg.otte@googlemail.com>
* drm: drop commented out code and preceding commentPaul Bolle2011-02-231-2/+0
| | | | | | | | r100_gpu_init() was dropped in 90aca4d ("drm/radeon/kms: simplify & improve GPU reset V2") but here it was only commented out. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: align height of fb allocation.Dave Airlie2011-02-231-1/+4
| | | | | | | | this aligns the height of the fb allocation so it doesn't trip over the size checks later when we use this from userspace to copy the buffer at X start. Signed-off-by: Dave Airlie <airlied@redhat.com>
* Revert "drm/radeon/kms: switch back to min->max pll post divider iteration"Alex Deucher2011-02-231-1/+1
| | | | | | | | | | | | | | | | | | | This reverts commit a6f9761743bf35b052180f4a8bdae4d2cc0465f6. Remove this commit as it is no longer necessary. The relevant bugs were fixed properly in: drm/radeon/kms: hopefully fix pll issues for real (v3) 5b40ddf888398ce4cccbf3b9d0a18d90149ed7ff drm/radeon/kms: add missing frac fb div flag for dce4+ 9f4283f49f0a96a64c5a45fe56f0f8c942885eef This commit also broke certain ~5 Mhz modes on old arcade monitors, so reverting this commit fixes: https://bugzilla.kernel.org/show_bug.cgi?id=29502 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add missing frac fb div flag for dce4+Alex Deucher2011-02-171-1/+3
| | | | | | | | | | | | | | The fixed ref/post dividers are set by the AdjustPll table rather than the ss info table on dce4+. Make sure we enable the fractional feedback dividers when using a fixed post or ref divider on them as well. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=29272 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: do not reject X16 and Y16X16 floating-point formats on r300Marek Olšák2011-02-171-0/+2
| | | | | Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: hopefully fix pll issues for real (v3)Alex Deucher2011-02-151-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 <justinmattock@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add bounds checking to avivo pll algoAlex Deucher2011-02-151-0/+10
| | | | | | | | | | Prevent divider overflow. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28932 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix a few more atombios endian issuesAlex Deucher2011-02-152-7/+7
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: improve 6xx/7xx CS error outputAlex Deucher2011-02-141-20/+26
| | | | | | | | Makes debugging CS rejections much easier. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: check AA resolve registers on r300Marek Olšák2011-02-148-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 <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix tracking of BLENDCNTL, COLOR_CHANNEL_MASK, and GB_Z on r300Marek Olšák2011-02-145-12/+5
| | | | | | | Also move ZB_DEPTHCLEARVALUE to the list of safe regs. Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: use linear aligned for evergreen/ni bo blitsAlex Deucher2011-02-141-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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: use linear aligned for 6xx/7xx bo blitsAlex Deucher2011-02-141-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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix race between GPU reset and TTM delayed delete thread.Dave Airlie2011-02-141-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 <airlied@redhat.com>
* drm/radeon/kms: evergreen/ni big endian fixes (v2)Alex Deucher2011-02-144-10/+40
| | | | | | | | | Based on 6xx/7xx endian fixes from Cédric Cano. v2: fix typo in shader Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: 6xx/7xx big endian fixesCédric Cano2011-02-146-20/+54
| | | | | | | | agd5f: minor cleanups Signed-off-by: Cédric Cano <ccano@interfaceconcept.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: atombios big endian fixesCédric Cano2011-02-143-52/+52
| | | | | | | | agd5f: additional cleanups/fixes Signed-off-by: Cédric Cano <ccano@interfaceconcept.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: 6xx/7xx non-kms endian fixesCédric Cano2011-02-143-9/+34
| | | | | | | | agd5f: minor cleanups Signed-off-by: Cédric Cano <ccano@interfaceconcept.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: optimize CS state checking for r100->r500Marek Olšák2011-02-144-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 <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add connector table for mac g5 9600Alex Deucher2011-02-142-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* radeon mkregtable: Add missing fclose() callsJesper Juhl2011-02-141-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 <jj@chaosbits.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix interlaced modes on dce4+Alex Deucher2011-02-142-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: fix memory debugging since d961db75ce86a84f1f04e91ad1014653ed7d9f46Dave Airlie2011-02-141-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: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: dynamically allocate power state spaceAlex Deucher2011-02-044-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: fix s/r issues with bios scratch regsAlex Deucher2011-02-041-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms/evergreen: always set certain VGT regs at CP initAlex Deucher2011-02-041-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add updated ib_execute function for evergreenAlex Deucher2011-02-045-6/+26
| | | | | | | | Adds new packet to disable DX9 constant emulation. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: Enable new pll calculation for avivo+ asicsAlex Deucher2011-02-023-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add new pll algo for avivo asicsAlex Deucher2011-02-024-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: add pll debugging outputAlex Deucher2011-02-021-0/+4
| | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: switch back to min->max pll post divider iterationAlex Deucher2011-02-021-1/+1
| | | | | | | | | Seems more reliable. Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=26552 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: rv6xx+ thermal sensor fixesAlex Deucher2011-02-025-25/+37
| | | | | | | | | Some fixes to the thermal sensor code: - handle negative numbers - properly handle temp calculation on different asics Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon: Fix wrong boolean operatorStefan Weil2011-01-311-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 <airlied@linux.ie> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-fixes' of ↵Linus Torvalds2011-01-2813-33/+91
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * drm/radeon/kms: re-emit full context state for evergreen blitsAlex Deucher2011-01-281-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 <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/radeon/kms: release CMASK access in preclose_kmsMarek Olšák2011-01-281-0/+2
| | | | | | | | | | Signed-off-by: Marek Olšák <maraeo@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/radeon/kms: fix r6xx+ scanout on BE systemsAlex Deucher2011-01-272-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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/radeon/kms: clean up some magic numbersAlex Deucher2011-01-277-21/+29
| | | | | | | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * drm/radeon/kms: only enable HDMI mode if radeon audio is enabledAlex Deucher2011-01-271-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 <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
| * radeon/kms: fix dp displayport mode validationJerome Glisse2011-01-271-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 <jglisse@redhat.com> Reviewed-By: Alex Deucher <alexdeucher@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Dave Airlie <airlied@gmail.com>
* | console: rename acquire/release_console_sem() to console_lock/unlock()Torben Hohn2011-01-261-5/+5
|/ | | | | | | | | | | | | | | | | | | | | | | | | 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. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: make console_trylock return 1 on success, per Geert] Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: Thomas Gleixner <tglx@tglx.de> Cc: Greg KH <gregkh@suse.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* drm/radeon/kms: add new radeon_info ioctl query for clock crystal freqAlex Deucher2011-01-252-1/+5
| | | | | | | Needed for timer queries in the 3D driver. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: simplify atom adjust pll setupAlex Deucher2011-01-241-17/+5
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: match r6xx/r7xx/evergreen asic_reset with previous asicsAlex Deucher2011-01-242-0/+6
| | | | | | | | | | | Don't reset if the engine isn't busy. This matches the behavior of previous asics. Reseting a non-hung block can lead to a hang. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33272 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: make the mac rv630 quirk genericAlex Deucher2011-01-241-9/+5
| | | | | | | | | Seems some other boards do this as well. Reported-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: fix a spelling error in an error messageAlex Deucher2011-01-241-1/+1
| | | | | Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: Initialize pageflip spinlocks.Michel Dänzer2011-01-241-0/+3
| | | | | | | I'm amazed but not really surprised this worked on x86... Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
* drm/radeon/kms: balance asic_reset functionsAlex Deucher2011-01-173-18/+20
| | | | | | | | | | | | | | | | | | First, we were calling mc_stop() at the top of the function which turns off all MC (memory controller) clients, then checking if the GPU is idle. If it was idle we returned without re-enabling the MC clients which would lead to a blank screen, etc. This patch checks if the GPU is idle before calling mc_stop(). Second, if the reset failed, we were returning without re-enabling the MC clients. This patch re-enables the MC clients before returning regardless of whether the reset was successful or not. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Cc: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/radeon/kms: remove duplicate card_posted() functionsAlex Deucher2011-01-173-46/+3
| | | | | | | Use the common one for all asics. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud