summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)Ben Skeggs2015-01-22551-112844/+0
| | | | | | | | | | | | 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>
* drm/nouveau/clk: allow users to enable auto mode when loading driverVince Hsu2015-01-221-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>
* drm/nouveau/pwr: add support for GK20AVince Hsu2015-01-223-0/+234
| | | | | | | | | | | | | 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>
* drm/nouveau/pwr: make nouveau_pwr_pgob() non-staticVince Hsu2015-01-222-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>
* drm/nouveau/clk: allow non-blocking for nouveau_clock_astate()Vince Hsu2015-01-222-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>
* drm/nouveau/mc: add missing bracesVince Hsu2015-01-221-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>
* drm/nouveau/core: object.engine is always a nouveau_engine nowBen Skeggs2015-01-2218-33/+30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: can now assume client/device object tree based on ↵Ben Skeggs2015-01-222-7/+10
| | | | | | object.engine Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/disp: outp/conns do not have an engineBen Skeggs2015-01-225-8/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bar: barobjs may not have an engineBen Skeggs2015-01-221-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/fb: ram impl does not have an engineBen Skeggs2015-01-221-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/i2c: pad/ports do not have an engineBen Skeggs2015-01-2210-27/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/instmem: instobjs may not have an engineBen Skeggs2015-01-223-11/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: fix subdev/engine/device lookup to not require engine pointerBen Skeggs2015-01-223-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>
* drm/nouveau/core: uninline subdev/engine/device lookup functionsBen Skeggs2015-01-226-38/+44
| | | | | | These are a tad more complex than a direct cast with paranoia safeties. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: prepare printk for NULL engine pointer on device object treeBen Skeggs2015-01-221-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>
* drm/nouveau/core: drop the pointer value in debug printk outputBen Skeggs2015-01-221-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>
* drm/nouveau/i2c: fix some blatant abuseBen Skeggs2015-01-222-3/+3
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/gf100-/bar: don't fill in bar->alloc until after all vm setup doneBen Skeggs2015-01-221-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>
* drm/nouveau/core: rename parent to handle, use parent for nouveau_parentBen Skeggs2015-01-221-10/+12
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/core: rename subclass.base to subclass.superclassBen Skeggs2015-01-2223-52/+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>
* drm/nouveau/subdev: always upcast through nouveau_subdev()/nouveau_engine()Ben Skeggs2015-01-2223-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>
* drm/nouveau/fb: remove some (now) unnecessary hacksBen Skeggs2015-01-221-2/+0
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Merge branch 'linux-3.19' of ↵Dave Airlie2015-01-086-27/+91
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * drm/nouveau/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>
| * drm/nv4c/mc: 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>
| * drm/nouveau/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>
| * drm/nouveau/fb/ram/mcp77: use carveout reg to determine sizeBen Skeggs2014-12-221-4/+3
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fb/ram/mcp77: subclass nouveau_ramBen Skeggs2014-12-221-10/+14
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/device: Add support for GK208B, resolves bug 86935Sven Köhler2014-12-221-0/+33
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: fix oops on pre-nv50 chipsetsBen Skeggs2014-12-221-2/+4
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* | Merge tag 'v3.18' into drm-nextDave Airlie2014-12-084-5/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * \ Merge branch 'linux-3.18' of ↵Dave Airlie2014-12-024-5/+4
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | drm/nouveau/gf116: remove copy1 engineIlia Mirkin2014-12-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | drm/nouveau/fifo/g84-: ack non-stall interrupt before handling itBen Skeggs2014-12-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Merge branch 'linux-3.19' of ↵Dave Airlie2014-12-02103-2361/+5799
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next - Tegra K1 voltage support, and coherency improvements - GM204 support (modesetting, still waiting on NVIDIA for signed fw to proceed further), and a lot of bios/i2c/devinit adjustments needed to support it - GT21x memory reclocking work - Various other bits and pieces, most of which are prep-work for a couple of bigger projects I didn't get finished in time * 'linux-3.19' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (73 commits) drm/nv50/kms: drop requirement that framebuffer bos be contig up-front drm/nv50/kms: directly use cursor image from userspace buffer drm/nouveau/kms: when pinning display-related buffers, force contig vram drm/nouveau: teach nouveau_bo_pin() how to force a contig vram allocation drm/nouveau/volt: add support for GK20A drm/nouveau/platform: add GPU speedo information to nouveau platform drm/nouveau/volt: allow non-bios voltage scaling drm/gf100-/gr: return non-fatal error code when fw not present drm/nouveau/devinit: bump priv ring timeouts before executing scripts drm/nouveau/bios: translate ramcfg strap through M0203 drm/nouveau/fb: make use of M0203 routines for ram type determination drm/nouveau/bios: add parsing of BIT M(v2) +0x03 table drm/nouveau/core: allow vbios parsing without knowing chipset type drm/nouveau/lib: add null backend drm/nouveau/device: store revision drm/nouveau/core: add some forgotten subdevs to disable mask drm/gk20a/clk: fix max VCO value drm/nouveau: we need pin_refcnt for nouveau_bo_placement_set() drm/nv50-/kms: add some evo tracing ability for debugging drm/nv50/kms: use sclass() instead of trial-and-error ...
| * | drm/nouveau/volt: add support for GK20AVince Hsu2014-12-025-0/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/nouveau/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>
| * | drm/gf100-/gr: 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>
| * | drm/nouveau/devinit: bump priv ring timeouts before executing scriptsBen Skeggs2014-12-022-1/+10
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/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>
| * | drm/nouveau/fb: make use of M0203 routines for ram type determinationBen Skeggs2014-12-021-22/+15
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/bios: add parsing of BIT M(v2) +0x03 tableBen Skeggs2014-12-022-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | drm/nouveau/core: allow vbios parsing without knowing chipset typeBen Skeggs2014-12-021-0/+5
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/device: store revisionBen Skeggs2014-12-022-1/+4
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nouveau/core: add some forgotten subdevs to disable maskBen Skeggs2014-12-021-0/+2
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/gk20a/clk: 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/nouveau: 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>
| * | drm/nouveau/disp: clear notify intr status when enabling, to prevent racesBen Skeggs2014-12-022-0/+4
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * | drm/nv50-/disp: rename class members to match nvidia channel namesBen Skeggs2014-12-0211-206/+206
| | | | | | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud