aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: Fallback to analog load detection when the EDID block is invalid.Francisco Jerez2010-01-151-1/+2
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix edid memleak in nouveau_connectorXavier Chantry2010-01-151-4/+13
| | | | | | | | This was spotted by kmemleak. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Break some long lines.Francisco Jerez2010-01-151-10/+19
| | | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: add NV18 device id to call_lvds_manufacturer_scriptAndrea Tacconi2010-01-151-1/+1
| | | | | | | | This fixes imac black screen (NV18 card) Signed-off-by: Andrea Tacconi <tacconet@libero.it> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: Fix typo in PGRAPH initialisation.Marcin Kościelnicki2010-01-141-1/+1
| | | | | | | This enables streamout functionality. Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: less magic DCB 1.5 parsingBen Skeggs2010-01-141-39/+40
| | | | | | | | This in the very least matches the parsing of all the previously known entries, and hopefully (at least closer to) correct for any we haven't seen yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: assume no nv04 board has a DCB tableBen Skeggs2010-01-141-8/+12
| | | | | | | | There's a report of a TNT2 where the DCB table pointer is *not* NULL (it contains a part of a VBIOS data string), and we assume this means a DCB table is present, causing all kinds of hilarity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove PRIV0 check in nouveau_mem_close()Ben Skeggs2010-01-141-3/+0
| | | | | | We don't setup PRIV0 anymore, so this is unnecessary. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: wait on fence after bo move if validating for another channelBen Skeggs2010-01-141-0/+2
| | | | | | | | | | | Not an ideal solution, but it'll do for the moment for correctness. We need to come up with a nicer way to manage inter-channel sync, the hw is unfortunately a little lacking in this area. Should fix some resume corruption, as well as corruption that may be seen while under memory pressure. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: trust init table registers are safeBen Skeggs2010-01-141-50/+9
| | | | | | | | | | | | | | | Apparently the original reason for checking this was there were known register accesses that caused hangs on some chipsets. This was more than likely because of incorrect parsing of previous opcodes, and I hardly think aborting a script half way through is going to be any better (in fact, we have had bug reports where this has been the cause of s/r failures among other things). This patch (which has been in Fedora 12 for a long time now) removes all checking for known register ranges, and just leaves the check to ensure the access is within the mapped aperture to avoid an oops. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: wait for pgraph to idle before unloading the contextMaarten Maathuis2010-01-141-0/+1
| | | | | | | | This should fix the problem with gpu hangs people have had when closing channels. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04: Fix set_operation software method.Marcin Kościelnicki2010-01-111-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: initialise DMA tracking parameters earlierBen Skeggs2010-01-113-6/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use dma.max rather than pushbuf size for checking GET validityBen Skeggs2010-01-111-1/+1
| | | | | | | Some upcoming G80 DMA changes will depend on this, but it's split out for bisectibility just in case it causes some unexpected issues. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04: differentiate between nv04/nv05Ben Skeggs2010-01-111-1/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Fix null deref in nouveau_fence_emit due to deleted fenceLuca Barbieri2010-01-111-20/+13
| | | | | | | | | | | | | | | | Currently Nouveau will unvalidate all buffers if it is forced to wait on one, and then start revalidating from the beginning. While doing so, it destroys the operation fence, causing nouveau_fence_emit to crash. This patch fixes this bug by taking the fence object out of validate_op and creating it just before emit. The fence pointer is initialized to 0 and unref'ed unconditionally. In addition to fixing the bug, this prevents its reintroduction and simplifies the code. Signed-off-by: Luca Barbieri <luca@luca-barbieri.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: prevent a possible ctxprog hangBen Skeggs2010-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | The below is mainly an educated guess at what's going on, docs would sure be handy... NVIDIA? :P It appears it's possible for a ctxprog to run even while a GPU exception is pending. The GF8 and up ctxprogs appear to have a small snippet of code which detects this, and stalls the ctxprog until it's been handled, which essentially looks like: if (r2 & 0x00008000) { r0 |= 0x80000000; while (r0 & 0x80000000) {} } I don't know of any way that flag would get cleared unless the driver intervenes (and indeed, in the cases I've seen the hang, nothing steps in to automagically clear it for us). This patch causes the driver to clear the flag during the PGRAPH IRQ handler. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: have ttm's fault handler called directlyBen Skeggs2010-01-111-29/+1
| | | | | | | There's no good reason for us to have our own anymore, this is left over from an early port to these TTM interfaces. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: restore correct cache1 get/put address on fifoctx loadBen Skeggs2010-01-111-4/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: create function for "dealing" with gpu lockupMarcin Slusarz2010-01-114-26/+22
| | | | | | | | It's mostly a cleanup, but in nv50_fbcon_accel_init gpu lockup message was printed, but HWACCEL_DISBALED flag was not set. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove unused nouveau_channel_idle() functionBen Skeggs2010-01-112-42/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix handling of fbcon colours in 8bppBen Skeggs2010-01-112-4/+10
| | | | | | | Depending on the visual, the colours handed to us in fillrect() can either be an actual colour, or an index into the pseudo-palette. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04: Context switching fixes.Francisco Jerez2010-01-111-74/+78
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Use the software object for fencing.Francisco Jerez2010-01-112-3/+4
| | | | | | | | | | | | | This should avoid a race condition on nv0x, if we're doing it with actual PGRAPH objects and a there's a fence within the FIFO DMA fetch area when a context switch kicks in. In that case we get an ILLEGAL_MTHD interrupt as expected, but the values in PGRAPH_TRAPPED_ADDR aren't calculated correctly and they're almost useless (e.g. you can see ILLEGAL_MTHDs for the now inactive channel, with a wrong offset/data pair). Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Allocate a per-channel instance of NV_SW.Francisco Jerez2010-01-116-24/+48
| | | | | | | | It will be useful for various synchronization purposes, mostly stolen from "[PATCH] drm/nv50: synchronize user channel after buffer object move on kernel channel" by Maarten Maathuis. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nv50: make the blocksize depend on vram sizeMaarten Maathuis2010-01-111-17/+19
| | | | | | | - This should be better than what we have now. - I'm less sure about the non power of two path. Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
* drm/nouveau: better alignment of bo sizes and use roundup instead of ALIGNMaarten Maathuis2010-01-112-4/+8
| | | | | | | - Aligning to block size should ensure that the extra size is enough. - Using roundup, because not all sizes are powers of two. Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
* drm/nouveau: Don't skip card take down on nv0x.Francisco Jerez2010-01-111-2/+2
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Implement nv42-nv43 TV load detection.Francisco Jerez2010-01-111-1/+89
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Clean up the nv17-nv4x load detection code a bit.Francisco Jerez2010-01-113-31/+37
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nv50: fix fillrect colorMarcin Slusarz2010-01-111-1/+2
| | | | | | | | struct fb_fillrect->color is not a color, but index into pseudo_palette array Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50: ignore vbios table's claim to the contrary if EDID says >8bpcBen Skeggs2010-01-111-0/+17
| | | | | | Should fix dim panel issues reported on Dell M6400/M6500. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Drop redundant placement initialization.Francisco Jerez2010-01-111-10/+2
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: No need to force evict=true when swapping evicted BOs back in.Francisco Jerez2010-01-111-1/+1
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Fix "general protection fault" in the flipd/flips eviction path.Francisco Jerez2010-01-111-2/+2
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/i2c/ch7006: Drop build time dependency to nouveau.Francisco Jerez2010-01-111-3/+2
| | | | | | | | This partially reverts e4b41066, as this driver is intended to be useful with any KMS driver for suitable hardware. The missing build dependency that commit workarounded was DRM_KMS_HELPER. Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Make the MM aware of pre-G80 tiling.Francisco Jerez2010-01-113-65/+265
| | | | | | | | | | | This commit has also the following 3 bugfix commits squashed into it from the nouveau git tree: drm/nouveau: Fix up the tiling alignment restrictions for nv1x. drm/nouveau: Fix up the nv2x tiling alignment restrictions. drm/nv50: fix align typo for g9x Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Pre-G80 tiling support.Francisco Jerez2010-01-118-147/+185
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* drm/nouveau: Add cache_flush/pull fifo engine functions.Francisco Jerez2010-01-113-0/+48
| | | | Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* Merge remote branch 'korg/drm-radeon-testing' into drm-testingDave Airlie2010-01-0829-468/+648
|\
| * drm/radeon/kms: Don't try to enable IRQ if we have no handler installedJerome Glisse2010-01-084-5/+28
| | | | | | | | | | | | | | | | | | If for any reason we haven't installed handler we shouldn't try to enable IRQ/MSI on the hw so we don't get unhandled IRQ/MSI which makes the kernel sad. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Avoid calling vblank function is vblank wasn't initializedJerome Glisse2010-01-081-1/+4
| | | | | | | | | | | | | | | | | | | | In some case vblank might not be initialized and we shouldn't try to use associated function. This patch make sure this is the case. It also export drm_vblank_cleanup so driver can cleanup vblank if for any reason IRQ/MSI is not working. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon: mkregtable.c: close a file before exitAlexander Beregalov2010-01-081-1/+3
| | | | | | | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: Make sure we release AGP device if we acquired itJerome Glisse2010-01-085-8/+6
| | | | | | | | | | | | | | | | | | In some case we weren't releasing the AGP device at module unloading. This leaded to unfunctional AGP at next module load. This patch make sure we release the AGP bus if we acquire it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: Schedule host path read cache flush through the ring V2Jerome Glisse2010-01-0813-32/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R300 family will hard lockup if host path read cache flush is done through MMIO to HOST_PATH_CNTL. But scheduling same flush through ring seems harmless. This patch remove the hdp_flush callback and add a flush after each fence emission which means a flush after each IB schedule. Thus we should have same behavior without the hard lockup. Tested on R100,R200,R300,R400,R500,R600,R700 family. V2: Adjust fence counts in r600_blit_prepare_copy() Signed-off-by: Jerome Glisse <jglisse@redhat.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: Workaround RV410/R420 CP errata (V3)Corbin Simpson2010-01-082-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Long story short, this fixes sporadic hardlocks with my rv410 during times of intense 2D acceleration (Flash on Fx3). V2: Fix indentation and move errata_fini to suspend function so we don't leak scratch register over suspend/resume cycle. V3: Move scratch_reg to asic specific structure (aim is to slowly move stuff to asic specific structure and avoid poluting radeon_device struct with asic specific variables) Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com> Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: detect sideport memory on IGP chipsAlex Deucher2010-01-088-3/+64
| | | | | | | | | | | | | | | | | | | | This detects if the sideport memory is enabled and if it is VRAM is evicted on suspend/resume. This should fix s/r issues on some IGPs. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon: fix a couple of array index errorsDarren Jenkins2010-01-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of array overruns, and some associated confusion in the code. This is just a wild guess at what the code should actually look like. Coverity CID: 13305 13306 agd5f: fix up the original intent of the timing code Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com> Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm/radeon/kms: add support for eDP (embedded DisplayPort)Alex Deucher2010-01-085-12/+32
| | | | | | | | | | | | | | | | This is displayport used for internal connections such as laptop panels and systems with integrated monitors. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
| * drm: Add eDP connector typeAlex Deucher2010-01-081-0/+1
| | | | | | | | | | | | | | | | | | | | Add a new connector type for eDP (embedded displayport) eDP is more or less the same as DP but there are some cases when you might want to handle it separately. Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>