summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
AgeCommit message (Collapse)Author
2012-05-03nouveau: initialise has_optimus variable.Dave Airlie
We should initialise this to 0 really to avoid getting false positives. Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-04-30drm/nv10/gpio: fix thinko in mask for gpio lines 2-9Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30nvc0/fb: shut up PMFB interrupt after the first occurrenceChristoph Bumiller
Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30drm/nouveau/hdmi: use correct hdmi regs for nvaa/nvacBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-30drm/nouveau/bios: fix regression on some nv4x boardBen Skeggs
We started using the connector table on nv4x a while back, and this VBIOS has bad connector indices which causes the wrong encoders to get paired with connectors. Add a quirk to fix this... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-04-19nouveau: Set special lane map for the right chipsetHenrik Rydberg
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>
2012-04-19drm/nouveau/pm: don't read/write beyond end of stack bufferJim Meyering
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>
2012-04-04Revert "nouveau/bios: Fix tracking of BIOS image data"Linus Torvalds
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>
2012-04-02nouveau/bios: Fix tracking of BIOS image dataBenjamin Herrenschmidt
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>
2012-04-02nouveau: Fix crash when pci_ram_rom() returns a size of 0Benjamin Herrenschmidt
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>
2012-04-02drm/nouveau: select POWER_SUPPLYDave Airlie
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>
2012-03-29drm/nouveau: inform userspace of relaxed kernel subchannel requirementsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-29Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"Ben Skeggs
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>
2012-03-29drm/nouveau: oops, create m2mf for nvd9 tooBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-26drm/nouveau/i2c: fix thinko/regression on really old chipsetsBen Skeggs
Fixes i2c on my TNT2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-26drm/nouveau: default to 8bpc for non-LVDS panels if EDID isn't usefulBen Skeggs
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>
2012-03-26drm/nouveau: fix thinko causing init to fail on cards without accelBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-22Merge branch 'drm-nouveau-next' of ↵Dave Airlie
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
2012-03-22drm/nouveau/dp: support version 4.0 of DP tableBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nve0/disp: nvidia randomly decided to move the dithering methodBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nve0: initial modesetting support for kepler chipsetsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nouveau: add bios connector type for dms59Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nouveau: bump version to 1.0.0Ben Skeggs
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>
2012-03-22drm/nvd0/disp: ignore clock set if no pclkBen Skeggs
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>
2012-03-22drm/nouveau: oops, increase channel dispc_vma to 4Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nouveau: inform userspace of new kernel subchannel requirementsBen Skeggs
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>
2012-03-22drm/nouveau: remove m2mf creation on userspace channelsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nvc0-/disp: reimplement flip completion method as fifo methodBen Skeggs
Removes need for M2MF subchannel usage on NVC0+. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nouveau: move fence sequence check to start of loopBen Skeggs
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>
2012-03-22drm/nouveau: remove subchannel names from places where it doesn't matterBen Skeggs
These are FIFO methods, it doesn't matter what subchannel is being used. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-22drm/nouveau/ttm: always do buffer moves on kernel channelBen Skeggs
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>
2012-03-20Merge tag 'drm-intel-next-2012-03-01' of ↵Dave Airlie
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
2012-03-15drm: Add drm_mode_copy()Ville Syrjälä
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>
2012-03-15drm/nouveau: add userspace fallback hints.Dave Airlie
This lets the modesetting driver work better. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-03-13drm/nouveau: map first page of mmio early and determine chipset earlierBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: disconnect encoders before reprogramming themBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: move syncs/magic setup to or mode_setBen Skeggs
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>
2012-03-13drm/nouveau/dp: account for channel coding overhead in link trainingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: fix dcb sor link matching in supervisor handlerBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nvd0/disp: initial implementation of displayportBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nouveau/dp: make dp dpms function common, call from sor code insteadBen Skeggs
GF119 will use this too. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nv50/hwsq: some nv92 fixesMartin Peres
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>
2012-03-13drm/nouveau/dp: move all nv50/sor-specific code out of nouveau_dp.cBen Skeggs
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>
2012-03-13drm/nouveau/dp: make functions for executing various bios tablesBen Skeggs
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>
2012-03-13drm/nouveau/pm: fix oops if chipset has no pm support at allBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nouveau/bios: rework vbios shadowingBen Skeggs
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>
2012-03-13drm/nouveau/bios: attempt acpi rom fetch before pciromBen Skeggs
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>
2012-03-13drm/nvd0/disp: attempt to handle more than 2 crtcs if possibleBen Skeggs
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>
2012-03-13drm/nvc0/vram: get part count from PUNITSBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-03-13drm/nv40/pm: fix fanspeed regressionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>