summaryrefslogtreecommitdiffstats
path: root/hwc
Commit message (Collapse)AuthorAgeFilesLines
* hwc: remove log spam on unhandled formatsLajos Molnar2011-09-161-1/+0
| | | | | | | Fixes b/5290568 Change-Id: Ie02c4bc1f06d251e057d2a17adfa8e4f04ace667 Signed-off-by: Iliyan Malchev <malchev@google.com>
* hwc: call wait-for-vsync in set if eglSwapBuffers is not called.Lajos Molnar2011-09-141-1/+31
| | | | | | | | This adds a rate-limiting similar to when eglSwapBuffer is called, so that DSS-only compositions do not complete instantly. Change-Id: I5b6ea7f5b258d6b0c35068ba1bdc91f342227e4a Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: support CEA standard aspect ratios and finetune HDMI mode selectionLajos Molnar2011-09-141-36/+124
| | | | | | | | | | | | | | | | | | | Using the screen's aspect ratio does not work for CEA modes, where the mode's aspect ratio takes precedence. Select HDMI mode based on the following precedence: 1. pick CEA mode over VESA mode (for audio support) 2. pick a mode where we are upscaling (for scaling support) 3. pick a mode where the framebuffer fits most of the screen (minimize black bar area). This in effect picks a mode with the closest aspect ratio to the frame buffer 4. pick a resolution closest to framebuffer's resolution 5. pick the highest refresh rate Also only select an HDMI mode where we will be able to scale the UI to the screen. Change-Id: Ic8985436b88577cfa59f284eecbda6cdd340de6f
* hwc: actually check if DSS can support scalingLajos Molnar2011-09-141-9/+96
| | | | | | | | | | | This is needed so we do not commit surfaces to be rendered by HWC if DSS will not be able to ultimately display it. Checks include: - scaling limits - NV12 format support Change-Id: Ib53d0a60494f9d55ffedc48aa32181d04691e182
* hwc: call wait-for-vsync in set if eglSwapBuffers is not called.Lajos Molnar2011-09-121-0/+4
| | | | | | | | | | | This adds a rate-limiting similar to when eglSwapBuffer is called, so that DSS-only compositions do not complete instantly. Also include FBIO_WAITFORVSYNC until it is defined in bionic's linux/fb.h Change-Id: I858da95b18cc2bca107b5ece616db42da38719f1 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: do not call Post2 if there is no display/surface.Lajos Molnar2011-09-121-9/+12
| | | | | | | This is in line with prior commit to not call eglSwapBuffer. Change-Id: If19abfee407a5bdbeac97a66e8da4b1cb95d0e63 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: process all layersLajos Molnar2011-09-091-2/+3
| | | | | | | | | remove optimization that stopped processing layers after we filled all overlays, since these layers will need to be rendered via framebuffer, which will affect framebuffer z-order. Change-Id: I84ac97442432eb11ccb92baed250d7e3ee5bb179 Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: remove unused fb_zmaxLajos Molnar2011-09-091-5/+4
| | | | Change-Id: I3ae9ccb75ee64367dfac9b778fda6753fd3100b8
* never set the CLEAR_FB flag on OVERLAY layers (it makes no sense)Mathias Agopian2011-09-091-0/+2
| | | | Change-Id: I4f8c38645c8317fc0ac073324a1b477b9a28db07
* hwc: set hdmi mode (resolution) through new dsscomp APILajos Molnar2011-09-071-15/+42
| | | | | | | | Read supported monitor resolutions on hpd. Try to pick one that is the same size as the main screen. If that is not supported, pick the default (TV preferred) resolution. Change-Id: I49732b292d4651aeac504b7053fad928c0de2251
* configure the overlays with an opaque format when the layer is opaqueMathias Agopian2011-09-061-0/+4
| | | | | | | previously if a layer was configured as RGBA but was not blended, hwc would blend the layer anyways (based on the format). Change-Id: I174d39e9c16f5bf1cc989d94823cb9e4656a61b4
* do not call eglSwapBuffers() when EGLDisplay or EGLSurface are NULLMathias Agopian2011-09-021-1/+4
| | | | | | | this happens when turning the screen off, where we call set with all parameters set to NULL Change-Id: Ia5f913fbbee70e310508894800c220488ed8a061
* fix more drawing artifacts caused by hw composerMathias Agopian2011-09-021-3/+4
| | | | | | | hwc used the pixelformat to determine if a layer was opaque instead of using the blending field. Change-Id: I0e3dba7234639cb75156c6e941bf5e6aa0ecaf8d
* hwc: clear FB above all opaque layers if using SGXLajos Molnar2011-09-011-9/+5
| | | | | | | | | | | | | | | | To take advantage of some SGX optimizations, it would be useful to always set the HWC_HINT_CLEAR_FB on opaque layers unless there are no HWC_FRAMEBUFFER layers. In other words, if at least one layer is composited (HWC_FRAMEBUFFER), we want to tell SF to clear the framebuffer for all opaque layers that are handled by h/w composer (HWC_HINT_CLEAR_FB). If all layers are going into the overlays, then we do not want to do this. This will prevent SGX to needlessly preserve the backbuffer under those opaque layers and improve performance a bit in those cases. Change-Id: If3d969fa8ee3ce3ff6c49cde7d19de456b8aa321
* hwc: handle NULL for prepare() and set()Lajos Molnar2011-09-011-11/+6
| | | | | | | | Go through normal SGX Post2 cycle if layer_list is NULL. Set up framebuffer if prepare is called with NULL list, and call Post2 interface as usual if set is called with NULL list. Change-Id: I2d9d52a6ae6f55c8776361d1733f29de53183154
* hwc: mark framebuffer as pre-multipliedErik Gilling2011-09-011-0/+1
| | | | | Change-Id: I1e5c92c4e598c3c98b2680da4281481d90d41bf7 Signed-off-by: Erik Gilling <konkers@android.com>
* hwc: fix z-order settings for fbLajos Molnar2011-08-311-0/+1
| | | | | | | | | If a hardware layer was sandwiched between framebuffer layers, the z-order of the framebuffer layer was not adjusted. This is now fixed. Change-Id: Ib9eff3e3f1cd14b7c2a1d00ce2b451b04667e09a Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: account for 1 16MB tiler slot instead of 4 4MB oneLajos Molnar2011-08-251-4/+20
| | | | | | | | This requires corresponding kernel change that manages TILER1D mappings into 1 large tiler slot. Change-Id: I868e2c252378ef74c343876eb94c15fe549cd2ed Signed-off-by: Lajos Molnar <molnar@ti.com>
* hwc: scale cloned UI/video to full screen with correct aspect ratioLajos Molnar2011-08-241-1/+141
| | | | | | | | | | | | | | | | Added support to scale the cloned UI to full screen. Screen aspect ratio is detected using EDID information, and UI aspect ratio is preserved on the external display. For now we are hardcoding square pixels on the internal display. In docking mode, the first NV12 layer is scaled to full screen on the external display. In mirroring mode, the whole UI and any video layers are scaled to full screen. Change-Id: Ib4887fb341c22758de7a9c2fc89a9ff660d4fbd3 Signed-off-by: Erik Gilling <konkers@android.com>
* hwc: add uevent listener to handle switching to HDMI cloningLajos Molnar2011-08-242-15/+140
| | | | | | | | | | | | | Added uevent listener that listens to the hdmi switch. Cloning is now enabled by hwc after it receives hpd event. On startup, hpd state is detected to start cloning immediately. Only the DOCK flag will be read from debug.hwc.ext property to determine whether to do full mirroring, or only docking to external display. Change-Id: I7ea888d9048ad642ce1cdc7b71b75c62faafc227 Signed-off-by: Erik Gilling <konkers@android.com>
* hwc: added support for mirroring on external displayLajos Molnar2011-08-241-48/+196
| | | | | | | | | | | | | | | | | | | | | | | Rotation/mirroring has to be specified using the debug.hwc.ext property for now, which is read every 32 frame compositions: bits 0-1: clockwise 90-degree rotations bit 2: left to right mirroring (applied after rotation) bit 3: clone enable bit 4: docking mode bit 5: cloning to TV/HDMI (vs. LCD2) (cloning always happens to display1) Rotation and mirroring is not yet applied. In docking mode, the first NV12 layer is cloned to the external display. In mirroring mode, the whole UI and any video layers are cloned to the external display. NOTE: needs matching kernel update Change-Id: Ia8332e5892cd0855dd0fb510662da660ab8ee6d5 Signed-off-by: Erik Gilling <konkers@android.com>
* update hal_public.h to DDK 1.8@276629Erik Gilling2011-08-171-4/+9
| | | | | Change-Id: Id4947b195984f664809cd1aa6bfe1e2246ac70cb Signed-off-by: Erik Gilling <konkers@android.com>
* initial commitIliyan Malchev2011-08-083-0/+874
Change-Id: I8f7a7eeece0e516efa486b77e9d97805c0e65d3e Signed-off-by: Iliyan Malchev <malchev@google.com>