summaryrefslogtreecommitdiffstats
path: root/services/surfaceflinger/DisplayHardware
Commit message (Collapse)AuthorAgeFilesLines
...
| * | workaround: don't reset compositionType to HWC_FRAMEBUFFER [DO NOT MERGE]Mathias Agopian2012-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This workaround a HWC HAL issue in Nexus 7, which causes videos and live wallpapers to animate slowly. Bug: 7563862 Change-Id: I16ad85317e3e7f47f005e7397357c14186b0a13d
* | | Reduce C++11 warningsAndy McFadden2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | A few typecasts to fix "narrowing conversion" complaints. Change-Id: Ib2118079a2ca33959c748d03d8c6f1722d62e8fe
* | | workaround: don't reset compositionType to HWC_FRAMEBUFFERMathias Agopian2013-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This workaround a HWC HAL issue in Nexus 7, which causes videos and live wallpapers to animate slowly. Bug: 7563862 Change-Id: I87803aaad9751b1fd8392b9732304d4bccec659a
* | | Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
* | | SurfaceFlinger: Move GraphicBufferAlloc to libguiJamie Gennis2012-12-113-98/+1
| | | | | | | | | | | | | | | | | | This change moves the GraphicBufferAlloc class from SurfaceFlinger to libgui. Change-Id: Idf31d2004efa2651b60590733f73c4a7b831e8a9
* | | Merge "SurfaceFlinger: track the HWC retire fences"Jamie Gennis2012-11-192-2/+16
|\ \ \ | |/ / |/| |
| * | SurfaceFlinger: track the HWC retire fencesJamie Gennis2012-11-192-2/+16
| |/ | | | | | | | | | | | | | | | | This change adds functionality to the HWComposer class to track the retire fences returned by each hwc set call. It adds the HWComposer::getDisplayFence method to allow other parts of SurfaceFlinger to get a fence that will signal when the most recent flip takes effect on a display. Change-Id: I676e0f98440fc58ed70908aa1a1e2ee3e7bf9eb2
* | Reset compositionType to HWC_FRAMEBUFFER before calling prepare()Mathias Agopian2012-11-142-1/+4
|/ | | | | | Honor the documentation. this broke in JB-MR1. Change-Id: I841a93b409fc940374bc748c4e143d82a192669c
* Fix emulator vsyncAndy McFadden2012-10-191-5/+12
| | | | | | | | | | | | | | The code that reserves display IDs was only run when a hardware composer was present. The eventControl() function, which handles enabling of vsync, was ignoring the request because the primary display didn't appear in its set of allocated IDs. This moves reservation of IDs for built-in displays outside the HWC-only block. Also, added a couple of warnings in eventControl(). Bug 7376568 Change-Id: I185ccdf817a25499b5c2668f8f6d594afb8c1568
* SurfaceFlinger: make the num FBs a board configJamie Gennis2012-10-122-3/+5
| | | | | Bug: 7283132 Change-Id: I38116f39fc18212f2daab94bbfc3daaf89439fc4
* Fix HDMI unblank behaviorAndy McFadden2012-10-101-0/+1
| | | | | | | | | | | | | | | | | | | Two issues: (1) We were announcing the hotplug event before we were ready to handle blank/unblank events, so we were losing the initial unblank that power manager sends us when HDMI is first plugged in. This left the display blank until you toggled the device power off/on. (2) We were retaining fbTargetHandle for HDMI after the display was disconnected. The value didn't get updated when HDMI was reconnected because the display was blank, so we didn't go through that code path. So, when HDMI was re-connected, we passed stale data into the HWC. Bug 7323938 Change-Id: I2335d24fd7b0f00bb23fc63aa7bcf44cb8857c73
* fix dumpsys Layer name when using multiple displaysMathias Agopian2012-10-082-4/+6
| | | | | Bug: 7288401 Change-Id: I14beeef58fac5270cef3b611e18c163060efe6c3
* Tone down a fatal assertAndy McFadden2012-10-041-2/+5
| | | | | | | | | The new disconnectDisplay function doesn't handle virtual displays, but it may be called for them. Return without doing anything. Bug 7281786 Change-Id: I62607f2ae6073fa66b393f55932604aeb8e03566
* make sure we don't call into the HWC HAL when not neededMathias Agopian2012-10-042-19/+42
| | | | | | | | | when enabling/disabling vsync we now make sure to not call into the HAL if the state wouldn't change. Bug: 7274951 Change-Id: Ie24a6d68888a51b577acf9c2a973d85437cbacaf
* Fix crashes after HDMI disconnectAndy McFadden2012-10-042-0/+19
| | | | | | | | | | | | | | | | | The display was being removed from SurfaceFlinger's list before we had a chance to reset HWComposer's layer list, so we were passing stale data into the hardware composer (which has its own per-display data). This resulted in "invalid gralloc handle" complaints. We now clear the layer list immediately after removing the display. The display was being removed while its EGLSurface was still "current", resulting in "cancelBuffer: BufferQueue has been abandoned" complaints. We now call makeCurrent on the primary display before removing the external display. Bug 7274254 Change-Id: Ia59e3a61d7ec46488b96bf93ec5e4ed3488b70e4
* Add Fence::waitForever which logs a warning timeout, and use itJesse Hall2012-10-021-1/+1
| | | | | Bug: 7217641 Change-Id: If0c1a613ead307c4045a47824174bf40c72bc7d7
* SurfaceFlinger: reset the FB_TGT acquire fenceJamie Gennis2012-10-011-0/+1
| | | | | | | | | | This change makes SurfaceFlinger reset the acquire fence fd to -1 after each call to HWComposer::commit. The HWComposer implementation is resonsible for closing the fd, so SurfaceFlinger should make sure not to pass it to HWC multiple times. Change-Id: I79554d9f6d6ef2b77d632d40251516c1f5b16ddb Bug: 7258954
* Pass display arg to blank/unblankAndy McFadden2012-09-282-7/+9
| | | | | | | | This allows us to blank and unblank displays other than the built-in display (e.g. HDMI). Bug: 7240511 Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
* add/remove displays properly on hotplug eventsMathias Agopian2012-09-211-1/+6
| | | | | Bug: 7191563 Change-Id: I8f0fbf3b29658c9479443141798e6f288a1f2d52
* fix an issue where hotplug events were not dispatchedMathias Agopian2012-09-211-3/+12
| | | | Change-Id: I527eec77f338cd6f1a9021aa4c9d384dbddd6d2a
* fix a typo preventing pre hwc-1.1 devices from bootingMathias Agopian2012-09-201-0/+1
| | | | Change-Id: Icf01254689633d04967872749ac947a671e47ed8
* we now correctly set-up connected screens during bootMathias Agopian2012-09-204-15/+26
| | | | Change-Id: Ie8b1a3b97ad1821cc970e43abe96c8cec7135b66
* We now report hotplug events to the frameworkMathias Agopian2012-09-202-1/+2
| | | | Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
* one more step toward HDMI supportMathias Agopian2012-09-202-8/+13
| | | | | | | | | | | | getDisplayInfo() now returns proper information for HWC managed displays. hotplug is sitll not supported; so this is not fully correct as the information returned will be bogus if the HDMI screen is not plugged in. Bug: 7191563 Change-Id: If55d8e829fae0443571548155007f486cdf9bc9f
* GraphicBufferAlloc class was declared twiceMathias Agopian2012-09-203-12/+98
| | | | | | | this was confusing because the one in FramebufferSurface wasn't in fact being used Change-Id: Ied45aec20d804cfbe52440f9b2f2852a85c757cf
* suppress superfluous logMathias Agopian2012-09-181-2/+0
| | | | Change-Id: I838f2de4cf99e885833c4f42e2a69d6e3bb8eea5
* Check that HWC exists before trying to use itJesse Hall2012-09-181-3/+3
| | | | | Bug: 7185810 Change-Id: I1271d6ba397f3abf0ef166b8d03b9b26b72e28d7
* add support hwc 1.1Mathias Agopian2012-09-174-63/+221
| | | | | | Bug: 7124069 Change-Id: I53d705105c4ad8954d3f50ee4f4c8b7ec936b871
* refactor things a bitMathias Agopian2012-09-172-11/+27
| | | | | | | | - decouple GL and main display initialization - ensure that each "supported" display has its own FramebufferSurface - onScreenAcquired/Released now takes a display Change-Id: If34a05f3dea40f6c79db77f4dde283a2580daac4
* Minor tweaksAndy McFadden2012-09-131-2/+2
| | | | | | | A couple of minor cleanups I stumbled over while looking at other things. Change-Id: I385ecfe1afefd577afbc59d7ef1d98d868073651
* Initialize new HWC 1.2 fieldsJesse Hall2012-09-123-24/+34
| | | | | | Also rename resolution* to width/height. Change-Id: Ia5f0c50d3f0a349160f314a3257c3b985e13ef1d
* Fix emulatorAndy McFadden2012-09-121-3/+6
| | | | | | Emulator has no HWC. Change-Id: I7810b27034f6772823142e5bf877681db1c8ee49
* Reduce failure uncertaintyAndy McFadden2012-09-111-0/+6
| | | | | | | | | This adds a trivial workaround for a one-shot boot time crash, plus an explicit check and abort for a failure condition that currently presents as a less obvious failure. Bug: 7145521, 7147557 Change-Id: I548f6a9caa9f0bd5710aaecea0e1c6c7c8f2f281
* Reshuffle FramebufferSurfaceAndy McFadden2012-09-114-143/+186
| | | | | | | | | | FramebufferSurface no longer speaks directly to the FB HAL. Now everything goes through HWComposer (which may or may not be connected to a hardware composer). Added display index arg to some query methods. Change-Id: Id3e157d2d4e3555d33afbb703e518b6e92e2d6d5
* libgui: move fence handling into ConsumerBaseJamie Gennis2012-09-061-1/+1
| | | | | | | | This change moves some common fence handling code into the base class for BufferQueue consumer classes. It also makes the ConsumerBase class initialize a buffer slot's fence with the acquire fence every time a buffer is acquired. Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
* fix a problem where all hwc layers would have the SKIP flags setMathias Agopian2012-09-051-0/+1
| | | | | | | | | the problem was that LayerBase::setPerFrameData() was always setting this flag. in fact there was no reason to do this at that point since the layer is initialized to a default state in setGeometry(). Bug: 7111259 Change-Id: Ib37b0dd7391a6163070e9aca025512159c1705f9
* Always reset layer acquireFenceFd after commitJesse Hall2012-09-051-0/+2
| | | | | | | | | | If SurfaceFlinger needs to refresh the screen but the dirty region is empty, it won't set the layer acquire fences, and stale file descriptors will be passed to HWC commit(). Now we make sure to clear the stale file descriptors for each layer right after commit(). Bug: 7078301 Change-Id: I6953ff91fc5488f105b30b07306f9c45a4c3f780
* the visible region sent to HWC was garbageMathias Agopian2012-08-312-3/+17
| | | | | | | | | | | | | | | we used to have a visibleRegion object per layer, but now it's per screen; so at somepoint the code got changed to calculate the per-screen visible region on the stack and that's what got passed to HWC. we're now setting the visibleRegionScreen at each frame and freeing at after the HWC set() call. We use the underlaying SharedBuffer so that in most cases we don't have to allocate, free or copy memory around. Bug: 7089478 Change-Id: I24fa556c76613a225d9fe7a6c6b727bb476144d8
* Merge "HWC 1.1: hook up hotplug event, use new display config queries" into ↵Jesse Hall2012-08-312-16/+110
|\ | | | | | | jb-mr1-dev
| * HWC 1.1: hook up hotplug event, use new display config queriesJesse Hall2012-08-312-16/+110
| | | | | | | | Change-Id: I2fd359e5fc7e1948072c6bc6b6fe47ea5e8025c1
* | BufferQueue: use max acquired buffer countJamie Gennis2012-08-301-2/+1
| | | | | | | | | | | | | | | | | | This change makes BufferQueue derive the min undequeued buffer count from a max acquired buffer count that is set by the consumer. This value may be set at any time that a producer is not connected to the BufferQueue rather than at BufferQueue construction time. Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
* | Merge "BufferQueue: clean up buffer counting" into jb-mr1-devJamie Gennis2012-08-301-1/+1
|\ \ | |/ |/|
| * BufferQueue: clean up buffer countingJamie Gennis2012-08-291-1/+1
| | | | | | | | | | | | | | | | This change is a clean up of some of the handling of the maximum number of buffers that are allowed at once. It mostly renames a few member variables and methods, but it includes a couple small refactorings. Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
* | Handle new device api version encodingJesse Hall2012-08-291-9/+39
|/ | | | Change-Id: I3d36058bd5d31c23b3cc4a7eb5aa033b6f3c1955
* Added display initialization methodAndy McFadden2012-08-241-1/+1
| | | | | | | | | | The primary display device was being configured to "blank" by default, which prevented the boot animation from appearing (unless you got lucky with the hardware composer state). Bug 6975688 Change-Id: I0fa52e9e719c6e997c5725a7baf15d9718461b78
* teach HWC about multiple displaysMathias Agopian2012-08-232-127/+135
| | | | Change-Id: I5e72a83d419a729835cb0e1ec45557b4d3fb56b1
* remove support for HWC < 1.0Mathias Agopian2012-08-232-287/+60
| | | | Change-Id: If7e676a6e3524afeb9af3875125d2131d95db38b
* HWComposer now has its own concept of display IDsMathias Agopian2012-08-232-78/+123
| | | | | | | | | | | | HWComposer can now create IDs representing a display it can deal with. IDs MAIN and HDMI are reserved. SurfaceFlinger associate HWComposer IDs with a DisplayDevice and uses that when it talks to HWComposer. A DisplayDevice doesn't have to have a HWComposer ID, in that case it just can't use h/w composer composition. Change-Id: Iec3d7ac92e0c22bf975052ae2847402f58bade71
* Update for cleanups in hwc interfaceJesse Hall2012-08-222-18/+35
| | | | Change-Id: I363fd8b085167a1af6c14b68012bda5c62bfe59f
* Pass the correct number of displays based on HWC versionJesse Hall2012-08-222-8/+10
| | | | Change-Id: I27372f5d3102ad56f6d67722d631ae18d37f8330