summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/engine
AgeCommit message (Collapse)Author
2015-01-22drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)Ben Skeggs
The symlinks were annoying some people, and they're not used anywhere else in the kernel tree. The include directory structure has been changed so that symlinks aren't needed anymore. NVKM has been moved from core/ to nvkm/ to make it more obvious as to what the directory is for, and as some minor prep for when NVKM gets split out into its own module (virt) at a later date. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/pwr: add support for GK20AVince Hsu
This patch adds PWR support for GK20A. But instead of adding the PWR features like firmware loading and communication with PMU firmware, we add the DVFS (Dynamic Voltage and Frequency Scaling), which is one of the PMU firmware's jobs on dGPUs, in this patch. This refers to the idle signals provided by the NVIDIA hardware and tries to adjust the performance level based on the calculated target. The reclocking policy can be fine-tuned later when we have more real use cases. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: object.engine is always a nouveau_engine nowBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: can now assume client/device object tree based on ↵Ben Skeggs
object.engine Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/disp: outp/conns do not have an engineBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: fix subdev/engine/device lookup to not require engine pointerBen Skeggs
It's about to not be valid for objects that aren't in the client object tree. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: uninline subdev/engine/device lookup functionsBen Skeggs
These are a tad more complex than a direct cast with paranoia safeties. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-22drm/nouveau/core: rename subclass.base to subclass.superclassBen Skeggs
Makes things a bit more readable. This is specially important now as upcoming commits are going to be gradually removing the use of macros for down-casts, in favour of compile-time checking. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2015-01-08Merge branch 'linux-3.19' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes - Fix BUG() on !SMP builds - Fix for OOPS on pre-NV50 that snuck into -next - MCP7[789A] hang fix where firmware hasn't already setup NISO pollers - NV4x IGP MSI disable, it doesn't appear to work correctly - Add GK208B to recognised boards (no code change aside from adding chipset recognition) * 'linux-3.19' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/nouveau: Do not BUG_ON(!spin_is_locked()) on UP drm/nv4c/mc: disable msi drm/nouveau/fb/ram/mcp77: enable NISO poller drm/nouveau/fb/ram/mcp77: use carveout reg to determine size drm/nouveau/fb/ram/mcp77: subclass nouveau_ram drm/nouveau: wake up the card if necessary during gem callbacks drm/nouveau/device: Add support for GK208B, resolves bug 86935 drm/nouveau: fix missing return statement in nouveau_ttm_tt_unpopulate drm/nouveau/bios: fix oops on pre-nv50 chipsets
2014-12-22drm/nouveau/device: Add support for GK208B, resolves bug 86935Sven Köhler
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-08Merge tag 'v3.18' into drm-nextDave Airlie
Linux 3.18 Backmerge Linus tree into -next as we had conflicts in i915/radeon/nouveau, and everyone was solving them individually. * tag 'v3.18': (57 commits) Linux 3.18 watchdog: s3c2410_wdt: Fix the mask bit offset for Exynos7 uapi: fix to export linux/vm_sockets.h i2c: cadence: Set the hardware time-out register to maximum value i2c: davinci: generate STP always when NACK is received ahci: disable MSI on SAMSUNG 0xa800 SSD context_tracking: Restore previous state in schedule_user slab: fix nodeid bounds check for non-contiguous node IDs lib/genalloc.c: export devm_gen_pool_create() for modules mm: fix anon_vma_clone() error treatment mm: fix swapoff hang after page migration and fork fat: fix oops on corrupted vfat fs ipc/sem.c: fully initialize sem_array before making it visible drivers/input/evdev.c: don't kfree() a vmalloc address cxgb4: Fill in supported link mode for SFP modules xen-netfront: Remove BUGs on paged skb data which crosses a page boundary mm/vmpressure.c: fix race in vmpressure_work_fn() mm: frontswap: invalidate expired data on a dup-store failure mm: do not overwrite reserved pages counter at show_mem() drm/radeon: kernel panic in drm_calc_vbltimestamp_from_scanoutpos with 3.18.0-rc6 ... Conflicts: drivers/gpu/drm/i915/intel_display.c drivers/gpu/drm/nouveau/nouveau_drm.c drivers/gpu/drm/radeon/radeon_cs.c
2014-12-02drm/nouveau/volt: add support for GK20AVince Hsu
The voltage value are calculated by the hardware characterized result. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gf100-/gr: return non-fatal error code when fw not presentBen Skeggs
This allows the module to load without acceleration. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/core: allow vbios parsing without knowing chipset typeBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/device: store revisionBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/core: add some forgotten subdevs to disable maskBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/disp: clear notify intr status when enabling, to prevent racesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nv50-/disp: rename class members to match nvidia channel namesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gk104-/fifo: handle copy engine class errorsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/device: recognise GM204Ben Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gm204/disp: some magic that fixes bringup of uninitialised outputsBen Skeggs
Probably missing something here, doesn't make a lot of sense to write or+link data into a register whose offset is calculated by the same or+link info.. This is the all I've witnessed the binary driver and vbios doing so far, so it'll do. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gm204/disp: initial supportBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/gf110-/disp: magic that might help some tmds issuesBen Skeggs
The binary driver has been doing this since GF119, and we've somehow gotten away with it. But, TMDS that hasn't been initialised already by the x86 vbios code is distorted without it on GM204. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/i2c: segregate aux channel adapter indices from bit-banged i2cBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02Merge branch 'linux-3.18' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes Just a couple of fixes for the fallout from the fence rework. * 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/gf116: remove copy1 engine drm/nouveau: prevent stale fence->channel pointers, and protect with rcu drm/nouveau/fifo/g84-: ack non-stall interrupt before handling it
2014-12-02drm/nouveau/gf116: remove copy1 engineIlia Mirkin
Indications are that no GF116's actually have a copy engine there, but actually have the decompression engine. This engine can be made to do copies, but that should be done separately. Unclear why this didn't turn up on all GF116's, but perhaps the non-mobile ones came with enough VRAM to not trigger ttm migrations in test scenarios. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85465 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59168 Cc: stable@vger.kernel.org Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-12-02drm/nouveau/fifo/g84-: ack non-stall interrupt before handling itBen Skeggs
Closes a very unlikely race that can occur if another NonStallInterrupt method passes between checking fences and acking the previous interrupt. With this change, the interrupt will re-fire under such conditions. Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-10-20Merge branch 'linux-3.18' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes two nouveau fixes. * 'linux-3.18' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau: fix regression on agp boards drm/gt215/gr: fix initialisation on gddr5 boards
2014-10-20drm/gt215/gr: fix initialisation on gddr5 boardsBen Skeggs
The binary driver modifies the default context to have this value, rather than 0x3d0040, *after* it's filled the buffer with the usual golden data. We don't really have anything in place to locate the correct offset to do these type of modifications outside of the generation function, so this will have to do. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-10-14Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linuxLinus Torvalds
Pull drm updates from Dave Airlie: "This is the main git pull for the drm, I pretty much froze major pulls at -rc5/6 time, and haven't had much fallout, so will probably continue doing that. Lots of changes all over, big internal header cleanup to make it clear drm features are legacy things and what are things that modern KMS drivers should be using. Also big move to use the new generic fences in all the TTM drivers. core: atomic prep work, vblank rework changes, allows immediate vblank disables major header reworking and cleanups to better delinate legacy interfaces from what KMS drivers should be using. cursor planes locking fixes ttm: move to generic fences (affects all TTM drivers) ppc64 caching fixes radeon: userptr support, uvd for old asics, reset rework for fence changes better buffer placement changes, dpm feature enablement hdmi audio support fixes intel: Cherryview work, 180 degree rotation, skylake prep work, execlist command submission full ppgtt prep work cursor improvements edid caching, vdd handling improvements nouveau: fence reworking kepler memory clock work gt21x clock work fan control improvements hdmi infoframe fixes DP audio ast: ppc64 fixes caching fix rcar: rcar-du DT support ipuv3: prep work for capture support msm: LVDS support for mdp4, new panel, gpu refactoring exynos: exynos3250 SoC support, drop bad mmap interface, mipi dsi changes, and component match support" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (640 commits) drm/mst: rework payload table allocation to conform better. drm/ast: Fix HW cursor image drm/radeon/kv: add uvd/vce info to dpm debugfs output drm/radeon/ci: add uvd/vce info to dpm debugfs output drm/radeon: export reservation_object from dmabuf to ttm drm/radeon: cope with foreign fences inside the reservation object drm/radeon: cope with foreign fences inside display drm/core: use helper to check driver features drm/radeon/cik: write gfx ucode version to ucode addr reg drm/radeon/si: print full CS when we hit a packet 0 drm/radeon: remove unecessary includes drm/radeon/combios: declare legacy_connector_convert as static drm/radeon/atombios: declare connector convert tables as static drm/radeon: drop btc_get_max_clock_from_voltage_dependency_table drm/radeon/dpm: drop clk/voltage dependency filters for BTC drm/radeon/dpm: drop clk/voltage dependency filters for CI drm/radeon/dpm: drop clk/voltage dependency filters for SI drm/radeon/dpm: drop clk/voltage dependency filters for NI drm/radeon: disable audio when we disable hdmi (v2) drm/radeon: split audio enable between eg and r600 (v2) ...
2014-10-02drm/nv50/disp: fix dpms regression on certain boardsBen Skeggs
Reported in fdo#82527 comment #2. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gt214-/disp: enable dp audioBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/g94-/disp: calculate some dp audio constantsBen Skeggs
NVIDIA appear to have tweaked the algorithm from GF110, this implements the previous algorithm for them still. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gk104-/disp: infoframe registers moved yet again on keplerBen Skeggs
Thanks to Vincent Pelletier for pointing this out and providing a proof of concept patch on the list. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/gpio: rename g92 class to g94Emil Velikov
nv92 hardware has only 16 interrupt lines, while nv94 and later has 32. Accessing 0xe0c{0,4} registers on nv92 can lead to incorrect PDISP setup. This is a regression introduced with commit 9d0f5ec9ee0fd5dc5fc1cc2cf559286431e406e3 Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon May 12 15:22:42 2014 +1000 gpio: split g92 class from nv50 Reported-by: estece on #nouveau Cc: stable@vger.kernel.org # 3.16+ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/subdev: add a pfuse subdev v2Martin Peres
We will use this subdev to disable temperature reading on cards that did not get a sensor calibration in the factory. v2: - rename "nouveau_fuse_rd32" to "gxXXX_fuse_rd32" as adviced by Christian Costa - fold the code a little as adviced by Emil Velikov Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/ppwr: enable ppwr on gm107Martin Peres
For some reason, it is now required to wait a 20 µs after the 0x200 reset of the engine. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/gm107/therm: add PWM fan support v2Martin Peres
v2: change the copyright ownership from "Nouveau Community" to myself, as per Illia's recommendation. Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nv50-/disp: add support for completion eventsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-09-15drm/nouveau/core: pass related object into notify constructorBen Skeggs
The event source types/index might need to be derived from it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-15drm/nouveau/gk20a: add LTC deviceAlexandre Courbot
LTC device is now required for PGRAPH to work, add it. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-15drm/gf100-/gr: fix -ENOSPC detection when allocating zbc table entriesBen Skeggs
Spotted by Coverity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/nv50/disp: shhh compilerBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: implement the proper SetShaderExceptions methodBen Skeggs
We have another version of it implemented in SW, however, that version isn't serialised with normal PGRAPH operation and can possibly clobber the enables for another context. This is the same method that's implemented by the NVIDIA binary driver. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: remove some broken ltc bashing, for nowBen Skeggs
... and hope that the defaults are good enough. This was always supposed to be a read/modify/write thing anyway, so we're writing very wrong stuff for some boards already. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: unhardcode attribute cb configBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: fetch tpcs-per-ppc info on startupBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: unhardcode pagepool configBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: unhardcode bundle cb configBen Skeggs
Should be the same values as before, except: GF117 has smaller buffer allocated, as per register setup. GK20A now uses values from Tegra driver, not GK104's. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2014-08-10drm/gf100-/gr: improve initial context patch list helpersBen Skeggs
Removes need for fixed buffer indices, and allows the functions utilising them to also be run outside of context generation. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>