summaryrefslogtreecommitdiff
path: root/src/i830.h
AgeCommit message (Collapse)Author
2010-06-25Rename common infrastructure to the intel namespace.Chris Wilson
After splitting out the i810 driver into its own legacy directory, we can identify the common routines not as i830 but as intel. This clarifies the code which *is* i830 specific. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-25i810: Move into a legacy directory.Chris Wilson
The driver is still built but is no longer under active development so move it and supporting files to a new directory. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-17i830: Remove domain tracking from pixmaps.Chris Wilson
The 4 integers can be reduced to a single boolean value, so do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-17i830: Tidy i830_uxa_put_image()Chris Wilson
Use a single code path to upload the image data after selecting the right bo, and take advantage of pwrite() when possible. Fixes: Bug 28569 - [i965] IGN's flash-based video player crashes X https://bugs.freedesktop.org/show_bug.cgi?id=28569 Bug 28573 - [i965] Fullscreen flash and windowed SDL games fail to update the screen https://bugs.freedesktop.org/show_bug.cgi?id=28573 Reported-and-tested-by: Brian Rogers <brian@xyzw.org> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-15drmmode: Use the tiled stride for the rotated pixmap.Chris Wilson
After d41684d5459 we now allocate all framebuffers as tiled bo, and so we must be careful to use the appropriate stride as returned from the allocation, instead of assuming that it is just an aligned width. Fixes: Bug 28461 - screen rotation results in corrupted output. https://bugs.freedesktop.org/show_bug.cgi?id=28461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Till Matthiesen <entropy@everymail.net>
2010-06-14Compile fix for alternate list.h from xserver-1.9Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-09Revert "xp:trapezoids"Chris Wilson
This reverts commit f429fb9d872950705e11171d0e7407fb7673c786. An experimental patch I forgot was on my main branch as I was bugfixing. ARGH!
2010-06-08xp:trapezoidsChris Wilson
2010-06-07Allocate a correctly sized framebuffer when tiling by using libdrm's support.Eric Anholt
When I made libdrm stop overallocating so much memory for the purpose of bo caching, things started scribbling on the bottom of my frontbuffer (and vice versa, leading to GPU hangs). We had the usual mistake of size = tiled_pitch * height instead of size = tiled_pitch * tile_aligned_height.
2010-06-07Use the direct dixGevPrivate() API when availableChris Wilson
This is quicker and smaller than the old indirect function call to dixLookupPrivate(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-06Adapt to DevPrivate API changesKeith Packard
This allows the driver to be built against either the old or new DevPrivate API. Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-01i830: Remove unused coord-adjust.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-01i915; Avoid the implicit flush on changing BUF_INFOChris Wilson
3DSTATE_BUF_INFO is an implicit flush of the piepline, so avoid emitting that and associated state unless the destination pixmap has actually changed. This is a win of around 3-5% for cairo-perf-trace, notably for firefox. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-31Disable acceleration if we detect a hardware error.Chris Wilson
This is wildly optimistic, but it should work in a surprising number of error situations and some output in those cases will be hopefully be better than none... If we submit a batchbuffer and the kernel reports the GPU is hung (which will be caused by an earlier execbuffer, and so the kernel should have had enough time to determine whether or not it could reset the GPU) then disable any further attempt to accelerate gfx and force fallbacks to map the buffers and use the CPU. We cannot normally map any more buffers if the GPU is hung, so only those already mapped prior to the hang can be written to, or those allocated in system memory. However, we can expect that the framebuffer is already mapped, and so have a reasonable expectation to continue to see the display update. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-28i915: Don't re-emit vertex size unless it has changed.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Emit CA over using OutReverse + Add passesChris Wilson
On PineView: 578/621 -> 610/617 kglyphs/sec [rgb/aa]
2010-05-24uxa: Use temporary dest when target is too large for compositorChris Wilson
If the destination cannot fit into the 3D pipeline when we need to composite, we fallback to doing the operation on the CPU. This is very slow, and quite easy to trigger on i915 by plugging in an external display. An alternative is to extract the extents of the operation from the destination using the blitter which can usually handle much larger operations. This gives us a temporary target that can fit into the 3D pipeline and thus be accelerated, before copying back into the larger real destination. For x11perf this boosts glyph rendering on PineView, from 38kglyphs/s to 480kglyphs/s. Just a little shy of the native performance of 601kglyphs/s Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Move vertices into a vertex buffer object.Chris Wilson
In theory this should allow us to pack far more operations into a single batch buffer, and reduce our overheads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24Use pwrite to upload the batch bufferChris Wilson
By using pwrite() instead of dri_bo_map() we can write to the batch buffer through the GTT and not be forced to map it back into the CPU domain and out again, eliminating a double clflush. Measing x11perf text performance on PineView: Before: 16000000 trep @ 0.0020 msec (511000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0021 msec (480000.0/sec): Char in 80-char rgb line (Charter 10) After: 16000000 trep @ 0.0019 msec (532000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0020 msec (496000.0/sec): Char in 80-char rgb line (Charter 10) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-24i915: Emit composite primitive with specialised functions.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-23i915: amalgamate composite into a single primitive listChris Wilson
Combine all the calls to composite between prepare_composite and done_composite into a single primitive list, rather than a primitive call per composite(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-17i830: Remove vestigal debugging ALWAYS_FLUSH and ALWAYS_SYNCChris Wilson
These are now debugging options exposed in Xorg.conf, and now unused int the source code. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: Remove unused old_front parameter from drmmode_do_pageflip.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: don't overwrite the old intel->front_bufferChris Wilson
It's now handled in the common ExchangeBuffers() path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-12dri2: Handle reference counting across page flippingChris Wilson
1. Instead of swapping bos, swap the entire private structure. 2. If we update the pixmap bo for the Screen, make sure we update the reference inside intel->front_buffer so that xrandr still functions. Fixes: Bug 27922 - i965: Rapidly resizing OpenGL window causes GPU to hang. https://bugs.freedesktop.org/show_bug.cgi?id=27922 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-12i830: Prevent allocation of bo larger than half the apertureChris Wilson
We need to prevent overcommitting the aperture, and in particular if we allocate a buffer larger than available space we will fail to mmap it in and rendering will fail. Trying to allocate multiple large buffers in the aperture, often the case when falling back, causes thrashes and eviction of useful buffers. So from the outset simply do not allocate a bo if the the required size is more than half the available aperture space. Fixes allocation failure in ocitymap.trace for instance. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-10i830: Minor cleanupChris Wilson
Remove some extraneous prototypes and unused variables. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-10uxa: Rearrange checking and preparing of composite textures.Chris Wilson
x11perf regression caused by 2D driver https://bugs.freedesktop.org/show_bug.cgi?id=28047 caused by commit a7b800513fcc94e063dfd68d2f63b6bab7fae47d uxa: Extract sub-region from in-memory buffers. The issue is that as we extract the region prior to checking whether the composite can in fact be accelerated, we perform expensive surplus operations. This is particularly noticeable for ComponentAlpha text, such as rgb10text. The solution here is to rearrange the check_composite() prior to acquiring the sources, and only extracting the subregion if the render path can not actually handle the texture. Performance (on PineView): a7b800513^: aa=68600 glyphs/s, rgb=29900 glyphs/s a7b800513: aa=65700 glyphs/s, rgb=13200 glyphs/s now: aa=66800 glyph/s, rgb=28800 glyphs/s The residual lossage seems to be from the extra function call and dixPrivate lookups. Hmm. More warning is the extremely low performance, however the results are consistent so the improvement looks real... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-15uxa: Reuse in-flight boChris Wilson
When we need to allocate a new bo for use as a gpu target, first check if we can reuse a pixmap that has already been relocated into the aperture as a temporary target, for instance a glyph mask or a clip mask. Before: backend test min(s) median(s) stddev. xlib firefox-planet-gnome 50.568 50.873 0.30% xcb firefox-planet-gnome 49.686 53.003 3.92% xlib evolution 40.115 40.131 0.86% xcb evolution 28.241 28.285 0.18% After: backend test min(s) median(s) stddev. xlib firefox-planet-gnome 47.759 48.233 0.80% xcb firefox-planet-gnome 48.611 48.657 0.87% xlib evolution 38.954 38.991 0.05% xcb evolution 26.561 26.654 0.19% And even more dramatic improvements when using a font size larger than the maximum size of the glyph cache: xcb firefox-36-20090611: 1.79x speedup xlib firefox-36-20090611: 1.74x speedup xcb firefox-36-20090609: 1.62x speedup xlib firefox-36-20090609: 1.59x speedup Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-10Review i830_pad_drawable_width()Chris Wilson
We appear to have a confusion of stride in terms of pixels, pitch in terms of bytes and the actual width of the surface. i830_pad_drawable_width() appears to be operating aligning *pixels* to a 64 pixel boundary and has never used the chars-per-pixel causing considerable confusion in its callers. Remove the parameter and ensure that the callers are expecting a value in pixels returned, multiplying by cpp where necessary to get the pitch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-04Remove remaining fbOffset setting.Eric Anholt
In the long long ago, fbOffset was used for DGA. The server now has only one reference to fbOffset, a leftover setting of it in fbdevhw. We can safely ignore it now, which is good since we weren't updating it in other places where the front buffer offset could change.
2010-03-04Remove i830_allocate_2d_memory() now that it only called one function.Eric Anholt
2010-03-04Init CRTC cursors with CRTC setup instead of i830_memory.Eric Anholt
2010-03-04i830_memory: rip out the remainings of the old allocatorDaniel Vetter
Yeah! Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Carl Worth <cworth@cworth.org>
2010-03-04i830_memory: hide as much of the old memory allocator as possibleDaniel Vetter
The only user left of this stuff is the xvmc support. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: switch frontbuffer to drm_intel_boDaniel Vetter
Yet another user of i830_memory gone for good. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: switch cursors to drm_intel_boDaniel Vetter
Minus one user of i830_memory, some more to go. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: kill field "pitch"Daniel Vetter
Totally unused. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rip out field "size"Daniel Vetter
Use the one in the drm bo instead. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: kill field "tiling_mode"Daniel Vetter
Totally unused. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rename i830_bind_all_memory to reflect code realityDaniel Vetter
It doesn't bind anything anymore, but does a few random things. Give it a hopefully vague enough name to cover all cases ;) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rip out the old video memory allocatorDaniel Vetter
Besides the debug stuff the went away in the previous patch, this stuff was totally unused ... Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: kill i830_desribe_allocationsDaniel Vetter
Totally useless debug function from the pre-gem era. No point to occasionally spam Xorg.log with a bogus "No memory allocations" message. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rip out field "offset"Daniel Vetter
Use the one in the drm bo instead. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rip out field "end"Daniel Vetter
It's a left-over from the non-gem era and no longer used at all. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-02-20Remove more DRI1 dead code.Eric Anholt
2010-01-13DRI2: support new DRI2 APIsJesse Barnes
The new interfaces allow for improved buffer swap, and support for the SGI_swap_control, SGI_video_sync and OML_sync_control GLX extensions. The Intel implementation allows page flipping to occur for swaps that are full screen and not rotated. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08uxa-glyphs: Enable TILING_X on glyph caches.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-08Consolidate determining maximum sizes for use with GEMChris Wilson
Add a small wrapper function so that the callsites need only call the single function when checking the available aperture size for determining the maximum viable size for operations. This will allow us to easily extend this set in the future by only needing to adding the check to a single location. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-12-10Revert "uxa-glyphs: Enable TILING_X on glyph caches."Chris Wilson
This reverts commit 3f11bbec420080151406c203af292e55177e77d1. For unknown reasons, enabling tiling for the glyph cache is causing glyph corruption both across suspend and resume and VT switching, on a wide range of chipsets (reports include both i8xx and gm45) This strongly suggests that we are handling tiling, or updates to tiled buffers, incorrectly across i915_gem_idle(). However, until we can find the root cause, we want to fix this regression before the next stable release, so simply revert this patch. :( Fixes: [Bug 25406] fonts garbled after resuming from suspend since 6729b508 http://bugs.freedesktop.org/show_bug.cgi?id=25406 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>