summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
Commit message (Collapse)AuthorAgeFilesLines
* drm/nouveau: remove symlinks, move core/ to nvkm/ (no code changes)Ben Skeggs2015-01-22609-454/+510
| | | | | | | | | | | | 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: merge nouveau_platform.ko into nouveau.koAlexandre Courbot2015-01-225-11/+14
| | | | | | | | | | | Having the two modules separated causes various unneeded complications, including having to export symbols accessed between the modules. Make things simpler by compiling platform device support into nouveau.ko. Platform device support remains optional and is only compiled on Tegra. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Vince Hsu <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: dont switch vt on suspendMaarten Lankhorst2015-01-224-38/+38
| | | | | | | | | | Restore the nv50 cursor bo on resume, and load the lut in nv50_display_display_init so it gets set on resume too. Tested on a fermi and a curie. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/dispnv04: Remove some unused functionsRickard Strandqvist2015-01-222-20/+0
| | | | | | | | | | | Removes some functions that are not used anywhere: nv04_display_late_takedown() nv04_display_early_init() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/gem: Remove unused functionRickard Strandqvist2015-01-221-13/+0
| | | | | | | | | | Remove the function domain_to_ttm() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/bo: Remove unused functionRickard Strandqvist2015-01-222-15/+0
| | | | | | | | | | Remove the function nouveau_bo_rd16() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> 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-224-0/+235
| | | | | | | | | | | | | 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/nv50-/kms: reject attempts at flipping to incompatible framebufferBen Skeggs2015-01-221-0/+4
| | | | | | | | | | | | | Looks like a userspace bug can trigger this somehow during a mode switch, causing: EVO complaint -> semaphores get out of sync -> entire display stalled. We likely want to be even stricter than this (or at least deal better if EVO rejects our request), but I'll save that for the drm_plane/atomic conversion and just fix the bug that I already know can be triggered. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms: default to panel scaling, except for fixed panels prior to nv50Ben Skeggs2015-01-221-5/+9
| | | | | | | On NV50 and up, we'll allow fixed panels to use EDID-provided modes without the GPU scaler, and force scaling (even for NONE) otherwise. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms: untangle connector property logic a littleBen Skeggs2015-01-221-16/+37
| | | | | | Should be the same defaults as before, just easier to follow. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau/kms: avoid adding scaler-only modes the same as the panel's ↵Ben Skeggs2015-01-221-1/+3
| | | | | | native mode Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/kms: allow disabling of gpu scaling on fixed panelsBen Skeggs2015-01-223-10/+44
| | | | | | | | | | The hilarious part is that, under X, this won't work anyway because the server decides to construct its own modes for some reason. Tested with modetest, which isn't quite as insane. I'd hope that wayland is more sensible. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nv50-/kms: move identical scaler mode fixup code into a functionBen Skeggs2015-01-221-54/+24
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: sgdma: add comment around suspiscious error handlerAlexandre Courbot2015-01-221-0/+5
| | | | | | | | | | | | Common programming sense dictates that resources allocated by a function are freed by this function should it fails, but this is not the case for the allocated structure of nouveau_sgdma_create_ttm(). It seems that n00b contributors attempt to fix this one like bugs flying towards a bug zapper, so add a comment to hopefully prevent this from happening anymore. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm/nouveau: sgdma: remove unused nouveau_sgdma_be::devAlexandre Courbot2015-01-221-2/+0
| | | | | | | | nouveau_sgdma_be::dev is only set once during init and never used anywhere, so remove it. Signed-off-by: Alexandre Courbot <acourbot@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-088-33/+124
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: wake up the card if necessary during gem callbacksBen Skeggs2014-12-221-5/+30
| | | | | | | | | | | | | | | | | | | | The failure paths if we fail to wake the card are less than desirable, but there's not really a graceful way to handle this case currently. I'll keep this situation in mind when I get to fixing other vm-related issues. 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: fix missing return statement in nouveau_ttm_tt_unpopulateAlexandre Courbot2014-12-221-1/+3
| | | | | | | | | | | | | | | | | | | | nouveau_ttm_tt_unpopulate() is supposed to return right after calling ttm_dma_unpopulate() in the case of a coherent buffer. The return statement was omitted, leading to the pages being unmapped twice. Fix this. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> 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>
* | Revert "drm/gem: Warn on illegal use of the dumb buffer interface v2"Dave Airlie2014-12-242-12/+0
| | | | | | | | | | | | | | | | | | This reverts commit 355a70183848f21198e9f6296bd646df3478a26d. This had some bad side effects under normal operation, and should have been dropped earlier. Signed-off-by: Dave Airlie <airlied@redhat.com>
* | nouveau: bring back legacy mmap handlerDave Airlie2014-12-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nouveau userspace back at 1.0.1 used to call the X server DRIOpenDRMMaster interface even for DRI2 (doh!), this attempts to map the sarea and fails if it can't. Since 884c6dabb0eafe7227f099c9e78e514191efaf13 from Daniel, this fails, but only ancient drivers would see it. Revert the nouveau bits of that fix. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: <stable@vger.kernel.org> # 3.18 Signed-off-by: Dave Airlie <airlied@redhat.com>
* | Merge tag 'v3.18' into drm-nextDave Airlie2014-12-087-35/+72
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | nouveau: move the hotplug ignore to correct place.Dave Airlie2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in b440bde74f, however it was added to the wrong function in nouveau. https://bugzilla.kernel.org/show_bug.cgi?id=86011 Cc: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org # v3.15+ Signed-off-by: Dave Airlie <airlied@redhat.com>
OpenPOWER on IntegriCloud