summaryrefslogtreecommitdiff
path: root/nvkm
Commit message (Collapse)AuthorAgeFilesLines
* drm: remove symlinks from build, use Kbuild files for lib buildBen Skeggs2015-01-19591-113415/+1
| | | | | | | | | | | | | | | | | The DRM build used a separate, symlinked, source tree out of a desire to avoid Kbuild/autotools' object files conflicting. Not only is this very annoying to maintain, but it's made worse by having two entirely separate source file lists to maintain too. Fixes both these issues by ditching automake (it doesn't approve of the kernel's Kbuild syntax) in favour of custom makefiles that can build libnvif.so from the Kbuild files. Like the previous commit, this will never show up in the kernel tree (it has its own version). Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk: allow users to enable auto mode when loading driverVince Hsu2015-01-101-0/+3
| | | | | | | | This patch adds one option for the boot config strings "NvClkMode*", so that we can enable the "auto" mode when loading module. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr: add support for GK20AVince Hsu2015-01-104-1/+236
| | | | | | | | | | | | | 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>
* pwr: make nouveau_pwr_pgob() non-staticVince Hsu2015-01-102-1/+2
| | | | | | | | | The platform device does not use the common nouveau_pwr_init() to initialize the PWR, but it does need the .pgob() be assigned to avoid NULL pointer dereference in graph/nve4.c. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk: allow non-blocking for nouveau_clock_astate()Vince Hsu2015-01-102-3/+3
| | | | | | | | | | | There might be some callers of nouveau_clock_astate(), and they are from inetrrupt context. So we must ensure that this function can be atomic in that condition. This patch adds one parameter which is subsequently passed to nouveau_pstate_calc(). Therefore we can choose whether we want to wait for the pstate work's completion or not. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc: add missing bracesVince Hsu2015-01-101-1/+2
| | | | | | | | | Several braces were misplaced unintentionally. That caused the msi handling became part of the default case of the first switch statement. So add the missing ones. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: object.engine is always a nouveau_engine nowBen Skeggs2015-01-1018-33/+30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: can now assume client/device object tree based on object.engineBen Skeggs2015-01-102-7/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp: outp/conns do not have an engineBen Skeggs2015-01-105-8/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bar: barobjs may not have an engineBen Skeggs2015-01-101-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb: ram impl does not have an engineBen Skeggs2015-01-101-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: pad/ports do not have an engineBen Skeggs2015-01-1010-27/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* instmem: instobjs may not have an engineBen Skeggs2015-01-103-11/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: fix subdev/engine/device lookup to not require engine pointerBen Skeggs2015-01-103-21/+20
| | | | | | | 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>
* core: uninline subdev/engine/device lookup functionsBen Skeggs2015-01-106-38/+44
| | | | | | These are a tad more complex than a direct cast with paranoia safeties. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: prepare printk for NULL engine pointer on device object treeBen Skeggs2015-01-101-8/+13
| | | | | | | | | | | | The [ SUBDEV] specified in log output will be a bit different for children of a subdev now. Previously this reports whatever subdev is specified by object.engine, now it reports the subdev that owns the object (so, up object.parent somewhere). Later patches will append object and class identifiers to messages, which will help clarify where it's coming from. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: drop the pointer value in debug printk outputBen Skeggs2015-01-101-2/+2
| | | | | | | | | | Makes the output slightly less useful, in that objects with the same class handle can't be distinguished from each other now. Upcoming commits will name objects with user-readable strings to fix this problem. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* i2c: fix some blatant abuseBen Skeggs2015-01-102-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bar/gf100-: don't fill in bar->alloc until after all vm setup doneBen Skeggs2015-01-101-2/+4
| | | | | | | | | | | | gpuobj has a condition of (bar && bar->alloc) around usage to avoid some nasty ordering issues (which, i've now been reminded to add a todo about fixing...) between bar and vm. The bar->alloc part of the condition isn't currently necessary (it used to be, another change made bar always NULL where it matters), so we got lucky. That won't be the case for much longer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: rename parent to handle, use parent for nouveau_parentBen Skeggs2015-01-101-10/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: rename subclass.base to subclass.superclassBen Skeggs2015-01-1024-84/+51
| | | | | | | | 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>
* subdev: always upcast through nouveau_subdev()/nouveau_engine()Ben Skeggs2015-01-1023-23/+23
| | | | | | | Has additional safeties for one. For two, needed for an upcoming commit that removes abuse of nouveau_object.engine. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb: remove some (now) unnecessary hacksBen Skeggs2015-01-101-2/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau: Do not BUG_ON(!spin_is_locked()) on UPBruno Prémont2014-12-222-3/+3
| | | | | | | | | | | | | | On !SMP systems spinlocks do not exist. Thus checking of they are active will always fail. Use assert_spin_locked(lock); instead of BUG_ON(!spin_is_locked(lock)); to not BUG() on all UP systems. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mc/nv4c: disable msiIlia Mirkin2014-12-221-8/+0
| | | | | | | | | | | | | Several users have, over time, reported issues with MSI on these IGPs. They're old, rarely available, and MSI doesn't provide such huge advantages on them. Just disable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87361 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74492 Fixes: fa8c9ac72fe ("drm/nv4c/mc: nv4x igp's have a different msi rearm register") Cc: stable@vger.kernel.org Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ram/mcp77: enable NISO pollerPierre Moreau2014-12-221-5/+39
| | | | | Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ram/mcp77: use carveout reg to determine sizeBen Skeggs2014-12-221-4/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ram/mcp77: subclass nouveau_ramBen Skeggs2014-12-221-10/+14
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: Add support for GK208B, resolves bug 86935Sven Köhler2014-12-221-0/+33
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: fix oops on pre-nv50 chipsetsBen Skeggs2014-12-221-2/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* volt: add support for GK20AVince Hsu2014-12-025-1/+218
| | | | | | | | | | 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>
* volt: allow non-bios voltage scalingVince Hsu2014-12-021-29/+38
| | | | | | | | | | | Move the vbios parsing out of init() and call it conditionally if the platform has a vbios. Non-vbios platforms can use the ctor() to init the data structures. Signed-off-by: Vince Hsu <vinceh@nvidia.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: return non-fatal error code when fw not presentBen Skeggs2014-12-021-1/+1
| | | | | | This allows the module to load without acceleration. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit: bump priv ring timeouts before executing scriptsBen Skeggs2014-12-022-1/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: translate ramcfg strap through M0203Ben Skeggs2014-12-021-1/+12
| | | | | | | | | | | | | | A machine has been spotted where the ramcfg strap is "8", and the ramcfg xlat table goes 0-7,0-7, resulting in us selecting config 0 for memory items. On this particular system, config "8" is available and supposed to be used. It appears that starting from GT21x (where Mv2 appears), we're supposed to use the value in this table instead. One concern here is that not all the places we currently use ramcfg xlat are supposed to be treated the same now. The strap xlat table wasn't removed from the vbios either, presumably for some kind of good reason. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb: make use of M0203 routines for ram type determinationBen Skeggs2014-12-021-22/+15
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios: add parsing of BIT M(v2) +0x03 tableBen Skeggs2014-12-023-0/+161
| | | | | | | | | We only support one kind of matching here (ramcfg strap), but it appears alternate methods are possible. I wrote a tool to scan our vbios repo for other types, but did not see any used. Hopefully this means there aren't any in the wild that will now break. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: allow vbios parsing without knowing chipset typeBen Skeggs2014-12-021-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* device: store revisionBen Skeggs2014-12-022-1/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: add some forgotten subdevs to disable maskBen Skeggs2014-12-021-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clk/gk20a: fix max VCO valueAlexandre Courbot2014-12-021-1/+1
| | | | | | | | | For some reason max_vco was set to a lower value that it can support, which prevented some clock states to be applied. Fix this by setting it to the same value as downstream. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: introduce nv_device_is_cpu_coherent()Alexandre Courbot2014-12-021-0/+6
| | | | | | | | | | | | Add a function allowing us to know whether a device is CPU-coherent, i.e. accesses performed by the CPU on GPU-mapped buffers will be immediately visible on the GPU side and vice-versa. For now, a device is considered to be coherent if it uses the PCI bus on a non-ARM architecture. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp: clear notify intr status when enabling, to prevent racesBen Skeggs2014-12-022-0/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: rename class members to match nvidia channel namesBen Skeggs2014-12-0211-206/+206
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: remove some dead code that got forgottenBen Skeggs2014-12-023-135/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pwr/fuc: Fix thinko in nouveau_memx_wait()Roy Spliet2014-12-021-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* clock/nva3: Allow user reclockingRoy Spliet2014-12-021-1/+1
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnva3: Reclocking script for GDDR3Roy Spliet2014-12-022-10/+92
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnva3: Reclocking script for DDR2Roy Spliet2014-12-021-15/+42
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ramnva3: Reclocking script for DDR3Roy Spliet2014-12-023-75/+219
| | | | | Signed-off-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>