summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-06sna: always skip active search when requested for find an inactive boChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=44504 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: Optimise sna_poly_segment() for the frequent no-op caseChris Wilson
Strange as it may seem... But the principle of doing less work with greater locality should help everywhere, just not as noticeable when real work is performed. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: Only force a pipeline flush for a change of destination, not sourcesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna/gen6: Reuse current no-blending setup for PictOpClearChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna/gen6: Tidy emission of CC state (blending)Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna/trapezoids: Add debug markers for move-to-cpuChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: fast path move-to-cpu of an all-damaged CPU boChris Wilson
When the bo is already completely damaged on the CPU, all we need to do is to sync with the CPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: Pass the real destination pixmap to sna_write_boxes()Chris Wilson
Faking it for the render upload simply isn't good enough, since we need the correct drawrect. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna/trapezoids: Use a slightly faster miTrapezoidBounds()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: Only need to remove the pixmap from the dirty CPU list when clearing damageChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: The condition for automatically using the GPU source is no CPU damageChris Wilson
With no CPU damage to upload, we know that there is no reason not to use the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-06sna: Rearrange use-cpu-bo to avoid reducing GPU damageChris Wilson
If we spot that the region is wholly contained within the CPU damage initially, we can conclude that is not in the GPU damage without reduction. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna/gen6: Only force BLT if the src and dst overlaps for self-copyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Only force a batch continuation if the scanout is written toChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna/gen6: Enable reuse of source PictureChris Wilson
Check if the source and mask are identical pictures and just copy the source channel to the mask in that case. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Quickly handle the common case of using a CPU source pixmapChris Wilson
For the common case (at least with llc bo) where we are immediately using an uploaded image from its linear buffer, check upfront before computing the sampled region for transfer to the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Quickly handle the common case of using a GPU source pixmapChris Wilson
For the common case of glyphs, the pixmap is entirely on the GPU which can be quickly tested before performing the more complex transformations to determine how much pixel data we need to upload. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Check that the GTT is no longer mapped before ensuring the shadow pointerChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Only mark the pixmap as GTT mapped if the private owns the pixelsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Make sure that we do not attach to SHM pixmaps in ignoranceChris Wilson
Without xserver support for notification of when scratch pixmaps are reused, we simply cannot attach our privates to them lest we cause corruption with SHM pixmaps. This is a recent regression back unto an old, old xserver issue. Reported-by: Paul Neumann <paul104x@yahoo.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44503 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Add more debugging to use-gpu-boChris Wilson
To aide debugging in conjunction with compositors and their crazy offsets. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Check for usable pixmap before deference its privateChris Wilson
Beware the NULL pointer and early deference. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Enable using the render pipeline for uploads to Y-tiled pixmapsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Mark the upload as having acquired the GTT mappingChris Wilson
In order for the entire PutImage to be performed inplace, we need to maintain the tendency to keep doing inplace operations. This hint is provided by tracking whether or not the last operation used the GTT mapping. However, that hint was not being provided by zpixmap_blt. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Avoid operating inplace if we have pending CPU damageChris Wilson
If the operation does not replace existing CPU damage, we are likely to want to reuse the pixmap again on the CPU, so avoid mixing CPU/GPU operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Avoid switching rings for uploading dataChris Wilson
On systems that incur painful overhead for ring switches, it is usually better to create a large buffer and perform a sparse copy on the same ring than create a compact buffer and use the BLT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna/trapezoids: Try creating the trapezoids mask inplace if not using spansChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Throttle, throttle, throttle.Chris Wilson
This reverts 281425551bdab7eb38ae167a3205b14ae3599c49 as it was causing insufferable lag in firefox. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Attach to the pixmap for source counting when deferring uploadsChris Wilson
If we decide to defer the upload for this instance of the source pixmap, mark it so. Then if we do use it again we will upload it to a GPU bo and hopefully reuse those pixels. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Try doing a cheap is-contained check before reducing damageChris Wilson
If the pixmap is entirely within the current CPU damage, we can forgo reducing either the GPU or CPU damage when checking whether we need to upload dirty pixels for a source texture. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Check the composite-rectangles will be on the GPU before forcibly attachingChris Wilson
If we think that the operation is better performed on the CPU, avoid the overhead of manipulating our privates. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Deferred attachment to a pixmap needs to mark the pixmap as entirely dirtyChris Wilson
As demonstrated with oversized glyphs and a chain of catastrophy, when attaching our private to a pixmap after creation we need to mark the entire CPU pixmap as dirty as we never tracked exactly which bits were dirtied. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Immediately upload oversized glyphsChris Wilson
Glyphs, even large ones, we suspect will be reused and so the deferred upload is counterproductive. Upload them immediately and mark them as special creatures for later debugging. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Don't perform a deferred attachment for vmapping if not supportedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Use the created cpu-bo for upload and downloadChris Wilson
As we explicitly create CPU bo when wanted, we no longer desire to spontaneously create vmaps for simply uploading to the GPU bo. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-05sna: Fix assertion as we may want to create active bo with cpu mappingsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna/damage: Fix reduction to copy the boxes correctlyChris Wilson
We need to be carefully to copy the boxes in a strict lifo order so as to avoid overwritting the last boxes when reusing the array allocations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Mark tiny CPU pixmaps as completely dirtyChris Wilson
Avoid the overhead of tracking damage on small pixmaps when using CPU rasterisation; the extra cost of sending the whole pixmap compared to the damage is negligble should it ever be required on the GPU. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Only request page size allocations for the replacement bufferChris Wilson
A precondition on bo creation is that the size must be page aligned. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Expand small stipples into 8x8 patternsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Align tiled stipple uploads with the stipple pixmap correctlyChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Always prefer to use cacheable operations after the GPU is wedgedChris Wilson
As rasterisation will be performed upon the CPU we need to avoid the readbacks form uncached memory and so we should restrict ourselves to only create further damage within the CPU pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Prevent creation of bo purely for GTT mapping when wedgedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Only allow mappable pixmaps to be mappedChris Wilson
If we did not allocate the pixel data, such as for wedged pixmaps or scratch buffers, then we cannot perform the pointer dance nor do we want to create the GPU buffer. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Force creation of ordinary pixmaps when wedged.Chris Wilson
If the pixmap was intended for scanout, then the GPU bo will be created upon attachment to the fb. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: The batch is counted in dwords, not bytes!Chris Wilson
Yikes, I choose the wrong units for the max_batch_size. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Carefully free the freed_pixmap upon exitChris Wilson
As the contents of the pixmap are now rubbish, we need to manually destroy it rather than pass it to the normal sna_pixmap_destroy() routines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Limit batch to a single page on 865gChris Wilson
Verified on real hw, this undocumented (at least in the bspec before me) bug truly exists. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Guard against NULL damage derefChris Wilson
The fast version of damage checking assumes that the damage has already been determined to be non-NULL, so make sure it is. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-01-04sna: Fix typo during partial list deletionChris Wilson
And keep the asserts that lead to its discovery. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>