summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fix drm.hHEADstaging/workAlexandre Courbot2017-03-301-1/+1
|
* kms/nv50: request vblank events for commits that send completion eventsBen Skeggs2017-01-311-0/+6
| | | | | | | | | | | This somehow fixes an issue where sync-to-vblank longer works correctly after resume from suspend. From a HW perspective, we don't need the IRQs turned on to be able to detect flip completion, so it's assumed that this is required for the voodoo in the core DRM vblank core. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv1a,nv1f/disp: fix memory clock rate retrievalIlia Mirkin2017-01-311-1/+2
| | | | | | | | | | | | Based on the xf86-video-nv code, NFORCE (NV1A) and NFORCE2 (NV1F) have a different way of retrieving clocks. See the nv_hw.c:nForceUpdateArbitrationSettings function in the original code for how these clocks were accessed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54587 Cc: stable@vger.kernel.org Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gt215: Fix HDA ELD handling (thus, HDMI audio) on gt215Alastair Bridgewater2017-01-311-1/+1
| | | | | | | | | | | Store the ELD correctly, not just enough copies of the first byte to pad out the given ELD size. Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com> Fixes: 120b0c39c756 ("drm/nv50-/disp: audit and version SOR_HDA_ELD method") Cc: stable@vger.kernel.org # v3.17+ Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nouveau/led: prevent compiling the led-code if nouveau=y and leds=mMartin Peres2017-01-311-1/+1
| | | | | | | | | | | | | | The proper fix would have been to select LEDS_CLASS but this can lead to a circular dependency, as found out by Arnd. This patch implements Arnd's suggestion instead, at the cost of some auto-magic for a fringe feature. Reported-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Intel's 0-DAY Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo") Signed-off-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/mcp7x: disable dptmds workaroundBen Skeggs2017-01-311-2/+0
| | | | | | | | The workaround appears to cause regressions on these boards, and from inspection of RM traces, NVIDIA don't appear to do it on them either. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Roy Spliet <nouveau@spliet.org>
* drm: prevent userspace from deleting client objectBen Skeggs2017-01-311-1/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fence/g84-: protect against concurrent access to semaphore buffersBen Skeggs2017-01-312-0/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* v4.10-rc6Ben Skeggs2017-01-315-12/+43
|
* kms/nv50: fix atomic regression on original G80Ben Skeggs2016-12-131-0/+5
| | | | | Reported-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bl: Do not register interface if Apple GMUX detectedPierre Moreau2016-12-131-0/+6
| | | | | | | | | | | | | | The Apple GMUX is the one managing the backlight, so there is no need for Nouveau to register its own backlight interface. v2: Do not split information message on two lines as it prevents from grepping it, as pointed out by Lukas Wunner v3: Add a missing end-of-line character to the printed message Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Reviewed-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bl: Assign different names to interfacesPierre Moreau2016-12-134-4/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, every backlight interface created by Nouveau uses the same name, nv_backlight. This leads to a sysfs warning as it tries to create an already existing folder. This patch adds a incremented number to the name, but keeps the initial name as nv_backlight, to avoid possibly breaking userspace; the second interface will be named nv_backlight1, and so on. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86539 v2: * Switch to using ida for generating unique IDs, as suggested by Ilia Mirkin; * Allocate backlight name on the stack, as suggested by Ilia Mirkin; * Move `nouveau_get_backlight_name()` to avoid forward declaration, as suggested by Ilia Mirkin; * Fix reference to bug report formatting, as reported by Nick Tenney. v3: * Define a macro for the size of the backlight name, to avoid defining it multiple times; * Use snprintf in place of sprintf. v4: * Do not create similarly named interfaces when reaching the maximum amount of unique names, but fail instead, as pointed out by Lukas Wunner Signed-off-by: Pierre Moreau <pierre.morrow@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2Ben Skeggs2016-12-131-1/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ltc: protect clearing of comptags with mutexBen Skeggs2016-12-131-0/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: handle GPC/TPC/MPC trapBen Skeggs2016-12-131-0/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* core: recognise GP106 chipsetBen Skeggs2016-12-131-0/+30
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ttm: wait for bo fence to signal before unmapping vmasBen Skeggs2016-12-121-0/+1
| | | | | | | | | | | | | | TTM was changed a while back to allow for pipelining of buffer moves, and part of this was the removal of waiting for a BO to idle before calling move(), placing the responsibility on the driver to do this if required. That's all well and good, except, we make use of move_notify() to handle mapping/unmapping from the GPU VMM as move() isn't called on all paths. This commit adds a wait before unmapping from a VMM in move_notify(), to prevent GPU page faults where a buffer is still being accessed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: FECS intr handling is not relevant on proprietary ucodeBen Skeggs2016-12-091-2/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* gr/gf100-: properly ack all FECS error interruptsBen Skeggs2016-12-091-3/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fifo/gf100-: recover from host mmu faultsBen Skeggs2016-12-094-28/+29
| | | | | | | | | | | | | | This has been on the TODO list for a while now, recovering from things such as attempting to execute a push buffer or touch a semaphore in an unmapped memory area. The only thing required on the HW side here is that the offending channel is removed from the runlist, and *not* a full reset of PFIFO. This used to be a bit messier to handle before the rework to make use of engine topology info, but is apparently now trivial. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mxm: warn more loudly on unsupported DCB versionBen Skeggs2016-12-061-1/+1
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* mxm: handle DCB 4.1 modificationBen Skeggs2016-12-061-1/+1
| | | | | | Allows MXM DCB modification to be handled on GM20x and newer boards. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/mxm: handle digital connector table 1.1Ben Skeggs2016-12-061-1/+1
| | | | | | | | | I suspect the version bump is just to signify that the table now specifies pad macro/links instead of SOR/sublinks. For our usage of the table, just recognising the new version is enough. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Queue hpd_work on (runtime) resumeHans de Goede2016-11-281-1/+10
| | | | | | | | | We need to call drm_helper_hpd_irq_event() on resume to properly detect monitor connection / disconnection on some laptops, use hpd_work for this to avoid deadlocks. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Rename acpi_work to hpd_workHans de Goede2016-11-282-17/+17
| | | | | | | | | | | | | We need to call drm_helper_hpd_irq_event() on resume to properly detect monitor connection / disconnection on some laptops. For runtime-resume (which gets called on resume from normal suspend too) we must call drm_helper_hpd_irq_event() from a workqueue to avoid a deadlock. Rename acpi_work to hpd_work, and move it out of the #ifdef CONFIG_ACPI blocks to make it suitable for generic work. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* kms/nv50: Fix atomic pageflip events.Mario Kleiner2016-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new atomic modesetting/pageflip code for nv50+ for Linux 4.10+ no longer uses pageflip irq's to signal flip completion. Instead it polls for flip completion from within a kthread/work queue. This creates a race between the vblank irq handler updating the vblank count and timestamp for the vblank of flip completion, and the kthread's polling code detecting flip completion and sending out the flip completion event. Depending on who executes a few microseconds earlier, the flip completion event will either contain correct count/timestamp or a stale count/timestamp from the previous vblank. This error was observed for about 50% of all executed flips, e.g., observable under DRI2 by the Xorg.log filling with flip handler warning messages. Call drm_accurate_vblank_count() before sending out flip completion events to enforce a vblank count/ts update for the vblank of flip completion and avoid stale counts/timestamps. This fix leads to one redundant call to drm_update_vblank_count for each completed flip, but no other side effects. On a ~6 year old Core i7 M620@ 2.67GHz the redundant call costs about 10 usecs per flip Successfully tested on GeForce 9500/9600/330M so far. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/ram/gp100-: fix memory detection where FBP_NUM != FBPA_NUMBen Skeggs2016-11-281-2/+2
| | | | | | In this situation, we'd have ended up detecting less VRAM than we have. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/volt: pointers are 32-bitBen Skeggs2016-11-283-17/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/vmap: pointers are 32-bitBen Skeggs2016-11-283-17/+17
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/timing: pointers are 32-bitBen Skeggs2016-11-282-13/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/therm: pointers are 32-bitBen Skeggs2016-11-281-10/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/perf: pointers are 32-bitBen Skeggs2016-11-283-14/+16
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/iccsense: pointers are 32-bitBen Skeggs2016-11-281-4/+4
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/fan: pointers are 32-bitBen Skeggs2016-11-282-10/+10
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/cstep: pointers are 32-bitBen Skeggs2016-11-283-23/+23
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* bios/boost: pointers are 32-bitBen Skeggs2016-11-283-23/+23
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm-next 7625e05286cf3f37c8a5e633379a4d014ddbe555Ben Skeggs2016-11-283-24/+8
|
* disp/gp102: rename from gp104Ben Skeggs2016-11-1614-46/+46
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* ce/gp102: rename from gp104Ben Skeggs2016-11-164-13/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fb/gp102: rename from gp104Ben Skeggs2016-11-164-7/+7
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/gp102: fix cursor/overlay immediate channel indicesBen Skeggs2016-11-165-2/+80
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: specify ctrl/user separately when constructing classesBen Skeggs2016-11-1614-28/+32
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* disp/nv50-: split chid into chid.ctrl and chid.userBen Skeggs2016-11-167-92/+106
| | | | | | | GP102/GP104 make life difficult by redefining the channel indices for some registers, but not others. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* drm: Intercept ACPI_VIDEO_NOTIFY_PROBEHans de Goede2016-11-162-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various notebooks with nvidia GPUs generate an ACPI_VIDEO_NOTIFY_PROBE acpi-video event when an external device gets plugged in (and again on modesets on that connector), the default behavior in the acpi-video driver for this is to send a KEY_SWITCHVIDEOMODE evdev event, which causes e.g. gnome-settings-daemon to ask us to rescan the connectors (good), but also causes g-s-d to switch to mirror mode on a newly plugged monitor rather then using the monitor to extend the desktop (bad) as KEY_SWITCHVIDEOMODE is supposed to switch between extend the desktop vs mirror mode. More troublesome are the repeated ACPI_VIDEO_NOTIFY_PROBE events on changing the mode on the connector, which cause g-s-d to switch between mirror/extend mode, which causes a new ACPI_VIDEO_NOTIFY_PROBE event and we end up with an endless loop. This commit fixes this by adding an acpi notifier block handler to nouveau_display.c to intercept ACPI_VIDEO_NOTIFY_PROBE and: 1) Wake-up runtime suspended GPUs and call drm_helper_hpd_irq_event() on them, this is necessary in some cases for the GPU to detect connector hotplug events while runtime suspended 2) Return NOTIFY_BAD to stop acpi-video from emitting a bogus KEY_SWITCHVIDEOMODE key-press event There already is another acpi notifier block handler registered in drivers/gpu/drm/nouveau/nvkm/engine/device/acpi.c, but that is not suitable since that one gets unregistered on runtime suspend, and we also want to intercept ACPI_VIDEO_NOTIFY_PROBE when runtime suspended. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* devinit/gm200: drop pmu reset sequenceBen Skeggs2016-11-091-12/+0
| | | | | | | This sequence is incorrect for GP102/GP104 boards. This is now being handled correctly by the PMU subdev during preinit(); Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* devinit/gm200: replace while loops with PTIMER-based timeout loopsBen Skeggs2016-11-091-4/+11
| | | | | | | It appears to be safe to access PTIMER on an unposted board with newer chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu/gp102: initial implementationBen Skeggs2016-11-094-0/+47
| | | | | | | GP102/GP104 require a harder reset of PMU prior to DEVINIT, or the IFR image will hang. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu/gp100: initial implementationBen Skeggs2016-11-094-0/+38
| | | | | | Just enough to hookup preinit reset(), which DEVINIT will depend on later. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu: execute reset before running devinitBen Skeggs2016-11-091-0/+8
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* pmu: move ucode handling into gt215 implementationBen Skeggs2016-11-099-184/+304
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>