aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAge
* drm/nvd9/pm: oops, fix timing calcBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/pm: enable mpll src pll, and calc mpll coefficientsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/pm: start filling in memory reclocking stubsBen Skeggs2012-05-24
|
* drm/nva3/pm: another few magic regs, and slightly better 0x004018 handlingBen Skeggs2012-05-24
| | | | | | | | | | | Not entirely convinced 0x004018 transitions are correct yet, but, it's an improvement. The 750MHz value comes from fiddling with the binary driver + coolbits on two different DDR3 NVA8 chipsets (T510 NVS3100M, and NVS300), not a clue where this number comes from. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: initial attempt at handling 111100/111104Ben Skeggs2012-05-24
| | | | | | | Probably not quite right, but this is enough now to make NVS300 reclock between all 3 of its perflvls correctly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: make pll->pll mode workBen Skeggs2012-05-24
| | | | | | | | | | This probably wants a cleanup, but I'm holding off until I know for sure how the rest of the things that need doing fit together. Tested on NVS300 by hacking up perflvl 1 to require PLL mode, and switching between perflvl 3 and 1. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: attempt to bash a few 0x100200 bits correctlyBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: begin to restructure memory clock changes + another magicBen Skeggs2012-05-24
| | | | | | | | | | | | | | | | | | | | The binary driver appears to do various bits and pieces of the memory clock frequency change at different times, depending on the particular transition that's occuring. I've attempted to replicate this here for div->pll, pll->div and div->div transitions. With some additional (patches upcoming) magic regs being bashed, this allows me to correctly transition between all 3 perflvls on NVS300. pll->pll transitions will *not* work correctly at the moment, pending me tricking the binary driver into doing one and seeing how to correctly handle it. This patch also handles (hopefully) 0x1110e0, which appears to need changing depending on whether in PLL or divider mode.. Maybe. We'll see. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: more random unknown PFB regsBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: initial attempt at more magic PFB regsBen Skeggs2012-05-24
| | | | | | | The reg calculation may get moved elsewhere at some point, but lets figure out what exactly we need to do first. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: hook up to ram reclocking helperBen Skeggs2012-05-24
| | | | | | This gets us a start on memory timings. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nva3/pm: introduce more paranoiaBen Skeggs2012-05-24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/radeon: add static const to the dma-buf ops.Dave Airlie2012-05-23
| | | | | Reported-by: wfg@linux.intel.com Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: add PRIME supportDave Airlie2012-05-23
| | | | | | | | | | | | This adds prime->fd and fd->prime support to nouveau, it passes the SG object to TTM, and then populates the GART entries using it. v2: add stubbed kmap + use new function to fill out pages array for faulting + add reimport test. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* ttm: add prime sharing support to TTM (v2)Dave Airlie2012-05-23
| | | | | | | | | | | | | This adds the ability for ttm common code to take an SG table and use it as the backing for a slave TTM object. The drivers can then populate their GTT tables using the SG object. v2: make sure to setup VM for sg bos as well. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm: Constify drm_mode_config_funcs pointerLaurent Pinchart2012-05-22
| | | | | | | | | | | | | | | | The DRM mode config functions structure declared by drivers and pointed to by the drm_mode_config funcs field is never modified. Make it a const pointer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Rob Clark <rob.clark@linaro.org> Reviwed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nouveau/dp: Probe branch/sink OUIs (v2)Adam Jackson2012-05-22
| | | | | | | (airlied: v2: fix missing struct - fixes compile) Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: nouveau_set_bo_placement takes TTM flagsDave Airlie2012-05-22
| | | | | | | | This seems to be wrong to me, spotted while thinking about dma-buf. Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
* vga_switcheroo: Introduce struct vga_switcheroo_client_opsTakashi Iwai2012-05-13
| | | | | | | | | | | This changes the API as a clean-up. Instead of passing multiple function pointers at each time, introduce a new struct holding the whole callback functions and pass it to the registration. The same struct will be used for the upcoming audio client registration, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* nouveau: initialise has_optimus variable.Dave Airlie2012-05-03
| | | | | | | 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>
* drm/nv10/gpio: fix thinko in mask for gpio lines 2-9Ben Skeggs2012-04-30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0/fb: shut up PMFB interrupt after the first occurrenceChristoph Bumiller2012-04-30
| | | | | Signed-off-by: Christoph Bumiller <e0425955@student.tuwien.ac.at> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/hdmi: use correct hdmi regs for nvaa/nvacBen Skeggs2012-04-30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bios: fix regression on some nv4x boardBen Skeggs2012-04-30
| | | | | | | | | | 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>
* nouveau: Set special lane map for the right chipsetHenrik Rydberg2012-04-19
| | | | | | | | | | | 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-19
| | | | | | | | | | | | | 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-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | | | | | | | | 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-02
| | | | | | | | | | 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-29
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Revert "drm/nouveau: inform userspace of new kernel subchannel requirements"Ben Skeggs2012-03-29
| | | | | | | | | | 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-29
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: fix thinko/regression on really old chipsetsBen Skeggs2012-03-26
| | | | | | | 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-26
| | | | | | | | 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-26
| | | | | 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-22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nve0/disp: nvidia randomly decided to move the dithering methodBen Skeggs2012-03-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nve0: initial modesetting support for kepler chipsetsBen Skeggs2012-03-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: add bios connector type for dms59Ben Skeggs2012-03-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: bump version to 1.0.0Ben Skeggs2012-03-22
| | | | | | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: inform userspace of new kernel subchannel requirementsBen Skeggs2012-03-22
| | | | | | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0-/disp: reimplement flip completion method as fifo methodBen Skeggs2012-03-22
| | | | | | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | | | | | | | 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-22
| | | | | | | | | | | | 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-22
| | | | | | | | | | | | | | | | | | 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>