summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
AgeCommit message (Collapse)Author
2014-06-18sna: Add log breadcrumbs with valgrindChris 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-11sna: MST topologies may change on any hotplug eventChris Wilson
As the kernel does not send out an explicit DISCOVER event, we have to reinspect every connector after every hotplug event to detect topology changes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-11sna: Squelch log messages for fb/pixmap tiling in the default caseChris Wilson
The output is confusing, so hide it unless it is modified by the user. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-07sna: Fix reporting of TearFreeChris Wilson
The switch was moved after we checked whether pageflips are supported, but the log message was left in the old location. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-07sna: Allow TearFree to be enabled by default via configureChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-06sna: Report KMS driver versionChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-05sna/dri2: Enable immediate buffer exchangesChris Wilson
The primary benefit of this is avoid the extra blit when using a compositor and instead propagate the compositor flip on the frontbuffer to the scanout, or equivalently allows a fullscreen game to flip onto the scanout without intervention by TearFree. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Add support for PresentChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Add support for DRI3Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-06-02sna: Enable kernel support for asynchronous flipsChris Wilson
If a flip fails, attempt to restore the previous working configuration (using a modeset) then disable further flipping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-23sna/dri2: Combine the DRI2 Window privates together into a single structChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-23sna/dri2: Adjust current msc / target seq between CRTCsChris Wilson
The target_msc supplied by the client is required to be monotonic. Since the client does not know which CRTC the window is on, they do not control from which pipe we derive the MSC, and so we need to adjust the hardware values such that the client only ever sees a monotonic value. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-14sna: Rename DRI2 files, functions and variablesChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-08sna: Add an xorg.conf option for removing unused outputsChris Wilson
Clients are not yet ready for outputs that disappear at runtime, often unexpectedly dieing with asynchronous BadOutput errors. A simple workaround is to not remove any output just yet - but allow users to opt in via xorg.conf, i.e. Section "Device" Option "DeleteUnusedDP12Displays" "true" EndSection The name chosen is to be consistent with the nvidia driver, which did MST first and encountered all of these issues first, and has also been adopted for -modesetting. If this is combined with persistent output naming (i.e. based on DisplayPort branch topology), the number of outputs presented to the user should be static. Instead of removing the outputs, we have to mark them detached instead to avoid throwing errors from the kernel. Based on the patch for -modesetting by Dave Airlie. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-07sna: Set desired mode after rediscover during VT switchChris Wilson
When switching back to the VT, rerun the output discovery (if such an event was pending) before we attempt to set the desired modes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-07sna: Run output discovery before modes queryChris Wilson
If we keep the separate discovery uevent, we need to run it first in the cases where we get combined discovery+hotplug events. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-02sna: Perform dynamic connector discoveryChris Wilson
One of the side-effects of MST is that we need to support dynamic attachment and removal of displays as the branch hierachy changes. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-05-02sna: Do not stash drmModeResPtrChris Wilson
In the near future we will be dealing with dynamic discovery of connectors, and so we cannot assume that the mode resources will be static for our lifetime. The first step is to not keep that struct around, but pull out the useful information and discard it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-18sna: Refine detection of when shadow is active during BlockHandlerChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-04-18sna: Always flush the shadow scanoutChris Wilson
When the shadow scanout is active, make sure we call the BlockHandler every time, not just when we about to sleep. This is in case we are swamped by clients trying to render and forgo the important step of ensuring that their output reaches the screen. Reported-by: Ildar Nurislamov <absorbb@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77436 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-27sna: Support variable sized cursorsChris Wilson
One of the downsides with supporting large cursors is that the full size is very rarely used leading to a waste of permanently allocated resources. Refactor our cursor handling so that we can allocate fresh cursors on the fly that are appropriately sized. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-20sna: Only enable cursor support if the hw cursor is supportedChris Wilson
Under a host, we naturally will not setup the cursor capability, and this provides a safeguard in case we have a machine that does not support hardware cursors. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-03-17sna: Improve guard against loading palettes whilst headlessChris Wilson
Whilst hosted, which is very similar to being headless, we do not even have the kmode pointer and so checking kmode->count_crtcs is fatal. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-21sna: Do not register colormaps without any CRTCsChris Wilson
The xserver may crash if we try to setup colormap handling without any CRTCs, so don't. Suggested-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-02-20sna: Query cursor size from the kernelChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-31sna: Use 24bpp rendering by default for gen2 againChris Wilson
Too many users where unhappy that their software was broken. Too bad the same software is also broken at high bit depths as well. References: https://bugs.freedesktop.org/show_bug.cgi?id=73877 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-27sna: Use signal-safe DBGChris Wilson
Otherwise we end up confusing the core Xserver functions when called from auxilliary threads. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-17sna: Cull the DBG spew to stderrChris Wilson
Reduce the logging verbosity of DBG so that it only appears in the logfile by default - makes debugging much more pleasant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2014-01-10sna: Include the deferred hotplug uevent propagation in DBGChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-12-04sna: Print detected GPU firstChris Wilson
This should make the GPU identification easier to find in future. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Correct type of uevent_handlerChris Wilson
xf86AddGeneralHandler returns an opaque pointer, not a function pointer. Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-25Remove uneeded headersZdenek Kabelac
Signed-off-by: Zdenek Kabelac <zkabelac@redhat.com>
2013-11-21sna: Set supported rotations on virtual outputsChris Wilson
As the virtual outputs are created later, they do not get automatically populated with RR properties and we must do that instantiation ourselves. Reported-by: Kirill Müller <mail@kirill-mueller.de> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71846 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14sna: Eliminate a compiler warning for a shadowed variableChris Wilson
sna_driver.c: In function 'sna_load_palette': sna_driver.c:86:12: warning: declaration of 'index' shadows a global declaration [-Wshadow] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-11-14sna: Eliminate a compiler warning for a shadowed variableChris Wilson
We don't strictly need that local structure, so do without and keep the compiler quiet. sna_driver.c: In function 'fb_supports_depth': sna_driver.c:414:23: warning: declaration of 'close' shadows a global declaration [-Wshadow] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-03intel: Remove dependence upon having PciInfoChris Wilson
After some probing mechanisms, we may end up with a valid device without knowing its PCI address a priori. Having a valid device, we can just query it for the correct device id, and can safely abort any path that requires PCI information that we don't have. (Those paths are not valid under such hosting anyway - if it may be required, we could reconstruct the address.) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-23sna/dri: Fix SwapbufferWaitChris Wilson
A regression from commit f99e49f7642545f75bac682274767c45c2e6192a Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Sep 17 09:15:40 2013 +0100 intel: Make the option to control VSync and PageFlip explict which used the inverse meaning of the option to disable waiting on swapbuffers. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-19sna: Do not change DPMS mode on unconnected outputsChris Wilson
The operation is in theory redundant, and in the case of Haswell where we have multiple outputs aliasing to the same encoder, actually harmful. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68030 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-19intel: Fix includes for intel_optionsChris Wilson
In commit dcf9b5ae1889926007cf8a0efd127e9df3c909de Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Sep 17 22:27:45 2013 +0100 intel: Compile fixes for base install of SLED11.sp3 the includes were juggled around to avoid pulling in xorg-server.h outside of the driver. However, missing xorg-server.h leads to subtle bugs in the layout of structures, in this case breaking xf86Options. Reported-by: FBrown <francisbrwn9@gmail.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69555 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18sna: Pushed dixPrivateKeyRegistered wrapper into compat-api.hChris Wilson
Move the wrapping out of the main code body and hide it with the others in our compatability header. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18sna: Wrap use of dixPrivateKeyRegistered for ueventsChris Wilson
SLED11 also requires us to poke around in the privates as it does not provide the more recent privates API. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-18intel: Compile fixes for base install of SLED11.sp3Chris Wilson
Highlights of that distribution include xorg-xserver-1.6.5, kernel 3.0.76 and gcc-4.3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-17intel: Make the option to control VSync and PageFlip explictChris Wilson
Too often our implementation of vsync or pageflip is buggy, or for some other reason it is desired by the user to disable those code paths. Make it possible once again by restoring the Options for the user to control. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-07Revert "sna: Add XMir support"Chris Wilson
This reverts commit 42d94356f65972eb7fb8991234a4e9388c4c2031. Ordered-by: The Management.
2013-09-06sna: Listen to ACPI events for power state notificationsChris Wilson
When on-battery, we would prefer to use more power efficient operations. For example, the BCS is far more economical to more data around with, but it doesn't have quite the same throughput as the hungry RCS. (Not that there is any reason why, the BCS is supposed to run at full memory speed, unfortunately that is main memory speed and not the caches...) Note: that X already listens to acpid for video switch notifications, it would be useful if we could extend that interface to emit power notifications as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-09-04sna: Add XMir supportChris Wilson
With lots of updates by Christopher James Halse Rogers as he updated the XMir API - but now supposedly frozen! "<RAOF> ickle: I think the xmir api should be pretty much stable now, barring people coming up with more awesome ways of doing things." Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25sna: Make sure we assert our Master status before copying the fbconChris Wilson
Being able to read back the fbcon handle as a non-Master process is an information leak that will be fixed. We should already be Master by this point by virtue of the sequence in which we obtain the device fd. However, to be pedagogically correct, call drmSetMaster() before the fbcon copy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-25sna: Make SetScreenPixmap do as it saysChris Wilson
Make sna_set_screen_pixmap() a little more complete and remove the assertion that the caller manages sna->front. This should make the function easier to reuse. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-24sna: Fix reversed logic and loss of trust in the hostChris Wilson
The test for a hosted Xserver was backwards in commit 306c72cffbd8cd88e93871ee21fa85101198c1ac Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sat Aug 24 14:02:23 2013 +0100 sna: Trust the preferred-depth returned by the host so we failed to load the driver instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>