summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
AgeCommit message (Collapse)Author
2014-07-23sna: Skip performing an async flip after fixupChris Wilson
After the first async failure and we fix up the CRTC, ordinary we queue a no-op flip in order to queue the event. For async flips, we do not want that event so just skip the flip. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23sna: Add a DBG message for slave damage propagationChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23sna: Reorder disabling scanout pixmap when updating slaveChris Wilson
The assertion caught that we would unregister an invalid drawable on older Xorg. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-23sna: Disable all outputs when initializing as a slaved output providerChris Wilson
When we are constructed as a slaved device, we need to disable all outputs or else they are not correctly hooked into the master device upon startup. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-22sna: Ensure errno is set after failure before reporting a modeset failureChris Wilson
A few paths we report a sanity check failure which do not set errno, but we then print out the errno as part of our message to the user. Set it to a sane value in those cases. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Fix compilation with older XorgChris Wilson
sna_display.c: In function 'sna_crtc_disable_shadow': sna_display.c:1375:39: error: dereferencing pointer to incomplete type DamageUnregister(&crtc->slave_damage->drawable, crtc->slave_damage); Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Support TearFree on slaved outputsChris Wilson
By always forcing the shadow intermediatory, we can enable TearFree even ona slave scanout. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Assert that we never attempt to flip the slave scanoutChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Handle rotated slaved scanoutsChris Wilson
As per the usual handling of rotated scanouts with unsupported rotations, we stage the drawing onto a backbuffer then rotate onto the crtc later. The difference here is that we must read the contents from the master pixmap rather than our own screen pixmap. Spotted was looking at slaved scanouts mistakenly setting the CRTC transformed flag. Reported-by: Tomas Pruzina <pruzinat@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81383 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Avoid confusing failure to flip and flipping zero CRTCChris Wilson
During the present unflip path we blindly try to restore the original mode after a flip failure. However, it confuses flipping zero CRTC with a genuine failure. This has the result of undoing a DPMS change (e.g. xset dpms force dpms) under a DRI3 compositor. Reported-by: Jiri Slaby <jirislaby@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81456 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Busy-wait for the kernel to catch up when flippingChris Wilson
If the kernel reports that it is busy, it has not yet finished processing a pending flip and we have multiple CRTC queued, just wait for the kernel to clear its backlog before submitting the next flip. On the other hand, if we can just overwrite the pending flip results. However, the EBUSY may actually be a genuine report by the kernel of an error, so check for an invalid CRTC first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Silence valgrind when reading plane propertiesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-17sna: Remove extraneous function wrappingChris Wilson
Since we only have the single callsite for do_page_flip, the wrapper is not adding any meaningful information. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11sna: Use a stricter test for determining CRTC off before updating the cursorChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-11sna: Reduce reflections onto rotationsChris Wilson
In order to support a wider range of rotation/reflections, perform a simple reduction of the requested rotation first. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-08sna: Rewrite rotation setup on top of universal drm planesChris Wilson
The kernel interface has changed slightly since the early proposals. Now the rotation property is only on the plane and so we have to lookup the primary prime as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-03sna: Wrap xf86DPMSSetChris Wilson
We need to wrap xf86DPMSSet() so that we can reintialize our bookkeeping and auxiliary planes after disabling/re-enabling CRTC during DPMS operations. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-03sna: Clear the cursor reference from the CRTC if the update failsChris Wilson
This should allow it to be restored correctly the next time it gets shown. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-07-01sna: Enforce LinearFramebuffer optionChris Wilson
This option should only be used for compatibility. Previously this was done at a high level, this changes it to enforce the tiling as we apply the CRTC. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-30sna/dri2: Pass around the correct DrawableRec for sampling from the foriegn boChris Wilson
One day, we will move the width/height/bpp to the bo itself... Reported-by: Ilia Mirkin <imirkin@alum.mit.edu> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-26sna: Make output destroy more defensiveChris Wilson
We may never create the properties as it may be ignored or the allocation may fail, so we need to be careful when freeing we do not stumble over invalid pointers. References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c28 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Only mark throttle as done after successChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Throttle before doing a TearFree buffer replacementChris Wilson
If the client is rendering fast, he may be rendering too fast and starting to build up a backlog. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-25sna: Check all connectors for reuseChris Wilson
Do not rely on the MST path being present to indicate a connector that may be reused. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80355 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna: Add yet more DBG messages to MST discoveryChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna: Add some more DBG around connector discoveryChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-24sna: Ensure serial is not 0 for runtime MST discoveryChris Wilson
We reserve serial==0 for the initial setup that is run before RandR is configured. After the server is running, we have to take extra steps to make the outputs visible to userspace. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Disable CRTC after MST topology changeChris Wilson
In order to disable CRTC after marking outputs as removed after probing MST topology updates, we must manually mark the CRTCs as no longer enabled. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Silence compiler warning for shadowed variableChris Wilson
sna_display.c: In function 'sna_mode_redisplay': sna_display.c:6322:12: warning: declaration of 'fb_id' shadows a global declaration [-Wshadow] sna_display.c:223:24: warning: shadowed declaration is here [-Wshadow] CC sna_display_fake.lo Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Handle old busy_ioctl not reporting the active ringChris Wilson
If we have an old kernel, just presume that the bo was last active on the render ring. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Add DBG breadcrumbs to sna_output_discover()Chris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-23sna: Add missing string for DBGChris Wilson
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c12 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22sna: Disable unused CRTC after undock eventsChris Wilson
If undocking removes output (as the MST topology changes and some outputs then become unreachable), we may leave dangling CRTC. This confuses us, so disable any enabled but unconnected CRTC after the undock event. Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in> References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c5 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22sna: Track CRTC mode changes and discard old flipsChris Wilson
If we have a pending flip across a modeset we must be careful to drop the stale flip_bo after the modeset. Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in> References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c8 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-22sna: Clean up CRTC on CloseScreenChris Wilson
We need to do this to stop any stray references escaping through kernel events now that we are passing the CRTC through the event. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-21sna: Clear the transform flag on disabling the CRTCChris Wilson
In places, we assume that if the flag is set, we must have an active CRTC. However, we were not clearing when disabling the CRTC. Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80325 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-20sna: Mark up const boxes to keep the compiler happyChris Wilson
Pass around const to suppress a few compiler warnings. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-19sna: Always readback shadow damage after replacing the bufferChris Wilson
Instead track what we explicitly want to discard for the next operation, so that we don't have to copy back the whole buffer if we have to replace the shadow and intend to overwrite it all. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-18sna: Fix DBG compilationChris Wilson
Missed updaing the DBG message in commit 83c0f034454ef0f474126a3398e5e790ac5ef842 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Jun 18 16:51:46 2014 +0100 sna: Pass desired CRTC viewport for completing single CRTC flips References: https://bugs.freedesktop.org/show_bug.cgi?id=80157 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-18sna: Pass desired CRTC viewport for completing single CRTC flipsChris Wilson
We cannot simply compare against the crtc->shadow_bo for all our needs, so pass in exactly the setup we want and apply that. In particular this is required when flipping away from the single CRTC setup on secondary pipes. Fixes TearFree multi-monitor regression from commit 3932e97057fca16615adaefbc1eb25a0d51a1d8b [2.99.912] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 9 08:58:15 2014 +0100 sna/dri2: Allow TearFree flipping to individual CRTC Reported-by: Leo Wolf <jclw@ymail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80191
2014-06-17sna: Remove invalid assertChris Wilson
Present and flip fallback may queue self-flips, so the assertion that the crtc->flip_bo != crtc->bo is false. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-16sna: Add more DBG to track transitions between CRTC and its shadow or flip boChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-14sna: Enable TearFree by default for systems with PSRChris Wilson
Panel Self-Refresh requires us to avoid frontbuffer rendering in order to be power efficient. This is a job for TearFree! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13sna: Track the pageflip bo's busynessChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-13sna: Try to reuse the current cursor if we fail to updateChris Wilson
As a last resort, continue to display the old cursor if we tried and failed to create a new cursor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Support efficient cursor updates for old machinesChris Wilson
Given a kernel patch to fix coherency of physical objects, we can use a more efficient method for updating cursors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Create a stable output name based on MST topologyChris Wilson
In order to provide persistent names for MST devices, which may change topology dynamically, the kernel exports a PATH blob. We can then use this path to generate the output name, and so reuse existing XID when a monitor is plugged back in. Based on the patch for -modesetting by Dave Airlie. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Discard TearFree damage before checking for an overwriting uploadChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Silence compiler warnings for discarding const Region pointsChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-10sna/dri2: Check that the window covers the whole CRTC before xchgChris Wilson
Fixes TearFre regression from commit 3932e97057fca16615adaefbc1eb25a0d51a1d8b [2.99.912] Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Jun 9 08:58:15 2014 +0100 sna/dri2: Allow TearFree flipping to individual CRTC Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>