summaryrefslogtreecommitdiffstats
path: root/hwc
Commit message (Collapse)AuthorAgeFilesLines
* hwc: Prevent precision loss in rotation transformMykola Ostrovskyy2012-11-281-1/+1
| | | | | | | Decimal places were striped when applying rotation. Change-Id: I39da24361481c447c3f6b8a829b8cfcfbe4d7ece Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
* hwc: Support odd-sized dockable layersMykola Ostrovskyy2012-11-281-2/+2
| | | | | | | | | | | | During transition effects Android framework may rescale dockable layers, and resulting window size may have an odd width or height. If the layer is significantly upscaled on external display, the rounding error of integer division will be blown up and may shift the adjusted overlay window by few pixels. Change-Id: Ib4034f4a34bb81e02fbcdb3c709c91dfb853bfaa Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
* hwc: Use single instance of countsMykola Ostrovskyy2012-11-281-18/+24
| | | | | | | | | | | After we needed to have access to layer statistics in set(), a copy of counts was added to hwc_dev. The copies are synced at the end of gather_layer_statistics() and if some function will update counts after that we are going to have two copies that are out of sync. Change-Id: I537f645bb54e275221ff9bd8fad632eb4a1169b1 Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
* hwc: Reorganize includes and definesMykola Ostrovskyy2012-11-281-20/+15
| | | | | | | | | | | Includes are grouped in the following categories: 1. libc 2. Android framework 3. Kernel 4. Local Change-Id: I29bc575bba5c2f5d3a1c56a33cce203e5d3a99a0 Signed-off-by: Mykola Ostrovskyy <mykola@ti.com>
* hwc: Improve consistency of referenced typesMykola Ostrovskyy2012-11-281-212/+197
| | | | | | | | | | | | | | | | | | This is a case of picking one convention rather than another, the file had a mix of Linux kernel coding style, C99 and 'misc' choices. The choice here is to go with modern ISO C. Use ISO C stdint.h for exact width integer types, similarly use stdbool.h for vars used as booleans. Use typedef for HWC defined structures. The convention is struct foo is type foo_t. This wins because more code was using this convention. Change-Id: I432f5ae8700efb3bbd6f1bcce85a0c19c0b309e6 Signed-off-by: Mykola Ostrovskyy <mykola@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: Do not swap red and blue channels if we can blit allGustavo Diaz Prado2012-11-281-0/+2
| | | | | | | | | | | | | | | | | | There is a special case when the composition can be handled by the DSS if all layers have the HAL_PIXEL_FORMAT_RGBA_8888 by swapping the red and blue channels in the manager. If we are using BLTPOLICY_ALL and the blitter can handle all layers we don't need to swap the red and blue channels. This was leading to see incorrect colors when we can blit all and all layers have the HAL_PIXEL_FORMAT_RGBA_8888 format. The issue can be fixed by avoiding the swap when using the blitter and when BLTPOLICY_ALL is used. This issue doesn't happen with BLTPOLICY_DEFAULT. Change-Id: Id426b239b7cc99131aa426a7f3300b167dd135e3 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Fix debug.hwc.nv12_onlyTony Lofthouse2012-11-281-1/+3
| | | | | | | | | | This flag was only working if hwc had decided to render something with SGX. Maybe this flag should be replaced. It is an artifact from when there was no gpu buffer synchronization. The only interest in this is to do performance comparisons between DSS, SGX and GC320. Change-Id: Ic3114b82409b088869cd8e4932577c67c56e4ef3 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: rgz: Optimize batchflagsGustavo Diaz Prado2012-11-281-8/+61
| | | | | | | | | Batch flags are now set as needed instead of setting all of them on every blit. This fixes the multisource blend not being triggered in the GC driver. Change-Id: I28b80d8eb58b044464f39669abb3884b98a30336 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Compose with the blitter on hwc idle timeout when possibleGustavo Diaz Prado2012-11-281-2/+1
| | | | | | | | | | | | | Instead of using the GPU to compose all layers when the hwc idle timeout is reached, try first to blit everything if possible, otherwise fall back to use the GPU. This should save power on big resolution displays and allow the GC320 to compose video buffers with more visual quality than the GPU. Change-Id: Ib2a020b700ce5131cb2711e2abff197831a990eb Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Avoid blits when cloning to TVGustavo Diaz Prado2012-11-282-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The workaround to avoid blits when playing a video was not allowing the blitter to be used when using only the LCD (single display). It was found by the display team the stuttering issue with video playback is not GC320 but rather a bug in dsscomp to manage correctly the synchronization when using multiple displays. This patch revisits the workaround by not allowing to blit when multiple displays are used but allowing all blits with a single display use case. This allows not only to prevent the stuttering when playing a video (with the TV connected), it also allows any application that refreshes the screen constantly to not stutter (like a 3D game) by using the GPU to compose instead of the blitter. The reason why the GPU performs better with the TV connected is the compositor gets blocked on the availability of the flip chain buffers, thus preventing very short periods of time between posts caused by the VSYNC drifting of both displays not being handled correctly by dsscomp. With this change a more consistent framerate is achieved when cloning to TV. Change-Id: Iedc93c3528095fcf24f4a34b8ac13744ece2b576 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Allow regionizer to process geometry changesGustavo Diaz Prado2012-11-281-7/+9
| | | | | | | | | | Avoid resetting the regionizer state when a geometry change happens. This allows the regionizer to process such event. If the regionizer is not going to be used for a frame (i.e. pure DSS composition is used) that breaks its state and must be reset. Change-Id: Ib4e16b280f8fdb4f88f0ae28e9c7ae58db6b5c33 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Fix hang in sorting algorithmGustavo Diaz Prado2012-11-281-20/+10
| | | | | | | | | This is a workaround for a issue that is happening with the regionizer geometry change handling patch. The bubble sort algorithm is hanging, avoiding the do-while solves the problem for now. Change-Id: Iebdc7a516a93dfe85ba00f9e2e748e8323347cb4 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Handle geometry changes efficientlyGustavo Diaz Prado2012-11-283-86/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow the regionizer to analyze the previous, current and target framebuffer states to draw only the needed areas of the screen. It is required that SurfaceFlinger supports the HWC_EXTENDED_API and the HWC_EXTENDED_OP_LAYERDATA operation to enable this feature. With this change the following scenarios are handled efficiently: A) When a layer moves, only draw the damaged area between the current and the target framebuffer state instead of redrawing the whole screen B) When a layer appears, only draw the area of the new layer, not the whole screen C) When a layer disappears, only draw the area where the layer used to be instead of the whole screen This change is also compatible with the dirty count per layer, that is, when a layer in the same position and has the same content for multiple frames. Change-Id: I281567440564fd4e9d5865a392676d18653e9ecd Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Store a copy of the hwc layer data instead of pointerGustavo Diaz Prado2012-11-282-24/+30
| | | | | | | | | | | | | Regionizer layers now store hwc layer data copies instead of just pointers. This allows the framebuffer state to have additional information to compare itself to another state. Since the hwc layer pointer was used to know if a regionizer layer was the background, with this change, now a unique buffer index was created to distinguish it. Change-Id: I897ee7d8e7962b7dafed7bce4db7a7e8a45ab08f Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Introduce concept of framebuffer stateGustavo Diaz Prado2012-11-282-34/+48
| | | | | | | | | | | | | | | | | | A framebuffer state consists of a list of regionizer layers, each one has stored a hwc layer, buffer index and a dirty counter. This represents what the blitter has drawn in such framebuffer. For now only the current framebuffer state is stored. This change allows to introduce the geometry change handling in a easier way since multiple framebuffer states are need for this purpose. Additionally this patch addresses an inconsistency of using signed and unsigned integers while accessing rgz_layerno field in the rgz structure leading to warning messages that are difficult to deal with without making explicit type casts. Change-Id: I8bb5410b263bb734c52d445b4129a5dbea375225 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Rotate destination instead if the source is NV12Gustavo Diaz Prado2012-11-281-0/+18
| | | | | | | | | GC driver doesn't support NV12 rotated buffers so instead of applying a rotation to an NV12 buffer leave it as 0 degree and normalize the destination rotation accordingly. Change-Id: I3c0c42e6c2d731dcb83218e9890b78714679f587 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Allow destination rotationGustavo Diaz Prado2012-11-281-95/+235
| | | | | | | | | Add the ability to rotate the destination parameters. Previously only the sources where being rotated, with these changes now is possible to rotate the destination instead of the sources. Change-Id: I105b8603c34dfda100224456bbf3799c970ced00 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Fix using an invalid array index when there are no blitsGustavo Diaz Prado2012-11-281-3/+5
| | | | | | | | | When the regionizer decides there are no blits as a result of a given hwc geometry a -1 array index was being used to set the last blit async, this needs to be avoided if there are no blits. Change-Id: I3ce2f60a46096559c2ba308cf1d617a79731751e Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Fix for losing first blit buffer handleGustavo Diaz Prado2012-11-281-1/+1
| | | | | | | | | | | | | | | There are certain situations where the regionizer decides it can handle all layers passed to it and no blits are generated as a result. This is caused by receiving more than two times the same geometry in the prepare, which makes the regionizer to not generate dirty regions (hence no blits). When this situation happens we are losing the first blit handle by assigning it to NULL incorrectly. This patch fixes the issue by checking if the sgx will be used for composition instead of checking if we have no blits. Change-Id: I68e87c386c98a8ca5047e1723c6c43db7c143447 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Fix incorrect src rectangle calculation for scaled layersGustavo Diaz Prado2012-11-281-1/+4
| | | | | | | | | | | | | | When scaling a layer, the blit is programmed in a way where the src rectangle uses the whole cropping rectangle coordinates and dimensions. However if the layer has a transform, the width and the height need to be swapped not only in the geometry but also in the src rectangle to match the new dimensions. This patch adds the missing width and height swapping for the src rectangle if the transformation is 90 or 270 degrees. Change-Id: Ia9d822b6698210573fff662f2fcb129dfc048bf7 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Allow scaling and rotation on the same blitGustavo Diaz Prado2012-11-281-4/+0
| | | | | | | | Allow blitting layers that have scaling and a transformation now that the GC driver supports it. Change-Id: Iee5a34dc888656c47b3b514597b75868ccdc008a Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Introduce scaling supportGustavo Diaz Prado2012-11-281-19/+96
| | | | | | | | | | | | | | | | Adds scaling support to the regionizer code. Limitations: + When blending two layers with scaling two blits are issued instead of one. This is due to a Bltsville API limitation which prevents specifying two different scale modes for each source. + Support for scaling and rotation on the same blit is not possible yet due to a GC driver bug. Change-Id: Ie53157e527dacf639e42a72e371ef962f888131c Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Refactor how the blit parameters are setGustavo Diaz Prado2012-11-281-327/+206
| | | | | | | | | This patch basically refactors the way the blit parameters are set per subregion. The intention is to make the code ready to introduce the scaling support easier and reduce greatly redundant code as well Change-Id: I2b32056bf2fec1b636fda1c8df9964d90d51192c Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Check for >1 overlay used in idle timeoutTony Lofthouse2012-11-281-5/+1
| | | | | | | | | | | | | | | | It was observed during ADTF runs than we get repeated redraws when there are no layers to render. This is because the check in prepare() will reset force_sgx to 0 when there are 1 or less layers. The side effect of this is to cause a redraw every idle period. Instead of doing this, account for the number of overlays used for the primary display before calling the invalidate() api. This logic should be satisfactory most current usecases. Change-Id: I4b9cb44ebe250a6a46a6da27a1db94e88d6f26f3 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: Fix incorrect tiler memory available checkGustavo Diaz Prado2012-11-281-1/+1
| | | | | | | | | | | | | When the buffers composed with DSS pipes use exactly the tiler1d memory available (like 4 fullscreen layers on Tablet 2), the prepare operation fails to assign a DSS pipe to the last buffer (even if it was possible) making it to be rendered by the GPU but without a pipe to show it. This patch fixes the incorrect memory check that caused this problem. Change-Id: Ibb147a468aa2e1622600a56f581013dc1e517777 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Signed-off-by: Jonas Larsson <jonas.larsson@ti.com>
* hwc: Stop queuing compositions to disabled default displayDandawate Saket2012-11-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | When HDMI is the default screen it may not be attached even though the UI is active. UI compositions will keep coming but the DSS manager will have problems if being programmed with content incompatible with the intermediate display mode. The last_mode variable is reset to "0" when hdmi panel is not present. The on_tv variable indicates hdmi is default panel. So if both are set then we need to make the overlay number in composition to be "0". OMAPLFB will skip posting the composition to dss driver when overlay as "0". There are still possibly compositions in the DSSCOMP queue or in flight from PVR services to OMAPLFB so this behavior doesn't cover all cases - so this should be considered a work-around. kernel dependency: http://review.omapzoom.org/#/c/26982/ Change-Id: Idb6864aa57ebf6c403b91ea5b0e0865467008934 Signed-off-by: Dandawate Saket <dsaket@ti.com> Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com>
* hwc: rgz: Workaround, do not blit if there is a video layerGustavo Diaz Prado2012-11-281-0/+9
| | | | | | | | | This is a workaround for a performance degradation found while a video is playing and the GC320 is used at the same time. Avoid blitting if there is a NV12 layer in the hwc layer list. Change-Id: I12e789b9dd95e8b0d435aac1ae67ff65d4511396 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: HACK: wuxga panels will generate unscalable layersTony Lofthouse2012-11-281-0/+4
| | | | | | | | | | | | | | | | During the transition from the recents panel to a selected application during the transition a layer which requires a scale down from 1920x1200 to 594x361 is generated. This satisfies the normal limits but with buffers of this size and also blending another 1920x1200 framebuffer. A VID1 underflow occurs. This work-around avoids scaling when layers are wider than 720p and are 4 byte RGB. These conditions have been reproduced in isolation with ADTF. Change-Id: If8fbc8f639abb89a0d736a3beabd2c12312ac3ac Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: Add a bits per pixel function for RGB color spaceTony Lofthouse2012-11-281-0/+15
| | | | | Change-Id: I12d286ffe12c18bc9159a9bd1df65db43b63ac05 Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: Add a handle to the can_scale function for future useTony Lofthouse2012-11-281-4/+4
| | | | | | | | | A scaling decision may need to account for the size of a pixel as dss based scaling capability has a relationship with memory bandwidth Change-Id: Idd68e11317fb0bb9e5d19f0a0d5818744968a5ab Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: add S3D supportJagadeesh Pakaravoor2012-11-282-3/+264
| | | | | | | | | | | | | | | | | | | | | | Add support to handle s3d layer if an external S3D TV is plugged in. For now if there's no s3d external tv, the s3d layer is skipped (to be handled by SF). Consolidated the ics branch S3D patches into a feature commit for JB. ff833da Fix flickering during S3D layer transitions 8e54c33 Fix typo in index when cloning s3d layer to ext TV. 37c16f2 [HWC] Add S3D support to hwcomposer hal 4f714c3 PATCH[3/3] OMAP_ENHANCEMENT_S3D cleanup. This patch depends on http://review.omapzoom.org/#/c/24872 Change-Id: I10d743ab3eb4f204512faccabc084aa26b1dd458 Signed-off-by: Jagadeesh Pakaravoor <j-pakaravoor@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com> Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
* Fix electron beam crashJon Pry2012-11-281-1/+1
| | | | | | | | | | | | | | | | | Under certain circumstances the ICS SurfaceFlinger attempts to disable the hwc module by calling prepare with the list set to NULL. This code path is specifically used by the Electron Beam screen off animation. Since blit_reset() is just checking for a geometry change, this patch handles the list pointer null case. Reproducible with: service call SurfaceFlinger 8 i32 1 (Thanks Jon & Michael!) Change-Id: I27114b173446729511115bc73e780e7fdca8722b Signed-off-by: Tony Lofthouse <tony.lofthouse@ti.com>
* hwc: rgz: Remove workaround, Avoid parsing region data if it's not neededGustavo Diaz Prado2012-11-281-14/+17
| | | | | | | | | | | | | | | This patch removes the workaround introduced by the patch: 2cb90b8 hwc: rgz: Workaround for hdmi hotplug crash with 2D blitter enabled Basically when the number of layers differ from the ones handled in the previous frame, we don't trust anymore the region data and we need to calculate it again. If the layers are the same in number and there has not been a geometry change the region data can be reused for the same frame Change-Id: I4421ca5c7bc1b556cd54de888865ed83e957b919 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Fix invalid dirty region state when HDMI is connectedGustavo Diaz Prado2012-11-281-21/+32
| | | | | | | | | | | | | | | It is possible when the HDMI cable is plugged in a geometry change doesn't happen, hence the layers handled by the DSS and the regionizer differ, since the dirty region counters are only reset when a geometry change happens, this causes them to enter into an invalid state leading to visual artifacts. This fix compares if at any given time, the layers handled in the regionizer differ in number from the previous frame, if that happens, the dirty region counters are reset for all the layers. Change-Id: If756b526cf52d66612729d7367c26d131c8a1ac0 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: added support for ext display back buffer allocationSunita Nadampalli2012-11-282-3/+90
| | | | | | | | | | | | | | | | | | | When the ext display transform is different from the FB, the mirroring/cloning is achived with the help of back-buffers, which are allocated in TILER2D space to get the required transformation. This patch adds support in HWC to detect the ext display transform and allocate back buffers from TILER2D space and program dsscomp accordingly. Signed-off-by: Sunita Nadampalli <sunitan@ti.com> hwc: make file fix for local include path the local include path for ion is changed from base level to local. this is required to allow compiling at hwc level. Change-Id: Ie1e9e6688652fdc8aa496dfc367d385aca362a27 Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
* hwc: use VSYNC event from HDMIMuralidhar Dixit2012-11-281-6/+0
| | | | | | | | use VSYNC event from HDMI instead of fake VSYNC support. VSYNC for HDMI is now supported in kernel. Change-Id: Ib51e28d4682249590977efac387a03822942c029 Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com>
* hwc: rgz: Fix for pixel wide regions returning no opsTony Lofthouse2012-11-281-2/+3
| | | | | | | | | | | | | | A region that is pixel wide is in the top-left corner of the screen (0,0,1,1) makes the empty_rect function to return true, which is wrong since the region is not an empty rectangle. Since this function is being used in the moment the blits are generated, the regionizer thinks the region is empty with no intersections leading to error messages. Change-Id: I5f838008a39dcd469e325cb3fdd834408aa91291 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: publicly define omap specific usage flagsTony Lofthouse2012-11-281-0/+11
| | | | | | | | Rebased from p-ics-mr1: 8323a55 hwc: publicly define omap specific usage flags Change-Id: I3bd14ca2d88192299de731c49eba15a90084b3fe Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: rgz: Fix dirty region not working when blitting only one layerTony Lofthouse2012-11-282-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The dirty region handling doesn't work properly when only one layer is being blitted. The problem was the screen dirty state was only set to zero when one layer reaches the dirty count to zero. In case only one layer was being blitted the dirty region handling is never triggered making the empty areas to be cleared on every frame even if it was not needed. This patch removes the screen dirty flag and instead introduces a dirty count for the background and layers with the clear fb hint as well, since we don't care about the handle, the dirty count is decreased on every frame, in this way the dirty region handling sees the background and layers with the clear fb hint as any other layer. Rebased from p-ics-mr1: 11e5f7e hwc: rgz: Fix dirty region not working when blitting only one layer Change-Id: Ifbb111ce7738cd097e74ac01e2c48f3994857416 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Conflicts: hwc/rgz_2d.c Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: rgz: Workaround for hdmi hotplug crash with 2D blitter enabledGustavo Diaz Prado2012-11-281-0/+14
| | | | | | | | | | | | | | | | | | | When the hdmi cable is connected a hotplug event is triggered, this forces the DSS to exhaust the pipes available in most situations so the 2D blitter is used to handle some layers. When the cable is connected/disconnected it's highly possible a geometry change doesn't happen right away (or it may not happen) leading the region data to be invalid and not recalculated for an instant, this ends up in sending to the blitter incorrect src rectangle origins and sizes, most of the time this leads to L3 errors making the system unstable and unable to recover. Rebased from p-ics-mr1: 104249c hwc: rgz: Workaround for hdmi hotplug crash with 2D blitter enabled Change-Id: Ie1675d0a0dd03e69fac80dd51cee006fcd6f8791 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: Disable NV12 rotation support for the regionizerGustavo Diaz Prado2012-11-281-1/+1
| | | | | | | | | | | There is a bug when rotating NV12 buffers with the GC driver, disable this for now until it is fixed. Rebased from p-ics-mr1: 7c46d80 hwc: rgz: Disable NV12 rotation support for the regionizer Change-Id: Ia3add3266bd308fec34cb2b9140146d1da07f7ec Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: regionizer: Give support for rotation with BltsvilleGustavo Diaz Prado2012-11-281-71/+141
| | | | | | | | | | | | Enables the regionizer to support rotation with Bltsville. This patch doesn't enable horizontal/vertical flips yet. Rebased from p-ics-mr1: bd6d0b5 hwc: regionizer: Give support for rotation with Bltsville Change-Id: I595debea076727ef2c442d7544c1e355aef04808 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: regionizer: Add asynchronous blits supportGustavo Diaz Prado2012-11-281-0/+18
| | | | | | | | | | | | | | | Regionizer adds the BVFLAG_ASYNC to all the blits, except for the last one which is made synchronous. The last blit acts like a fence to let the previous asynchronous blits to finish first. Support in the GC driver must be present for this feature to work properly. Rebased from p-ics-mr1: 822ec12 hwc: regionizer: Add asynchronous blits support Change-Id: Iec32de51e7d0b95d1b780e60ed4848e8daf7977f Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: regionizer: Batch flags fixesGustavo Diaz Prado2012-11-281-3/+2
| | | | | | | | | | | | | | | | | | | | | + Removed BVBATCH_DST since the destination parameters (buffdesc and geometry) are not changing while performing blending within a batch. + Removed BVBATCH_SRC2RECT_SIZE, the rectangle size never changes while constructing blits within a horizontal subregion. + Added BVBATCH_SRC1RECT_ORIGIN, it's highly possible the src1 origin changes from a previous blit within the batch, a good example is the volume pop blended on top of the widget and wallpaper layers in the Android homescreen. This change doesn't address batch flags while scaling, those will be revisited later when the GC driver supports it. Rebased from p-ics-mr1 (also cleaned up commit msg): 93b69ce hwc: regionizer: Batch flags fixes Change-Id: I9b85dce832b391e347aab93800e0b22e67072227 Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: rgz: support layers with the HWC_HINT_CLEAR_FB hintGustavo Diaz Prado2012-11-281-7/+59
| | | | | | | | | | | | | Allow the regionizer to ignore (and clear if needed) a region with a layer requesting to clear the framebuffer with a hint. This mimics what SurfaceFlinger does when the HWC requests to clear a layer area with transparent pixels. Rebased from p-ics-mr1: 3c9a753 hwc: rgz: support layers with the HWC_HINT_CLEAR_FB hint Change-Id: If61a4f50d0315eb23119d7b97b0f2cb5f994806f Signed-off-by: Gustavo Diaz Prado <a0273371@ti.com>
* hwc: Add support for FB scaling and cloningDandawate Saket2012-11-281-15/+94
| | | | | | | | | | | | | | | | | | | | | Patch contains following features 1)Large frame buffer support: Transformation matrix for LCD and HDMI added to ensure correct composition and renderring of all UI layers Added support for overlay distrubution based on FB size and target display 2)Default HDMI display support Support for default HDMI display selection. Added HDMI best mode selection on HPD Rebased from p-ics-mr1: 96ad001 hwc: Add support for FB scaling and cloning Change-Id: Ia6f06d5e149656c4d79ac2d3983211a253bb3969 Signed-off-by: Lajos Molnar <molnar@ti.com> Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com> Signed-off-by: Dandawate Saket <dsaket@ti.com>
* hwc: Support HDMI as primary displayMykola Ostrovskyy2012-11-281-11/+46
| | | | | | | | | | | | | | | This patch disables mirroring/docking logic when HDMI display is used as primary instead of LCD panel. Based on patch from Mark Tyler. Rebased from p-ics-mr1: 9dd8ccd Support HDMI as primary display Change-Id: Idd239a562bfc486e128b268fa31ced53412bba3a Signed-off-by: Mykola Ostrovskyy <mykola@ti.com> Signed-off-by: Muralidhar Dixit <murali.dixit@ti.com> Signed-off-by: Tony Lofthouse <a0741364@ti.com>
* hwc: fix and simplify the idle timeout logicDima Svetlov2012-11-281-6/+1
| | | | | | | | | | | | | | | | Fixes the following issue : when non-blended layers are composited via overlays and blended layers are composited via FB, the idle timeout does not yield invalidation and re-composition of the layers via SGX resulting in the increased power consumption when the UI is idle. The change simplifies the idle timeout logic as follows : SGX only composition is forced after the idle timeout. Rebased from p-ics-mr1: 4573812 hwc: fix and simplify the idle timeout logic Change-Id: I37216892536a6900b5fb58c0e6ac616ef3f3ef72 Signed-off-by: Dima Svetlov <svetlov@ti.com>
* hwc: pass nv12 surfaces to gc320Craig Stout2012-11-281-1/+4
| | | | | | | | Rebased from p-ics-mr1: e2479b9 hwc: pass nv12 surfaces to gc320 Change-Id: I3f161273aa40da2ced869b7b60f2e9fe76cac3bf Signed-off-by: Craig Stout <craig.stout@ti.com>
* hwc: Remove comment about HWC being under devDan Murphy2012-11-281-1/+0
| | | | | | | HWC has shipped so the comment is no longer applicable Change-Id: I8ff4b3638b7b9c2494161227292218bb5138e957 Signed-off-by: Dan Murphy <dmurphy@ti.com>