summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_state.c
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: port remainder of drm code, and rip out compat layerBen Skeggs2012-10-031-508/+0
| | | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - fill in nouveau_pm.dev to prevent oops - fix ppc issues (build + OF shadow) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/acpi: move definitions out of nouveau_drv.hBen Skeggs2012-10-031-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: start culling unused codeBen Skeggs2012-10-031-32/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: port all engines to new engine module formatBen Skeggs2012-10-031-387/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a HUGE commit, but it's not nearly as bad as it looks - any problems can be isolated to a particular chipset and engine combination. It was simply too difficult to port each one at a time, the compat layers are *already* ridiculous. Most of the changes here are simply to the glue, the process for each of the engine modules was to start with a standard skeleton and copy+paste the old code into the appropriate places, fixing up variable names etc as needed. v2: Marcin Slusarz <marcin.slusarz@gmail.com> - fix find/replace bug in license header v3: Ben Skeggs <bskeggs@redhat.com> - bump indirect pushbuf size to 8KiB, 4KiB barely enough for userspace and left no space for kernel's requirements during GEM pushbuf submission. - fix duplicate assignments noticed by clang v4: Marcin Slusarz <marcin.slusarz@gmail.com> - add sparse annotations to nv04_fifo_pause/nv04_fifo_start - use ioread32_native/iowrite32_native for fifo control registers v5: Ben Skeggs <bskeggs@redhat.com> - rebase on v3.6-rc4, modified to keep copy engine fix intact - nv10/fence: unmap fence bo before destroying - fixed fermi regression when using nvidia gr fuc - fixed typo in supported dma_mask checking Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pageflip: kick flip handling out of engsw and into fenceBen Skeggs2012-10-031-1/+1
| | | | | | | | | | This is all very much a policy thing, and hence will not belong in SW after the rework. engsw now only handles receiving the event to say "can flip now" and makes a callback to perform the actual work. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04/disp: kick all private state out to own headerBen Skeggs2012-10-031-0/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/instmem: completely new implementation, as a subdev moduleBen Skeggs2012-10-031-132/+10
| | | | | | | | v2 (Ben Skeggs): - some fixes for 64KiB PAGE_SIZE - fix porting issues in (currently unused) nv41/nv44 pciegart code Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv04-nv40/instmem: duplicate nv04 code as nv40, remove alternate pathsBen Skeggs2012-10-031-9/+9
| | | | | | A ton of duplication for the moment, will go away when they become subdevs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: merge fb/vram and port to subdev interfacesBen Skeggs2012-10-031-86/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/timer: port to subdev interfacesBen Skeggs2012-10-031-87/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/mc: port to subdev interfacesBen Skeggs2012-10-031-27/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement devinit subdev, and new init table parserBen Skeggs2012-10-031-4/+0
| | | | | | | v2: - make sure not to execute display scripts unless resuming Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: port gpio to subdev interfacesBen Skeggs2012-10-031-41/+1
| | | | | | | v2: Ben Skeggs <bskeggs@redhat.com> - rebase on top of v3.6-rc6 with gpio reset patch integrated already Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: have non-core mmio accesses go through device objectBen Skeggs2012-10-031-76/+42
| | | | | | | Adds an extra layer of indirection to each register access, but it's not too bad, and will also go away as pieces are ported. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: implement module init functions in nouveau_drm.cBen Skeggs2012-10-031-3/+11
| | | | | | | | These currently just call the existing ones in nouveau_drv.c, but will be extended in upcoming commits. This needed to be separated from the current code as there will be some header clashes until things are ported. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/agp: move all agp stuff into its own source fileBen Skeggs2012-10-031-0/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: restructure source tree, split core from drm implementationBen Skeggs2012-10-031-3/+3
| | | | | | | | | | | | | | Future work will be headed in the way of separating the policy supplied by the nouveau drm module from the mechanisms provided by the driver core. There will be a couple of major classes (subdev, engine) of driver modules that have clearly defined tasks, and the further directory structure change is to reflect this. No code changes here whatsoever, aside from fixing up a couple of include file pathnames. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvc0/copy: check PUNITS to determine which copy engines are disabledBen Skeggs2012-08-291-2/+4
| | | | | | | | | | | | On some Fermi chipsets (NVCE particularly) PCOPY1 doesn't exist. And if what I've seen on Kepler is true of Fermi too, chipsets of the same type can have different PCOPY units available. This should fix a v3.5 regression reported by a number of people effecting suspend/resume on NVC8/NVCE chipsets. Cc: stable@vger.kernel.org [3.5] Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: disable copy engine on NVAFHenrik Rydberg2012-08-141-1/+0
| | | | | | | | | | | The copy engine exhibits random memory corruption in at least one case, the GeForce 320M (nv50, 0xaf) in the MacBookAir3,1. This patch omits creating the engine for the specific chipset, falling back to M2MF, which kills the symptoms. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: mark most of our ioctls as deprecated, move to compat layerBen Skeggs2012-07-261-74/+0
| | | | | | | These will be replaced in the near future, the code isn't yet stable enough for this merge window however. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: Unregister switcheroo client on exitAndreas Heider2012-05-241-0/+2
| | | | | | | | Currently nouveau only registers as a vga_switcheroo client, but never unregisters. This patch adds the necessary unregister calls. Signed-off-by: Andreas Heider <andreas@meetr.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: fix a minor annoyance in an output stringBen Skeggs2012-05-241-1/+1
| | | | | | Bugs me every time I put in the TNT2.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd9/copy: initialise copy engine, seems to work like nvc0Ben Skeggs2012-05-241-1/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/ttm: untangle code to support accelerated buffer movesBen Skeggs2012-05-241-60/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: turn all fifo modules into engine modulesBen Skeggs2012-05-241-74/+34
| | | | | | | | | | | | | Been tested on each major revision that's relevant here, but I'm sure there are still bugs waiting to be ironed out. This is a *very* invasive change. There's a couple of pieces left that I don't like much (eg. other engines using fifo_priv for the channel count), but that's an artefact of there being a master channel list still. This is changing, slowly. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fifo: remove all the "special" engine hooksBen Skeggs2012-05-241-41/+0
| | | | | | | | | | | All the places this stuff is actually needed tends to be chipset-specific anyway, so we're able to just inline the register bashing instead. The parts of the common code that still directly touch PFIFO temporarily have conditionals, these will be removed in subsequent commits that will refactor the fifo modules into engine modules like graph/mpeg etc. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fence: convert to exec engine, and improve channel syncBen Skeggs2012-05-241-8/+25
| | | | | | | | Now have a somewhat simpler semaphore sync implementation for nv17:nv84, and a switched to using semaphores as fences on nv84+ and making use of the hardware's >= acquire operation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: create real execution engine for software object classBen Skeggs2012-05-241-0/+21
| | | | | | | | | | | Just a cleanup more or less, and to remove the need for special handling of software objects. This removes a heap of documentation on dma/graph object formats. The info is very out of date with our current understanding, and is far better documented in rnndb in envytools git. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: use the same packet header macros as userspaceBen Skeggs2012-05-241-4/+4
| | | | | | Cosmetic cleanup only. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/ttm: implement buffer moves with weirdo pcopy-on-pgraph methodsBen Skeggs2012-05-241-0/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/gr: initial implementationBen Skeggs2012-05-241-0/+5
| | | | | | | | | This may, perhaps, get re-merged with nvc0_graph.c at some point. It's still unclear as to how great an idea that'd be. Stay tuned... Completely dependent on firmware blobs from NVIDIA binary driver currently. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nve0/fifo: initial implementationBen Skeggs2012-05-241-4/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* vga_switcheroo: Introduce struct vga_switcheroo_client_opsTakashi Iwai2012-05-131-3/+7
| | | | | | | | | | | 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>
* drm/nouveau: oops, create m2mf for nvd9 tooBen Skeggs2012-03-291-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@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>
* drm/nve0: initial modesetting support for kepler chipsetsBen Skeggs2012-03-231-7/+54
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: remove m2mf creation on userspace channelsBen Skeggs2012-03-221-14/+77
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: map first page of mmio early and determine chipset earlierBen Skeggs2012-03-131-61/+60
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/pm: init only after display subsystem has been createdBen Skeggs2012-03-131-7/+5
| | | | | | | | This patch fixes an oops cause by pm_trigger accessing the (uninitialised) crtc list. Reported-by: Roy Spliet <r.spliet@student.tudelft.nl> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: rework the init/takedown orderingBen Skeggs2012-03-131-40/+41
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv20-nv40: add memory type detectionBen Skeggs2012-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | NV20/NV30 is partially educated guesswork at this point, based on any information around about available memory types and a horribly unspeakable amount of vbios image scouring. I'm not entirely certain the GDDR3 define is correct, I have not spotted a single vbios with that value yet (though it is mentioned in some 1218-using nv4x vbios), but there are reports that some nv3x did use it.. NV40(100914) confirmed by switching an NV49 to DDR1/DDR2 values and making sure that the binary driver behaviour showed it had detected DDR1/DDR2 instead of GDDR3 before dying horribly. NV40(100474) confirmed by doing much the same task as above on an NV44, except this was *much* easier as changing the values didn't seem to have any noticable effect on the memory controller aside from changing the binary driver's behaviour. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv20: split PFB code out of nv10_fb.cBen Skeggs2012-03-131-8/+8
| | | | | | | Most functions were quite different between NV10/NV20 already, and they're about to get even more so. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: move vram detection funcs to chipset-specific fb codeBen Skeggs2012-03-131-5/+9
| | | | | | | Also, display detected memory type in logs - though, we don't even try to detect this yet. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: move pci bus master enable into driver.Dave Airlie2012-02-161-0/+2
| | | | | | | | | | | | | | | The current enabling of bus mastering in the drm midlayer allows a large race condition under kexec. When a kexec'ed kernel re-enables bus mastering for the GPU, previously setup dma blocks may cause writes to random pieces of memory. On radeon the writeback mechanism can cause these sorts of issues. This patch doesn't fix the problem, but it moves the bus master enable under the individual drivers control so they can move enabling it until later in their load cycle and close the race. Fix for radeon kms driver will be in a follow-up patch. Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: Support Optimus models for vga_switcherooPeter Lekensteyn2012-01-131-0/+1
| | | | | | | | | | | Newer nVidia cards with Optimus do not support/use the DSM switching functions. Instead, it require a DSM function to be called prior to bringing a device into D3 state. No other _DSM calls are necessary before/after enabling/disabling a device. Switching between discrete and integrated GPU is not supported by this Optimus _DSM call, therefore return on the switching method. Signed-off-by: Peter Lekensteyn <lekensteyn@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* drm/nvc0/pm: initial engine reclockingBen Skeggs2011-12-211-0/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv40/disp: implement support for hotplug irqBen Skeggs2011-12-211-0/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gpio: reimplement as nouveau_gpio.c, fixing a number of issuesBen Skeggs2011-12-211-43/+21
| | | | | | | | | | | | | | - moves out of nouveau_bios.c and demagics the logical state definitions - simplifies chipset-specific driver interface - makes most of gpio irq handling common, will use for nv4x hpd later - api extended to allow both direct gpio access, and access using the logical function states - api extended to allow for future use of gpio extender chips - pre-nv50 was handled very badly, the main issue being that all GPIOs were being treated as output-only. - fixes nvd0 so gpio changes actually stick, magic reg needs bashing Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nvd0/disp: add support for page flippingBen Skeggs2011-12-211-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: shutdown display on suspend/hibernateBen Skeggs2011-12-211-4/+2
| | | | | | Known to fix some serious issues with hibernate on a couple of systems. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud