summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2012-10-12sna/overlay: Trim suggested BestSize to fit within the overlay constraintsChris Wilson
As the maximum reported image sizes are for the source image, we should be careful not to recommend the application use an output Window larger than can be handled by the overlay hardware. So shrink it to fit, whilst preserving the aspect ratio. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-12Fix possible_clones computation for shared encoders between outputsPaulo Zanoni
Libdrm's possible_clones is a mask of encoders. Xorg's possible_clones is a mask of outputs, so we just can't do the following: output->possible_clones = kencoder->possible_clones; This is a problem on Haswell because, at least with the current patches floating on the mailing list, there is more than one connector per encoder. This patch writes the code to properly translate libdrm's encoder mask into Xorg's output mask. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11sna: Correct a bogus assertion after inplace PutImageChris Wilson
If we are forced to use the GPU bo as the target because the CPU bo is busy, the priv->cpu flag is likely to remain set, so we need to clear it rather than fail the assertion that is false. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11sna/gen7: Replace bogus state tracking assertionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11sna: Rearrange switch to suppress a compiler warning in sna_copy_plane_blt()Chris Wilson
Hide the impossible default case so that static analyzers are not confused. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11sna: Limit available space for gen2Chris Wilson
Since pre-g33 chipsets impose massive alignment restrictions on objects within the aperture we need to further restrict the amount of available space to be sure we have sufficient room to accommodate the alignment. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11sna: Use high/low watermarks for fenced aperture countingChris Wilson
This helps with fitting larger operations into the small apertures of gen2, which due to the lax accounting could trigger ENOSPC. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-11intel: fix fullscreen damage posting on pageflipDave Airlie
While playing with MPX and sw cursor I noticed page flips won't end up misrendering some bits, so the sw cursor was replacing the bits on the wrong pixmap. Fix the damage handling to be correct and append damage before swapping the pointers and process damage after. This fixes misrendering with MPX cursors under a fullscreen compositor, that pageflips. Signed-off-by: Dave Airlie <airlied@redhat.com> [ickle: The secret is that damage is sometimes reported before the rendering in DamageRegionAppend, and sometimes afterwards in DamageRegionProcessPending. For instance, the software cursor operates prior to being rendered over.] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-10sna: Prevent sign-extension when manipulating stridesChris Wilson
Reported-by: Prit Laes <plaes@plaes.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55823 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09sna/gen6+: Initialize the damage for fill-boxesChris Wilson
In case we need to redirect the rendering for a large render target, we need to initialize the damage pointer. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: ttps://bugs.freedesktop.org/show_bug.cgi?id=55812 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09sna: Check the map exists before trying to release itChris Wilson
Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: ttps://bugs.freedesktop.org/show_bug.cgi?id=55812 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09sna: Also check the bg rrop for reads when deciding upon fallback placementChris Wilson
Reported-and-tested-by: chr.ohm@gmx.net Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55810 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-09sna: Pass the region, not its pointer, when moving the GC to the CPUChris Wilson
Fortunately, the sgc->region was not used along that particular fallback path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-08sna/gen5: Flush pipelined ops when changing stateChris Wilson
When is a pipelined operation, not pipelined? That is the mystery posed by our hardware! Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51422 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-08sna: Fix check_reloc_and_exec typoChris Wilson
Garbage xorg includes hiding genuine compiler warnings ftl once again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna: Check that we have sufficient space for a copy when replacing a fillChris Wilson
Reported-by: Timo Kamph <timo@kamph.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna: Check that for batch overflows after advancing a BLTChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna: Only reduce the maximum batch size for old kernelsChris Wilson
Be careful we not increase the batch size to span multiple pages on 865g! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna/gen2: Count the number of dwords required for the invariantChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07Use path for intel-gen4asm derived from pkg-configChris Wilson
As we use pkg-config to determine whether to use intel-gen4asm, we should also use it to locate the right version of intel-gen4asm to use. This allows the user to install the assembler in a non-standard path for cross-builds and similar. Reported-by: Josh Tripplet <josh@freedesktop.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55646 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna/gen2: And the other compile failureChris Wilson
Typing on Sunday before coffee is a very bad idea. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna/gen2: Compile fixChris Wilson
Be careful when cutting and pasting assertions! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-07sna/gen2: Add a couple of assertions to track down a batch overflowChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=55700 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-05sna: Do not create an unsnooped CPU mapping for readbacksChris Wilson
Otherwise we notice that we have a CPU mmap during read synchronized and presume that we need not take any further action. However... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-05Fix out-of-tree builds with intel-gen4asm installedJosh Triplett
The make rules to compile shaders with intel-gen4asm referenced the .g4a source files without using $(srcdir), which broke out-of-tree builds. Reference .g4a source files via $(srcdir), and add $(srcdir) to m4's include path, fixing out-of-tree builds. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55645 Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2012-10-05sna: Refactor the fallback CopyArea to use the common region computationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna/gen2: Tidy DBG code for disabling composite operationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna: Remove another sna_pixmap->cpu assertion that was not trueChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna: Propagate failures from compositing glyph masksChris Wilson
So that we can fallback correctly. This is primarily using for debugging failure paths... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna/gen2: Prevent using the GTT maps with I915_TILING_Y on 855gmChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna: Once again look into assertions around sna_pixmap->cpuChris Wilson
Revert back to basics, and clear the CPU flag everytime we use the GPU, rather than try to avoid clearing it along some paths. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna: Avoid using the gpu for uploads whilst wedgedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-04sna/gen2: Allow fine damage tracking for render operationsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna/gen2: Setup invariant blend argumentsChris Wilson
I thought these were completely specified via the LOAD_STATE_IMMEDIATE commands we used whilst seting up the render pipeline. I was wrong. Reported-by: Timo Kamph <timo@kamph.org> References: https://bugs.freedesktop.org/show_bug.cgi?id=55455 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna: Clear sna_pixmap->cpu when destroying the CPU damageChris Wilson
So that we keep the assertion checks that without CPU damage we can not be on the cpu. Reported-by: Clemens Eisserer <linuxhippy@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55591 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna: Protect against undefined O_CLOEXECChris Wilson
Reported-by: Giovanni Mariani <mc2374@mclink.it> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55577 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna: Fix an instance of undamaged trackingChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna/gen7: Tidy detection of unbounded render opChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna/dri: Delay the deactivation of the pageflippingChris Wilson
As we need to clflush the scanout buffer as we return it to the bo cache on SNB+, it is costly to terminate the pageflipping as soon as we drop a frame as mesa often fails to keep up to the vrefresh rate. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-03sna: Review sna_pixmap->cpu trackingChris Wilson
Notably 52b211cb15b3 was triggering a few assertions. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02sna: Prevent sna_damage_contains_box__no_reduce() from a NULL derefChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02sna: Actually upload the damage when replacing a busy CPU bo for PutImageChris Wilson
Reported-by: Roman Jarosz <kedgedev@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55508 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02sna: Tweak CPU damage partial upload pathsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02sna: Avoid accumulating damage to the CPU if it is already damagedChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-02sna: Remember to call ValidatePicture() before using newly created PicturesChris Wilson
Reported-by: Marco De Michele <marco.demichele@taolab.it> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55527 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-10-01sna/gen2: Clear STIPPLE setup before rendering with the 3D pipelineChris Wilson
One over-zealous removal too many. Reported-by: Timo Kamph <timo@kamph.org> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55455 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30sna/dri: Check back/front buffers of a pixmap for format changeChris Wilson
Highly unlikely. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30sna: Cache repeated use of the temporary CPU mapping for tiled_x uploadsChris Wilson
Fixes ShmPutImage regression under gnome-shell Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30sna/dri: Only chain to a triple buffer pageflip sequenceChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2012-09-30sna/dri: Improve handling of async/sync pageflip transitionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>