summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Bump version to 1.0.14xf86-video-nouveau-1.0.14Lyude2017-03-071-1/+1
| | | | Signed-off-by: Lyude <lyude@redhat.com>
* Consider CRTCs disabled when DPMS is offLyude2017-03-075-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out there's a difference in X between a CRTC being "disabled" and simply having it's DPMS turned off. This is problematic though, because if DPMS is turned off you can't really use the CRTC as a normal CRTC anyway since page flipping and vblanks will be non-functional. As a result, we've been considering DPMS-on CRTCs as enabled and attempt to perform pageflips, vblank waits, etc. on them which inevitably fails. and usually breaks the display the first time any of the CRTCs have their DPMS turned on. This was a problem that didn't really show itself until kernel 4.10 when atomic modesetting was added which caused nouveau to stop trying to fulfill pageflips and vblank waits on disabled CRTCs. I'm not sure how pageflipping disabled CRTCs ever worked in the first place, but since not doing so is the proper behavior anyway I haven't investigated any further. So, copy the ms_crtc_on() function from the modesetting driver and add it here as drmmode_crtc_on(), then use that in all of the places where we should be checking for both DPMS off and disabled CRTCs. This fixes issues with the X ceasing to function (usually) after the first time a CRTC has it's DPMS turned on. Reproduction recipe: - Load up gnome-shell on a machine - Wait for the display to timeout from inactivity and turn itself off - Shake the cursor or press something on the keyboard. Chances are the monitor will come back on, but the display remains black until the next time the X server is restarted. Signed-off-by: Lyude <lyude@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
* recognize and accelerate GM20xIlia Mirkin2016-10-272-1/+11
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* copy: add maxwell/pascal copy engine classesIlia Mirkin2016-10-272-1/+11
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* nvc0: refactor TIC uploads to allow different specifics per generationIlia Mirkin2016-10-274-64/+93
| | | | | | | | This flips GM10x to using the updated format, which is what I tested with. However GM20x and GP10x also use this TIC format. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* nvc0: rename BEGIN_IMC0 to IMMED_NVC0Ilia Mirkin2016-10-271-1/+1
| | | | | | | For consistency with mesa. It wasn't used anywhere previously. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* nvc0: make use of the new hwdefs for TEX_CB_INDEXIlia Mirkin2016-10-272-1/+2
| | | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* hwdefs: update nvc0_3d, add gm107_texture for new TIC formatIlia Mirkin2016-10-273-340/+893
| | | | | | | These are copied directly from the mesa repository. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* exa: add GM10x acceleration supportIlia Mirkin2016-10-2726-19/+918
| | | | | | | | | | | | | rendercheck -f a8r8g8b8 passes as much as on a GK208, and xv appears to work. Very lightly tested. Instead of sticking coordinates into pushbufs, the vertex shader is modified to read them from a constbuf, indexed by vertex id. This approach could be used for all nvc0 generations, but I didn't want to rock the boat. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
* Bump version to 1.0.13xf86-video-nouveau-1.0.13Ilia Mirkin2016-09-201-1/+1
| | | | | | | - Fixes for reverse prime offload - ABI 23 support for Xorg 1.19 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu
* Use NotifyFd for drm and udev fdsKeith Packard2016-07-192-0/+40
| | | | | | NotifyFd is available after API 22, and must be used after API 23. Signed-off-by: Keith Packard <keithp@keithp.com>
* Adapt Block/WakeupHandler signature for ABI 23Adam Jackson2016-07-191-0/+5
| | | | Signed-off-by: Adam Jackson <ajax@redhat.com>
* Properly cleanup fb for reverse-prime-offloadHans de Goede2016-06-281-1/+7
| | | | | | | | | | | | | | | | | drmmode_set_scanout_pixmap(pix) adds drmmod->fb_id through a call to drmmode_xf86crtc_resize(), but on a subsequent drmmode_set_scanout_pixmap(NULL) it would not remove the fb. This keeps the crtc marked as busy, which causes the dgpu to not being able to runtime suspend, after an output attached to the dgpu has been used once. Which causes burning through an additional 10W of power and the laptop to run quite hot. This commit adds the missing remove fb call, allowing the dgpu to runtime suspend after an external monitor has been plugged into the laptop. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* exa/nv50-: fix some potential incomplete pushesBen Skeggs2016-06-022-46/+50
| | | | | | | | I don't think these should actually be able to happen, given that we already reject the unknown formats in the Check() functions. But, just in case... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fix use of out-of-scope dataBen Skeggs2016-06-021-17/+21
| | | | | | Reported by Coverity. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* HAS_DIRTYTRACKING_ROTATION also supports multiple CRTCsIlia Mirkin2016-01-131-1/+1
| | | | | | | | A port of commit ff9a6b6f from xf86-video-ati. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93670 Reported-by: Thomas D. <thfrdue@gmx.de> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* Bump version to 1.0.12xf86-video-nouveau-1.0.12Ben Skeggs2015-12-081-1/+1
| | | | | | Various random fixes have been pending for a long while now... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Take shift in crtc positions for ZaphodHeads configs into account.Mario Kleiner2015-11-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multi-x-screen ZaphodHeads configurations, there isn't a one-to-one mapping of kernel provided drmmode crtc index to the index of the corresponding xf86Crtc inside the xf86CrtcConfig crtc array anymore, ie. for kernel provided drmmode->mode_res->crtcs[i], the i'th crtc won't correspond to the xf86Crtc in the i'th slot of the x-screens xf86CrtcConfig anymore, once ZaphodHeads has only selected a subset of all crtcs of a graphics card for a given x-screen, instead of all crtcs. This breaks the mapping of bit positions in the bit masks returned in kencoder->possible_crtcs and kencoder->possible_clones. A 1 bit in position i of those masks allows use of the kernels i'th crtc for the given kencoder. The X-Servers dix code checks those bit masks for valid xf86Output -> xf86Crtc assignments, assuming that the i'th slot xf86CrtcConfigPtr config->crtc[i] corresponds to bit i in the xf86Output->possibe_crtcs bitmask, and bails if the bitmask doesn't allow the specified assignment of crtc to output. If ZaphodHeads breaks the assumption of bit i <-> crtc slot i this ends in failure. Take this shift of crtc index positions wrt. encoder bitmask bit positions into account by bit-shifting positions accordingly when assigning encoder->possible_crtcs to output->possible_crtcs, so the proper indices match up again for validation by the dix. This problem wasn't apparent last year when testing the ZaphodHeads support on some Kepler cards, as apparently the encoder->possible_crtcs bitmasks returned for those cards by the kernel just had all 4 lsb bits set for all tested encoders/output, so each of the cards 4 crtcs could go with each output and things worked by chance. The current code breaks, e.g., on 2010 MacBookPro with nv50, where one crtc is hardwired to the internal lvds panel, and one crtc is hardwired to the external DP connector, resulting in a failure where dual-display on single-x-screen works fine, but assigning each output to a separate x-screen via ZaphodHeads fails due to the mismatched encoder->possible_crtcs bitmasks. This patch fixes the problem. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fix build after glamor removalIlia Mirkin2015-09-132-10/+3
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* xv: use correct max width/height settingsIlia Mirkin2015-09-133-5/+8
| | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70931 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* remove maxwell GM10x support for nowIlia Mirkin2015-09-131-2/+1
| | | | | | | There is no EXA acceleration, and now no GLAMOR either. User is better off with modesetting until EXA makes an appearance. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* glamor: removeIlia Mirkin2015-09-1311-364/+3
| | | | | | | | If you want glamor, just use modesetting instead. It's hooked up incorrectly in nouveau, and there doesn't seem to be any point in fixing it when the modesetting driver does it all properly. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* Add Option "DRI" to allow selection of maximum DRI level. (v2)Mario Kleiner2015-08-036-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow user to select the maximum level of DRI implementation to use, DRI2 or DRI3. exa accel supports both DRI2 and, if the kernel supports rendernodes, also DRI3. However, DRI3 still seems to have some bugs on current implementations, and additionally it doesn't work well at all for X-Servers older than 1.16.3 due to X-Server bugs. Therefore we default to DRI2 on exa, but allow the user to enable DRI3 with this new option. nouveau's glamor accel backend currently doesn't work under DRI2 at all, so we continue to use DRI3 whenever it is supported and ignore this new option for now. Also add a bit more output about status of Present and DRI3 to aid debugging. Note: This was originally meant to be a boolean parameter, to just select between DRI3 on and off, but changed here to a DRI level to make it consistent with the same option in the released Intel-ddx. v2: Use fixed up Bool return type of nouveau_present_init(). Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Ilia Mirkin <imirkin@alum.mit.edu> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Martin Peres <martin.peres@free.fr> Cc: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* present: Fixup return type of nouveau_present_init()Mario Kleiner2015-08-031-2/+2
| | | | | | | | Make it a Bool consistently, as declared in header. Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
* Avoid build fail without COMPOSITEIlia Mirkin2015-07-141-2/+6
| | | | Reviewed-by: Dave Airlie <airlied@redhat.com>
* Adapt to new dirty tracking apiVadim Rutkovsky2015-07-112-1/+7
| | | | | | | Mirrors commit b6d871bf2 (radeon: adopt for new X server dirty tracking APIs.) in xf86-video-ati. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91284
* fix a wrong use of a logical operator in drmmode_output_dpms()Samuel Pitoiset2015-06-101-1/+1
| | | | | | | | | | | This is probably a typo error which has been introduced in 2009... This fixes the following warning detected by Clang : drmmode_display.c:907:30: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] if (props && (props->flags && DRM_MODE_PROP_ENUM)) { Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Dave Airlie <airlied@redhat.com>
* nv50/exa: add comments showing the code that makes up the programsIlia Mirkin2015-05-271-110/+109
| | | | | | | As decoded by envydis. Perhaps these should move into separate files similar to nvc0, but this seems like a simple intermediate solution. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* older hardware prefers copy to clear, so use thatIlia Mirkin2015-05-201-1/+1
| | | | | | | | Doing a solid copy of 0, or a clear, has the same effect. This is a partial revert of commit 5439a9905eab8c. Pre-nv50 hardware succeeds with copies more often. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nv04-nv40: don't attempt to do 32-bit shiftsIlia Mirkin2015-05-201-1/+2
| | | | | | | | | | | A 32-bit shift is a no-op, which will also make the new planemask get or'd with ~0, thus negating the usefulness of the subsequent planemask != ~0 check. Only do this if it's a less-than-32-bit per pixel format, in which case it will have the desired effect of setting the high bits. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Martin Peres <martin.peres@free.fr>
* Check before trying a solid fillIlia Mirkin2015-05-201-5/+8
| | | | | | | | | | Pre-nv50 has all sorts of funny requirements for non-copy alu operations, and will bail out of solid fills left and right. Account for that case and fall back to the memset. Reported-by: Andrew Randrianasulu <randrianasulu@gmail.com> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Martin Peres <martin.peres@free.fr>
* nv50: explicitly disable ZETA bufferIlia Mirkin2015-03-231-0/+2
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* use defined method names where availableIlia Mirkin2015-03-2310-32/+33
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* Actually do a clear instead of doing a bogus copy.Maarten Lankhorst2015-03-231-2/+2
| | | | Oops!
* Try using EXA ops harder in drmmode_fbcon_copy fallbackMaarten Lankhorst2015-03-211-13/+20
| | | | | The memcpy in the fallback path fails with SIGBUS on GK20A because this memory is not coherent, try to use a solid fill instead.
* Simplify nouveau_allocate_surface's pitch calculation.Maarten Lankhorst2015-03-201-14/+7
| | | | Judging from previous commits all linear buffers should have a 256 byte alignment.
* Use drmGetRenderDeviceNameFromFd to obtain the dri3 node.Maarten Lankhorst2015-03-202-10/+8
|
* Use the correct class and shader ops for GK20A.Maarten Lankhorst2015-03-141-3/+5
| | | | Signed-off-by: Maarten Lankhorst <dev@mblankhorst.nl>
* Make the ddx load with platform devicesMaarten Lankhorst2015-03-141-15/+26
| | | | Signed-off-by: Maarten Lankhorst <dev@mblankhorst.nl>
* fix null pointer derefMaarten Lankhorst2014-10-231-2/+2
|
* check memory allocation in nouveau_glamor_set_shared_pixmap_backingMaarten Lankhorst2014-10-231-0/+2
| | | | As reported by Roy Spliet.
* rework initialization to prevent some crashesMaarten Lankhorst2014-10-231-4/+4
|
* fix !DRI3 caseMaarten Lankhorst2014-10-221-4/+6
|
* fix crash in nouveau_glamor_set_shared_pixmap_backingMaarten Lankhorst2014-10-221-0/+5
|
* move down call to nouveau_present_init until after fb init.Maarten Lankhorst2014-10-221-1/+1
|
* enable dri3 support without glamorMaarten Lankhorst2014-10-226-10/+143
|
* kepler: remove unnecessary texbars, add live-only tex for nvf0Ilia Mirkin2014-10-0420-42/+24
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* allow path to envyas binary to be specifiedIlia Mirkin2014-10-041-6/+7
| | | | Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* copy: don't bother trying to create copy on pre-nva3Ilia Mirkin2014-10-041-1/+5
| | | | | | | | Only the NVA3/5/8/F tesla chips have a copy engine. Don't bother trying to create one on earlier tesla chips (and thus printing an error on failure). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* Bump version to 1.0.11 for release.xf86-video-nouveau-1.0.11Mario Kleiner2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | Highlights: - Support for server managed fd's. - Glamor support. - Maxwell support. - DRI3 and initial Present support. - vsync'ed kms pageflip performance fixes when running on Linux 3.13+ - Multi-display vsync, vblank, swap scheduling, timestamping fixes. - Multi x-screen support fixes. - ZaphodHead support on for multiple outputs per x-screen. - EXA nv-10 fixes. - Enable sync of swaps to vblank by default (Option GLXVblank "on"). - Disable pseudo-triplebuffering by default (Option SwapLimit "1"). Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>