summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nouveau: convert to new screen conversion APIsscreen-conv-apiDave Airlie2012-05-1612-56/+56
| | | | | | | | The compat header takes care of the old server vs new server. this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie <airlied@redhat.com>
* nouveau: add compat-api.h for old/new server apis.Dave Airlie2012-05-162-0/+2
| | | | | | This is just for initial screen conversion functions. Signed-off-by: Dave Airlie <airlied@redhat.com>
* dri2: Don't try to page-flip pixmaps (fdo bug 49351).Francisco Jerez2012-05-081-1/+1
| | | | | Reported-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Francisco Jerez <currojerez@riseup.net>
* nv50: add missing pushbuf space check in NV50SyncToVBlankMarcin Slusarz2012-05-031-0/+3
| | | | Regression from "WIP: port to new libdrm".
* nv40/exa: return false from gradient picture setupBen Skeggs2012-04-241-1/+1
| | | | | | | | Not implemented yet. Shouldn't hit this anyway, fallback in check_composite, but, best be safe :) Reported-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/exa: support for solid picturesBen Skeggs2012-04-242-11/+91
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv30/exa: implement support for solid pictures using register combinersBen Skeggs2012-04-242-109/+92
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv10/exa: implement support for solid picturesBen Skeggs2012-04-241-116/+81
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv10/exa: use fixed-function texture matrix for transformsBen Skeggs2012-04-241-55/+39
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv30/exa: use fixed-function texture matrix for src/mask transformsBen Skeggs2012-04-242-108/+55
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv40/exa: do transforms in vertex programBen Skeggs2012-04-242-114/+136
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0/exa: port recent nv50 changes (vp transform, solid pictures, etc)Ben Skeggs2012-04-246-179/+296
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50/exa: support solid picturesBen Skeggs2012-04-243-28/+85
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50/exa: perform texcoord transformations in vertex programBen Skeggs2012-04-249-131/+129
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv50: implement and use PUSH_DATAuBen Skeggs2012-04-244-94/+33
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nv30/nv40: upload shaders directly from rankine/curie initBen Skeggs2012-04-248-570/+583
| | | | | | | Also removes A8 surface shader hack, and implements proper shaders for the specific purpose. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Keep a single buffer for random accel data, rather than 3 different onesBen Skeggs2012-04-1718-261/+129
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nve0: initial exa/xv acceleration for kepler chipsetsBen Skeggs2012-04-149-39/+582
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: create scratch buffer before initialising m2mfBen Skeggs2012-04-141-17/+13
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: switch to kepler's subchannel assignments (see note)Ben Skeggs2012-04-141-6/+6
| | | | | | | This will bust for kernels with nouveau ABI version < 1.0.0... It should be possible to add compat for 0.0.16 however... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: tidy and cull a heap of fermi init (stuff in default grctx)Ben Skeggs2012-04-141-99/+26
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: punt shaders out to a header fileBen Skeggs2012-04-142-360/+398
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: do tic/tsc binding only once, at startupBen Skeggs2012-04-143-16/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* nvc0: replace direct inline m2mf with inline helper to do the sameBen Skeggs2012-04-144-112/+27
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* WIP: port to new libdrmBen Skeggs2012-04-1433-4246/+3928
| | | | calim: nv50,nvc0/xv: fix src_w/h width/height confusion
* xv: don't try to init textured video without 3d engine objectBen Skeggs2012-03-231-11/+23
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* recognise keplerBen Skeggs2012-03-232-0/+5
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* remove use of xf86PciInfo.h, deprecated now apparentlyBen Skeggs2012-03-062-5/+2
| | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Fix corner case crash for swaplimit > 1Mario Kleiner2012-03-061-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a swaplimit > 1 is set on a server which supports the swaplimit api (XOrg 1.12.0+), the following can happen: 1. Client calls glXSwapBuffersMscOML() with a swap target > 1 vblank in the future, or a client calls glXSwapbuffers() while the swap interval is set to > 1 (unusual but possible). 2. nouveau_dri2_finish_swap() is therefore called only at the target vblank, instead of immediately. 3. Because of the deferred execution of nouveu_dri2_finish_swap(), the OpenGL client can call x-servers DRI2GetBuffersWithFormat() before nouveau_dri2_finish_swap() executes and it deletes pixmaps that would be needed by nouveau_dri2_finish_swap() --> Segfault --> Crash. Prevent this: When a swap is scheduled into the future, we temporarily reduce the swaplimit to 1 until nouveau_dri2_finish_swap() is done, then restore it to its original value. This throttles the client inside the server in DRI2ThrottleClient() before it can call the evil DRI2GetbuffersWithFormat(). The client will still be released one video refresh interval before swap completion, so there is still some potential win. This doesn't affect the common case of swapping at the next vblank, where this throttling is not needed or done. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Reimplement hack for triple-buffering on old X-Servers.Mario Kleiner2012-03-063-9/+40
| | | | | | | | | | | | | | | | | | | | X-Servers before 1.12.0 don't have the DRI2SwapLimit() API. On these, default to a swaplimit of 1 - double-buffering. This patch implements support for swap limit of 2, triple-buffering, on old x-servers via Francisco Jerez previous hack: Return DRI2SwapComplete() before the swap has completed, so clients don't get blocked on the pending swap. This allows for a "triple-buffering look-alike" behaviour, but breaks the swap scheduling and timestamping defined in the OML_sync_control spec, so applications which rely on conformant behaviour will break with a swap limit of 2 on pre 1.12.0 x-servers. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Allow vblank controlled swaps for redirected windows. Part IIMario Kleiner2012-03-061-3/+29
| | | | | | | | | | | | | | | | | | | | | | This part implements proper throttling for clients. For vblank synchronized blits, it defers DRI2SwapComplete() until 1 vblank after the framebuffer blit is submitted to the gpu. Rationale: For unredirected windows, this is the earliest time the "blit swap" can complete, as blits are submitted one vblank before the target vblank and synchronized with vblank in the gpu. This makes swap completion timestamps at least reasonable. For redirected windows, the compositor will probably pick up the "blit swapped" frontbuffer pixmap of the window quickly, but defer its own recomposition to the next vblank, at least if sync to vblank for the compositor is on. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Allow vblank controlled swaps for redirected windows. Part IMario Kleiner2012-03-061-2/+0
| | | | | | | | | | | | | | | | | | | | | Make sure that swaps for redirected windows under a compositor are still scheduled via vblank events, to avoid effects like 2900 fps swaps under a compositor. See discussion with Francisco Jerez at: http://lists.freedesktop.org/archives/nouveau/2011-September/009278.html http://lists.freedesktop.org/archives/nouveau/2011-September/009292.html This is part I of the agreed upon band-aid, in a separate patch. It allows to use vblank related functions on redirected windows and thereby fixes functions from sgi_sync_control and oml_sync_control extension, e.g., glXWaitForMscOML(), glXGetSyncValuesOML(), glXWaitVideoSyncSGI, ... Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Fixes to swap scheduling.Mario Kleiner2012-03-061-2/+21
| | | | | | | | | | | | | | | Fix some small off-by-one errors and a mismatch between 32 bit kernel interfaces for vblank count and 64 bit dri2 interfaces for target_msc et al. Return corrected target_msc to swap scheduling in x-server. A revised version of the patch discussed here: http://lists.freedesktop.org/archives/nouveau/2011-September/009143.html Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Update front buffer pixmap and name before exchanging buffersMario Kleiner2012-03-061-3/+42
| | | | | | | | | | | | | | | | | | | Buffer exchange assumes that the front buffer pixmap and name information is accurate. That may not be the case eg. if the window has been (un)redirected since the buffer was created. This is a translation to nouveau of a fix that was originally developed by Ville Syrjala <syrjala@sci.fi> for the ati/radeon ddx to fix the same bug there. See thread at: http://lists.x.org/archives/xorg-devel/2011-May/021908.html Fixes FDO bug #35452. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Add support for DRI2SwapLimit() API.Mario Kleiner2012-03-065-2/+77
| | | | | | | | | | | | | | | | Uses the new DRI2SwapLimit() API of X-Server 1.12+ to allow to change the maximum number of pending swaps on a drawable before the OpenGL client is throttled by the server. The new optional xorg.conf parameter "SwapLimit" allows to select a new swap limit >= 1. The default swap limit is 2 for triple-buffering on XOrg 1.12+, 1 for double-buffering on older servers, as we can't change the swap limit there. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Implement handling of pageflip completion events.Mario Kleiner2012-03-063-10/+191
| | | | | | | | | | | | | | | | | | | | Requests pageflip completion events from the kernel. Implements pageflip completion handler to finalize and timestamp swaps. Completion handler includes a consistency check, and disambiguation if multiple crtc's are involved in a pageflip (e.g., clone mode, extendend desktop). Only the timestamp of the crtc whose vblank event initially triggered the swap is used, but handler waits for flip completion on all involved crtc's before completing the swap and releasing the old framebuffer. This code is almost identical to the code used in the ati/radeon ddx and intel ddx. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: Fix can_exchange() to allow page-flipping on more mesa versions.Mario Kleiner2012-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | can_exchange() returns false and thereby prevents page flipping on some drawables where page flipping would work fine. This due to non-matching drawable depths values between front buffer pixmap and back buffer pixmap, because front buffer pixmaps inherit the depth of the screen, typically 24 bits, whereas the depth value of back buffer pixmaps for a given RGB8 or RGBA8 visual depends on the mesa version in use, either 24 bits or 32 bits. Use bitsPerPixel instead of depth to decide if drawable is flippable. This will still catch really incompatible formats like 32 bpp vs. 16 bpp buffers. Tested for screen DefaultDepth 24 and also 30 bits (for RGB10 framebuffers) on NV-50. The problem was fixed in the same way in the ati & intel ddx. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* dri2: CreateBuffer format may be 0, use depth in that caseChristoph Bumiller2012-01-091-2/+2
|
* nv50/xv: bump max dims to 8kBen Skeggs2011-12-231-1/+9
| | | | Untested, but I don't see why this wouldn't work...
* xv: stop using custom m2mf codeBen Skeggs2011-12-237-180/+85
|
* dri2: fix allocation of Z16 depth attachmentsChristoph Bumiller2011-12-103-3/+15
|
* move away from libdrm's BEGIN_RING (and variants) macrosBen Skeggs2011-12-0120-740/+768
| | | | subchan auto-assignment is now gone.
* Append _CLASS to object class id definitionsBen Skeggs2011-12-016-153/+162
| | | | I want to be able to use ring macros of the same name
* exa: create general m2mf rect copy for each chipset, use for UTS/DFSBen Skeggs2011-12-016-420/+327
| | | | | | | | No point having duplicated UTS/DFS logic in each implementation. This also splits nv50 out into its own code, in preparation for it being made to not use relocs at all. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* fix typo in conversion to rnn headersMarcin Slusarz2011-12-012-2/+2
|
* convert entire ddx to rnn headersBen Skeggs2011-11-3036-11251/+10900
|
* Default to 16bpp for low memory cards.Marcin Slusarz2011-11-101-1/+4
|
* nv50/exa: wait for enough space for at least one composite operationMarcin Slusarz2011-11-101-2/+2
|
* add missing return in nv50_accel_init failure pathMarcin Slusarz2011-11-101-0/+1
|
* dri2: Add vdpau driver name entryMaarten Lankhorst2011-10-101-2/+8
| | | | | libvdpau has a driver loading mechanism that looks for a dri2 driver first before falling back to nvidia, so lets use that.