aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-12-13drm/nouveau/kms/nv50: fix atomic regression on original G80Ben Skeggs1-0/+5
Reported-by: Pierre Moreau <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/bl: Do not register interface if Apple GMUX detectedPierre Moreau1-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 <[email protected]> Reviewed-by: Lukas Wunner <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/bl: Assign different names to interfacesPierre Moreau4-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 <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/bios/dp: fix handling of LevelEntryTableIndex on DP table 4.2Ben Skeggs1-1/+4
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/ltc: protect clearing of comptags with mutexBen Skeggs1-0/+2
Signed-off-by: Ben Skeggs <[email protected]> Cc: [email protected]
2016-12-13drm/nouveau/gr/gf100-: handle GPC/TPC/MPC trapBen Skeggs1-0/+7
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/core: recognise GP106 chipsetBen Skeggs1-0/+30
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/ttm: wait for bo fence to signal before unmapping vmasBen Skeggs1-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 <[email protected]> Cc: [email protected] [v4.8+]
2016-12-13drm/nouveau/gr/gf100-: FECS intr handling is not relevant on proprietary ucodeBen Skeggs1-2/+2
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/gr/gf100-: properly ack all FECS error interruptsBen Skeggs1-3/+2
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-13drm/nouveau/fifo/gf100-: recover from host mmu faultsBen Skeggs4-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 <[email protected]>
2016-12-06drm/nouveau/mxm: warn more loudly on unsupported DCB versionBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2016-12-06drm/nouveau/mxm: handle DCB 4.1 modificationBen Skeggs1-1/+1
Allows MXM DCB modification to be handled on GM20x and newer boards. Signed-off-by: Ben Skeggs <[email protected]>
2016-12-06drm/nouveau/bios/mxm: handle digital connector table 1.1Ben Skeggs1-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 <[email protected]>
2016-11-28drm/nouveau: Queue hpd_work on (runtime) resumeHans de Goede1-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 <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau: Rename acpi_work to hpd_workHans de Goede2-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 <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/kms/nv50: Fix atomic pageflip events.Mario Kleiner1-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 <[email protected]> Cc: Ben Skeggs <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/fb/ram/gp100-: fix memory detection where FBP_NUM != FBPA_NUMBen Skeggs1-2/+2
In this situation, we'd have ended up detecting less VRAM than we have. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/volt: pointers are 32-bitBen Skeggs3-17/+17
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/vmap: pointers are 32-bitBen Skeggs3-17/+17
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/timing: pointers are 32-bitBen Skeggs2-13/+13
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/therm: pointers are 32-bitBen Skeggs1-10/+10
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/perf: pointers are 32-bitBen Skeggs3-14/+16
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/iccsense: pointers are 32-bitBen Skeggs1-4/+4
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/fan: pointers are 32-bitBen Skeggs2-10/+10
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/cstep: pointers are 32-bitBen Skeggs3-23/+23
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-28drm/nouveau/bios/boost: pointers are 32-bitBen Skeggs3-23/+23
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/disp/gp102: rename from gp104Ben Skeggs14-46/+46
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/ce/gp102: rename from gp104Ben Skeggs4-13/+13
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/fb/gp102: rename from gp104Ben Skeggs4-7/+7
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/disp/gp102: fix cursor/overlay immediate channel indicesBen Skeggs5-2/+80
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/disp/nv50-: specify ctrl/user separately when constructing classesBen Skeggs14-28/+32
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/disp/nv50-: split chid into chid.ctrl and chid.userBen Skeggs7-92/+106
GP102/GP104 make life difficult by redefining the channel indices for some registers, but not others. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau: Intercept ACPI_VIDEO_NOTIFY_PROBEHans de Goede2-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 <[email protected]>
2016-11-17drm/nouveau/devinit/gm200: drop pmu reset sequenceBen Skeggs1-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 <[email protected]>
2016-11-17drm/nouveau/devinit/gm200: replace while loops with PTIMER-based timeout loopsBen Skeggs1-4/+11
It appears to be safe to access PTIMER on an unposted board with newer chipsets. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/pmu/gp102: initial implementationBen Skeggs4-0/+47
GP102/GP104 require a harder reset of PMU prior to DEVINIT, or the IFR image will hang. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/pmu/gp100: initial implementationBen Skeggs4-0/+38
Just enough to hookup preinit reset(), which DEVINIT will depend on later. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/pmu: execute reset before running devinitBen Skeggs1-0/+8
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/pmu: move ucode handling into gt215 implementationBen Skeggs9-184/+304
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/core: initial support for GP102Ben Skeggs1-0/+29
From visual inspection of traces, what we currently implement appears to be identical to GP104. Seems to work well enough too. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/device/pci: fix oops if no mmu subdev presentBen Skeggs1-1/+1
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-17drm/nouveau/kms/nv50: avoid touching DP_MSTM_CTRL if !DP_MST_CAPBen Skeggs1-2/+5
Fixes certain displays not being detected due to DPAUX errors. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-07drm/nouveau/fifo/gf100-: protect channel preempt with subdev mutexBen Skeggs2-6/+11
This avoids an issue that occurs when we're attempting to preempt multiple channels simultaneously. HW seems to ignore preempt requests while it's still processing a previous one, which, well, makes sense. Fixes random "fifo: SCHED_ERROR 0d []" + GPCCS page faults during parallel piglit runs on (at least) GM107. Signed-off-by: Ben Skeggs <[email protected]> Cc: [email protected]
2016-11-07drm/nouveau/gr: fallback to legacy paths during firmware lookupAlexandre Courbot1-4/+46
Look for firmware files using the legacy ("nouveau/nvxx_fucxxxx") path if they cannot be found in the new, "official" path. User setups were broken by the switch, which is bad. There are only 4 firmware files we may want to look up that way, so hardcode them into the lookup function. All new firmware files should use the standard "nvidia/<chip>/gr/" path. Fixes: 8539b37acef7 ("drm/nouveau/gr: use NVIDIA-provided external firmwares") Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> Cc: [email protected]
2016-11-07drm/nouveau/kms/nv50: initial support for DP 1.2 multi-streamBen Skeggs4-2/+571
Signed-off-by: Ben Skeggs <[email protected]>
2016-11-07drm/nouveau/kms/nv50: allow encoder update to be called from other modulesBen Skeggs2-44/+44
MST encoders will make use of this to share code with SOR> Signed-off-by: Ben Skeggs <[email protected]>
2016-11-07drm/nouveau/kms/nv50: rename remaining nv50_crtc to nv50_headBen Skeggs1-58/+55
No code changes, just renames + shuffles. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-07drm/nouveau/kms/nv50: remove code to create ctxdma for every framebufferBen Skeggs3-90/+7
This is now handled by prepare_fb(). Legacy flips were the last user. Signed-off-by: Ben Skeggs <[email protected]>
2016-11-07drm/nouveau/kms/nv50: remove code to support non-atomic page flipsBen Skeggs8-288/+27
Made completely unreachable (and broken) by atomic commits. Signed-off-by: Ben Skeggs <[email protected]>