aboutsummaryrefslogtreecommitdiff
path: root/drmcomposition.h
AgeCommit message (Collapse)Author
2015-10-01drm_hwcomposer: Process modesets via compositorSean Paul
This patch queues modeset in the compositor for application on the next frame. This allows us to perform the modeset atomically with the first frame that comes in after the mode is changed. Change-Id: I6bb9edd17bbdd6dbee5c0474f2e43599781cc7a7 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-09-25drm_hwcomposer: implement the safe handling of layersZach Reizner
This is a sweeping change to discard our usage of struct hwc_layer_t outside hwcomposer.cpp. That was a dangerous struct that was a source of many of our errors. Replacing it with safer RAII-style classes reduces the amount and complexity of our code. Change-Id: I580cafdf89bd1e7e6583f3073858b8e78e6018ba
2015-09-21drm_hwcomposer: Plumb frame number through display compositionSean Paul
Having frame number in the composition is very useful for debugging transient issues, plumb it through the drm compositor stack. Change-Id: Ibc7555c89bea79c580b3201b11db4ced6360efb9 Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-08-13drm_hwcomposer: enhance stability using various wrapper classesZach Reizner
This commit contains a lot of churn because it changes code to use automatic resource lifetimes as much as possible. As more things get changed, this is essential to maintaining stability. In addition, this change changes how layers are passed through the compositor API. Before each layer was passed down one at a time. Now they are passed in all at once. This is simpler for the implementation because it makes errors more atomic and makes decisions easier for the compositors. Change-Id: Ic3e6b5d0089fb1631ea256adcce9910ed8f38366
2015-08-07Revert "Revert "drm_hwcomposer: remove compositor interface""Zach Reizner
This reverts commit 1c5e55680d9165d8f9bb2bc6e2c4261574b5d41d.
2015-07-30Revert "drm_hwcomposer: remove compositor interface"Puneet Kumar
This reverts commit 7912438911de042dc035cf1ea39daaf4e56bf9f3. For now until we can get back to a stable SF/compositor. Change-Id: I2ba7cab4f1cccfe44b3d35fb18c7784125e88fd6
2015-07-22drm_hwcomposer: remove compositor interfaceZach Reizner
The compositor interface had only one implementation and one user. The compositor interface also needs to change to accomodate some changes for fences to work optimally. Change-Id: I02d21b0a0e86fa21b3c5f4ad84ff571611643994
2015-07-13drm_hwcomposer: Disable unused planesSean Paul
Right before queuing up a composition, go through the list of unused planes and add disable markers such that they don't remain active when the new frame is posted. BUG=chrome-os-parter:42311 TEST=Tested on smaug, turned on/off bunch of times, no dup icons Change-Id: Ic2e5e210873efb6dc41fd43682fe00db33c2a28e Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-07-13drm_hwcomposer: Use vector for overlay planesSean Paul
For two reasons: 1- Because we don't need to use deque 2- Because we'll need to erase from the middle in the future, and deque makes that difficult while iterating BUG=chrome-os-parter:42311 TEST=Tested on smaug, turned on/off bunch of times, no dup icons Change-Id: I306bdea15d7165f63afeb3b1e06774e2e9a1785f Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-07-13drm_hwcomposer: Process DPMS requests through compositorSean Paul
This patch changes the behavior of DPMS in hwcomposer from applying asynchronously/immediately, to queuing in the compositor and being processed in order. This is desirable for a couple of reasons: 1- It ensures all frames set before set_power_mode are shown on the screen before it turns off 2- We make sure we don't rmfb a framebuffer that is currently applied to a disabled crtc. The second reason above can cause the display to turn back off once it's on since the fb will dereference to zero in the kernel and it will disable the pipe without notifying us. Change-Id: I2aab9ee0353b12fecced46766ed2dbb64f0aef4b Signed-off-by: Sean Paul <seanpaul@chromium.org>
2015-07-13drm_hwcomposer: Split the drm compositor into per-display threadsSean Paul
This patch splits out the current single drm compositor with per-display compositors, each with their own thread. The per-display compositors are hidden behind a singleton drm compositor. This allows us to maintain a whole-world view of all displays involved in a frame. This becomes useful if we start switching up crtcs/encoders for the displays. This also allows us to issue one DrmComposition when the frame is being assembled. The single DrmComposition handles the plane allocation (since they might switch between displays), and contains per-display compositions which are used to store the layer->plane/crtc information for each frame. The display compositors use the per-display compositions to display the frame on their output. Each display compositor receives a shared pointer to the frame's DrmComposition on QueueComposition. As a result, both the composition, and the per-display compositions, live for as long as any one display is still using it. While this is sub-optimal (since a display might never update again), this is probably fine for now. Finally, splitting things up per-display will allow us to inject non-compositing jobs into the composite queue. An example would be turning the display off, or setting the mode. This ensures that all frames in the composite queue are displayed before the mode changes or the display is disabled. Signed-off-by: Sean Paul <seanpaul@chromium.org> Change-Id: I8a233ea64710b238f70acbcde1f6d771e297b069
2015-06-04drm_hwcomposer: Use hw planes + drm atomic interfaceSean Paul
Replace the basic, single overlay, modeset/flip implementation with a new Compositor instantiation for drm. The new compositor uses the drm atomic interface to composite layers to multiple hardware planes. This change also introduces an importer argument in Compositor::CreateComposition. By specifying the importer, Compositor instances are responsible for cleaning up buffer objects submitted via Composition::AddLayer. Change-Id: Ic292829cd93475d754294b00428de132301092b2 Signed-off-by: Sean Paul <seanpaul@chromium.org>