summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* nouveau: Set special lane map for the right chipsetHenrik Rydberg2012-04-191-1/+1
| | | | | | | | | | | The refactoring of the nv50 logic, introduced in 8663bc7c, modified the test for the special lane map used on some Apple computers with Nvidia chipsets. The tested MBA3,1 would still boot, but resume from suspend stopped working. This patch restores the old test, which fixes the problem. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/pm: don't read/write beyond end of stack bufferJim Meyering2012-04-191-0/+1
| | | | | | | | | | | | | NUL-terminate after strncpy. If the parameter "profile" has length 16 or more, then strncpy leaves "string" with no NUL terminator, so the following search for '\n' may read beyond the end of that 16-byte buffer. If it finds a newline there, then it will also write beyond the end of that stack buffer. Signed-off-by: Jim Meyering <meyering@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Revert "nouveau/bios: Fix tracking of BIOS image data"Linus Torvalds2012-04-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d06221c0617ab6d0bc41c4980cefdd9c8cc9a1c1. It turns out to trigger the "BUG_ON(!PageCompound(page))" in kfree(), apparently because the code ends up trying to free somethng that was never kmalloced in the first place. BenH points out that the patch was untested and wasn't meant to go into the upstream kernel that quickly in the first place. Backtrace: bios_shadow bios_shadow_prom nv_mask init_io bios_shadow nouveau_bios_init NVReadVgaCrtc NVSetOwner nouveau_card_init nouveau_load Reported-by: Meelis Roos <mroos@linux.ee> Requested-by: Dave Airlie <airlied@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* nouveau/bios: Fix tracking of BIOS image dataBenjamin Herrenschmidt2012-04-021-1/+3
| | | | | | | | | | | | | | | | | | The code tries various methods for retreiving the BIOS data. However it doesn't clear the bios->data pointer between the iterations. In some cases, the shadow() method will fail and not update bios->data at all, which will cause us to "score" the old data and incorrectly attribute that score to the new method. This can cause double frees later when disposing of the unused data. Additionally, we were not freeing the data for methods that fail the score test (we only freed when a "best" is superseeded, not when the new method has a lower score than the exising "best"). Fix that as well. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: Fix crash when pci_ram_rom() returns a size of 0Benjamin Herrenschmidt2012-04-021-2/+3
| | | | | | | | | | | | | | | | | From b15b244d6e6e20964bd4b85306722cb60c3c0809 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon, 2 Apr 2012 13:28:18 +1000 Subject: Under some circumstances, pci_map_rom() can return a valid mapping but a size of 0 (if it cannot find an image in the header). This causes nouveau to try to kmalloc() a 0 sized pointer and dereference it, which crashes. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: select POWER_SUPPLYDave Airlie2012-04-021-0/+1
| | | | | | | | | | Ben H. reported that building nouveau into the kernel and power supply as a module was broken. Just have nouveau select it, like radeon does. Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: inform userspace of relaxed kernel subchannel requirementsBen Skeggs2012-03-291-9/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"Ben Skeggs2012-03-292-6/+13
| | | | | | | | | | This reverts commit a81f15499887d3f9f24ec70bb9b7e778942a6b7b. Gah, we have a released userspace component using fixed subc assignment that conflicts with this. To avoid breaking ABI this needs to be reverted. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: oops, create m2mf for nvd9 tooBen Skeggs2012-03-291-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix thinko/regression on really old chipsetsBen Skeggs2012-03-261-3/+3
| | | | | | | Fixes i2c on my TNT2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: default to 8bpc for non-LVDS panels if EDID isn't usefulBen Skeggs2012-03-261-3/+6
| | | | | | | | A few reports of bad behaviour since the autodetection defaulted to 6bpc, lets fix this. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau: fix thinko causing init to fail on cards without accelBen Skeggs2012-03-261-1/+1
| | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* Merge branch 'drm-nouveau-next' of ↵Dave Airlie2012-03-2217-184/+286
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-next * 'drm-nouveau-next' of git://git.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/dp: support version 4.0 of DP table drm/nve0/disp: nvidia randomly decided to move the dithering method drm/nve0: initial modesetting support for kepler chipsets drm/nouveau: add bios connector type for dms59 drm/nouveau: move out of staging drivers drm/nouveau: bump version to 1.0.0 drm/nvd0/disp: ignore clock set if no pclk drm/nouveau: oops, increase channel dispc_vma to 4 drm/nouveau: inform userspace of new kernel subchannel requirements drm/nouveau: remove m2mf creation on userspace channels drm/nvc0-/disp: reimplement flip completion method as fifo method drm/nouveau: move fence sequence check to start of loop drm/nouveau: remove subchannel names from places where it doesn't matter drm/nouveau/ttm: always do buffer moves on kernel channel
| * drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs2012-03-233-1/+19
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nve0/disp: nvidia randomly decided to move the dithering methodBen Skeggs2012-03-231-1/+8
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nve0: initial modesetting support for kepler chipsetsBen Skeggs2012-03-232-7/+55
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: add bios connector type for dms59Ben Skeggs2012-03-222-7/+8
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: bump version to 1.0.0Ben Skeggs2012-03-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | The time has come to get a proper version number that we can change to indicate new features etc, rather than the lock-step 0.0.XX that we previously had. libdrm has recognised this version as compatible with 0.0.16 since 2.4.22, so hopefully any breakage people see should be very minimal. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvd0/disp: ignore clock set if no pclkBen Skeggs2012-03-221-1/+3
| | | | | | | | | | | | | | | | | | This happens somehow during init on a machine I have, and leads to a divide-by-zero. Lets avoid that... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: oops, increase channel dispc_vma to 4Ben Skeggs2012-03-221-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: inform userspace of new kernel subchannel requirementsBen Skeggs2012-03-222-13/+6
| | | | | | | | | | | | | | | | | | | | | | All available subchannels are now available for userspace to do with as it pleases on NVC0+. On all earlier chipsets, the kernel still uses a software object on subc 0 to implement the page flip completion method. I hope to find some decent way of addressing this too, but it's a tad tricker prior to fermi. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: remove m2mf creation on userspace channelsBen Skeggs2012-03-224-81/+93
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0-/disp: reimplement flip completion method as fifo methodBen Skeggs2012-03-224-18/+42
| | | | | | | | | | | | Removes need for M2MF subchannel usage on NVC0+. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: move fence sequence check to start of loopBen Skeggs2012-03-221-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | I want to be able to use REF_CNT from other places in the kernel without pushing a fence object onto the list of emitted fences. The current code makes an assumption that every time the acked sequence is bumped that there's at least one fence on the list that'll be signalled. This will no longer be true in the near future. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: remove subchannel names from places where it doesn't matterBen Skeggs2012-03-224-25/+38
| | | | | | | | | | | | These are FIFO methods, it doesn't matter what subchannel is being used. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/ttm: always do buffer moves on kernel channelBen Skeggs2012-03-223-19/+4
| | | | | | | | | | | | | | | | | | There was once good reasons for wanting the drm to be able to use M2MF etc on user channels, but they're not relevant anymore. For the general buffer move case, we've already lost by transferring between vram/sysmem already so the context switching overhead is minimal in comparison. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge tag 'drm-intel-next-2012-03-01' of ↵Dave Airlie2012-03-201-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://people.freedesktop.org/~danvet/drm-intel into drm-next * tag 'drm-intel-next-2012-03-01' of git://people.freedesktop.org/~danvet/drm-intel: drm/i915: Only clear the GPU domains upon a successful finish drm/i915: reenable gmbus on gen3+ again drm/i915: i2c: unconditionally set up gpio fallback drm/i915: merge gmbus and gpio i2c adpater into one drm/i915: merge struct intel_gpio into struct intel_gmbus i2c: export bit-banging algo functions drm/nouveau: do a better job at hiding the NIH i2c bit-banging algo drm/i915: add dev_priv to intel_gmbus drm/i915: Fix single msg gmbus_xfers writes drm/i915: error_buffer->ring should be signed drm/i915: Silence the error message from i915_wait_request() drm/i915: use the new hdmi_force_audio enum more drm/i915: No need to search again after retiring requests drm/i915: Only bump refcnt on objects scheduled for eviction drm/i915/bios: Downgrade the "signature missing" DRM_ERROR to debug drm/i915: Ignore LVDS on hp t5745 and hp st5747 thin client drm/i915: Fixes distorted external screen image on HP 2730p
| * | drm/nouveau: do a better job at hiding the NIH i2c bit-banging algoDaniel Vetter2012-02-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd like to export the corresponding functions from the i2c core so that I can use them in fallback bit-banging in i915.ko v2: Adapt to new i2c export patch. Cc: nouveau@lists.freedesktop.org Acked-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
* | | drm: Add drm_mode_copy()Ville Syrjälä2012-03-152-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | Add a helper function to copy a display mode. Use it in drm_mode_duplicate() and nouveau mode_fixup hooks. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* | | drm/nouveau: add userspace fallback hints.Dave Airlie2012-03-151-0/+3
| |/ |/| | | | | | | | | This lets the modesetting driver work better. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | drm/nouveau: map first page of mmio early and determine chipset earlierBen Skeggs2012-03-132-63/+62
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvd0/disp: disconnect encoders before reprogramming themBen Skeggs2012-03-131-33/+33
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvd0/disp: move syncs/magic setup to or mode_setBen Skeggs2012-03-131-20/+39
| | | | | | | | | | | | | | | | | | | | NVIDIA appear to do these around the same place they do the MODE_CTRL methods, and for DP at least we need to bash some extra bits in "syncs" to keep EVO happy. It's a bit of a guess as to the 6/8bpc, but i have no better idea yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/dp: account for channel coding overhead in link trainingBen Skeggs2012-03-131-0/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvd0/disp: fix dcb sor link matching in supervisor handlerBen Skeggs2012-03-131-8/+9
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvd0/disp: initial implementation of displayportBen Skeggs2012-03-132-4/+171
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/dp: make dp dpms function common, call from sor code insteadBen Skeggs2012-03-133-22/+31
| | | | | | | | | | | | GF119 will use this too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv50/hwsq: some nv92 fixesMartin Peres2012-03-131-2/+3
| | | | | | | | | | | | | | | | The shift from hwsq_data = 0x1400 to 0x080000 actually happened in nv94, not nv92 This fixes some reclocking issues on my newly acquired nv92 Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/dp: move all nv50/sor-specific code out of nouveau_dp.cBen Skeggs2012-03-135-228/+231
| | | | | | | | | | | | | | Off-chip encoders (which we don't support yet anyway), and newer chipsets (such as NVD9...), will need their own code for this. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/dp: make functions for executing various bios tablesBen Skeggs2012-03-131-9/+46
| | | | | | | | | | | | | | More code to do the same thing, but will make it easier to handle various changes that could possibly happen the the VBIOS tables. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/pm: fix oops if chipset has no pm support at allBen Skeggs2012-03-131-3/+5
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/bios: rework vbios shadowingBen Skeggs2012-03-132-121/+158
| | | | | | | | | | | | | | | | | | Refactored to allow shadowing of VBIOS images longer than 64KiB, which allows us to pass the VBIOS checksum test on certain boards. There's also a workaround for reading the PROM VBIOS on some chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/bios: attempt acpi rom fetch before pciromBen Skeggs2012-03-131-1/+1
| | | | | | | | | | | | | | There's cards out there with completely messed up PCIROM images that have a perfectly valid signature.. Sigh! Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvd0/disp: attempt to handle more than 2 crtcs if possibleBen Skeggs2012-03-131-19/+14
| | | | | | | | | | | | | | Theoretically handles CRTC2/CRTC3, should any GF119 out there actually have them enabled. The room is there for the regs etc, so why not :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvc0/vram: get part count from PUNITSBen Skeggs2012-03-131-16/+14
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nv40/pm: fix fanspeed regressionBen Skeggs2012-03-131-0/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/pm: several fixes for nvc0 memory timingsRoy Spliet2012-03-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | This patch fixes two small issues in timing generation as spotted on several NVCx cards. In addition, the header of the file is updated to also contain (some of) the current developers of this code. Signed-off-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nvc0/pm: restrict pll mode to clocks that can actually use itBen Skeggs2012-03-131-1/+1
| | | | | | | | | | | | | | Fixes reclocking failure on some chips where we attempted to set PDAEMON to PLL mode. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/dp: fix bad comparison in dp_link_train_commit()Xi Wang2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | The comparison (lpre == DP_TRAIN_PRE_EMPHASIS_9_5) is always false: lpre is initialized as (lane & 0x0c) >> 2, which is at most 3, while DP_TRAIN_PRE_EMPHASIS_9_5 is defined as (3 << 3). Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | drm/nouveau/mxm: call mxmi to determine revision before calling mxmsBen Skeggs2012-03-131-1/+38
| | | | | | | | | | | | | | | | | | There's a HP laptop out there where the MXM version in the VBIOS doesn't match what the ACPI implementation is expecting. These tables will accept 0x00 to MXMS to return latest version, but *only* if MXMI has been called first.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud