Commit Graph

27 Commits

Author SHA1 Message Date
Linux Build Service Account
f26580bc5d Merge "copybit: Enable HAL_PIXEL_FORMAT_RGB_888 support in c2d" 2014-05-17 00:07:06 -07:00
Sushil Chauhan
43755debbe copybit: Enable HAL_PIXEL_FORMAT_RGB_888 support in c2d
Enable HAL_PIXEL_FORMAT_RGB_888 pixel format support in c2d library.

Change-Id: I2316357adb3fef8007bdab4791c94e53d12fa00f
2014-05-15 11:20:32 -07:00
Naseer Ahmed
9136b8000b display: Remove ashmem header includes
Ashmem use in gralloc has been deprecated for some time. Remove
the stale headers.

Change-Id: Ie048c377b649c0639ffeefe9af41f7a5caaf0382
2014-05-13 11:22:39 -04:00
Praveena Pachipulusu
aef031c135 copybit: Use proper type casts and pointers
- Remove unused variables
- Use proper type casts for pointers.

Change-Id: Ie07c67d759d76f418fae08accdcfb1855511dedf
2014-03-21 09:16:54 +05:30
Sushil Chauhan
943797c361 hwc/copybit: Add Color layer support in MDP Copybit composition.
1. Color layer has a destination rectangle, RGBA color and plane
   alpha. There is no gralloc buffer. Layer flag HWC_COLOR_FILL
   denotes color layer. MDP BLIT happens via MDP_SOLID_FILL mode.
2. There is no color member in HWC layer, so RGBA color value is
   passed via "tranform" member from framework to HAL.
3. Update HWC query to enable framework to query for Color layer
   support in HAL, at run-time.

Change-Id: I2c698007c1689779fe86d549093bb5285432dc5f
2013-11-13 10:13:19 -08:00
Mathias Agopian
e4001e736d get rid of HAL pixelformats 5551 and 4444
This changes removes the use of 5551 and 4444 pixel formats
as its not supported anymore

Change-Id: I817510c3c7c0c3d95924c2ffc79e5727a6d6c48f
(cherry picked from commit 1fbd4a9662b07d53a3f220c91b3e85ca571a4938)
2013-11-08 15:17:17 -08:00
Pawan Kumar
74d9ea9f11 libcopybit: Fix GPU page fault on c2d use
On HDMI connect or other use cases where finish_copybit
is called, reset dst_surface_mapped and dst_surface_base
as destination surface is already unmapped.

Change-Id: I0073a46178e6b1ecfdbf0a08d8790af4271bc37b
CRs-fixed: 481685
CRs-fixed: 502555
2013-07-02 12:19:56 -07:00
Terence Hampson
adf4730f2f copybit: Enable copy bit to use sync pt
Since mdp composition is now an async call, the waiting for fences
is now no longer needed inside copybit. In addition, how
composition ioctl is called is slightly different as a result
needing to pass in aquire fences device performing compsition

Change-Id: Ia12dfb2960ba2fc78b14e776984ffe0c3fe45fdb
2013-05-29 09:34:02 -07:00
Sushil Chauhan
b00f59d79e hwc/copybit: Add check for Max layers support.
Add check in copybit for Max. layers supported by HWC. Increase
max. RGB surfaces to MAX_NUM_LAYERS to support known use cases.

CRs-Fixed: 481226
Change-Id: Ie30ab0ef3047a304133cb547902ae11fecc5db22
2013-04-30 16:35:06 -07:00
Linux Build Service Account
81370c46b7 Merge "libcopybit: Fix potential memory and surface leaks in c2d" 2013-04-23 19:59:27 -07:00
Arun Kumar K.R
14031eb1d7 libcopybit: Fix potential memory and surface leaks in c2d
- Check MAX_SURFACES while mapping GPU addr
 --- While mapping gpu address, first check if the request
     is less than the MAX_SURFACES allowed.
 --- Without this check, when the request exceeded MAX_SURFACES,
     there was memory leak as that gpu addr was not unmapped
- Map the destination surface only once
 --- The destination surface for the c2d blit will be the
     FRAME_BUFFER_TARGET per transaction
 --- Map this only once from the copybit_clear which is the first
     call by hwc for a transaction
- Increase MAX_RGB_SURFACES to 12
 --- To handle use cases where there are more than 8 RGB layers

Change-Id: Iffacde30ee88b9c21d0895cb1922aa981bb079e9
CRs-fixed: 475327
2013-04-19 16:01:33 -07:00
Naseer Ahmed
bb887bd312 copybit: Fix type conversion error for GCC 4.7
GCC 4.7 has stricter type conversion rules

Change-Id: I699cfe1ceafb5728fb8e6f34f7b1996d3c812e7e
2013-04-16 14:14:41 -04:00
Arun Kumar K.R
71cfd8144f libcopybit: protect all c2d copybit API's
- Each client API exposed by the copybit C2D needs
  to be protected.
- Add protection for clear_copybit and blit_copybit
- This is needed as clear_copybit was overriding the
  mapped gpuaddr while copybitwaitthread was waiting
  for transaction to finish and unmap
- After waitforTimestamp, the new addresses were
  unmapped leading to GPU Page fault

Change-Id: Ieeac10e73b05d3b47e602b2de4b4e64892737c9c
CRs-fixed: 470430
2013-04-04 11:23:51 -07:00
Linux Build Service Account
86acaa7718 Merge "display: Use cache invalidate and clean correctly" 2013-03-27 14:34:49 -07:00
Naseer Ahmed
aeab91f977 display: Use cache invalidate and clean correctly
Make sure cache is invalidated before reading in software and
cleaned after writing in software.

Change-Id: I91c471c47a5f1ff11f9960f08091a17ffe575534
2013-03-25 20:58:54 -04:00
Arun Kumar K.R
830144757c libcopybit: Use blending parameters passed by HWC
Instead of assuming the premultiplied alpha based on the color
format, use the blending parameter passed by the HWC.

Change-Id: Ib494644b6f9c4bf13d8ea28327ccc2058a52aae8
CRs-fixed: 466732
2013-03-25 00:24:25 -07:00
Linux Build Service Account
9c301a18c6 Merge "libcopybit: Remove usage of C2D_NO_BILINEAR_BIT" 2013-03-22 15:47:11 -07:00
Arun Kumar K.R
e29916b160 libcopybit: Remove usage of C2D_NO_BILINEAR_BIT
Remove usage of C2D_NO_BILINEAR_BIT in the config mask.
This enables using the BILINEAR filter for scaling and
improves the image quality

Change-Id: Ic9b61fe3ed5b16e63971fe542928640a13d92764
CRs-fixed: 453925
2013-03-20 11:50:27 -07:00
Naseer Ahmed
183939dd08 hwc: Add support for clearing with c2d
When blending translucent layers or transitioning with c2d,
sometimes the frame is blended with stale framebuffer content.
Clear the frame with C2D fill surface before drawing.

CRs-fixed: 462461
Change-Id: I1dca477fe88d77f4f0fa4846b155404f348e911d
2013-03-20 14:26:20 -04:00
Arun Kumar K.R
b2fc956ee6 libcopybit: update the target config_mask for transformation
With the new C2D optimization, the layer transformation is
passed through the config_mask.  If two layers had same
transform then the transform info was lost, fix that by
updating the config_mask when the layer has transformation info

Change-Id: Idecb5b16a65269fd13eead9a2de27a4756435583
CRs-fixed: 453083
2013-02-25 16:35:40 -08:00
Arun Kumar K.R
eb128aafbc libcopybit: Add Async mode support for C2D
- flush_get_fence API to copybit.h - which is async,
  which returns the fenceFD
- flush_get_fence calls C2dflush and c2dCreateFenceFD
  signals the c2d_wait_thread which waits for
  transcation to finish and cleanup resources

Change-Id: I98d5e08ea1cbce9732970c68c1e47b6f396249ce
2013-01-10 12:29:04 -08:00
Arun Kumar K.R
6b353bd3d6 libcopybit: Merge copybit HAL from jb
Single commit having all the following commits

commit f39e512ad6f51cf35ab00995e52a39f31e76e77f
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Fri Oct 19 14:41:32 2012 -0700

    copybit_c2d: Use a single draw call for surfaces with different rotations

    - When opening the copybit module, query the c2d driver capabilities.
    - If supported, use a single draw call for blitting surfaces with different
    orientations using the target target rotate override flag.
    - If not supported, invoke finish_copybit to draw the layers with the
    previous orientation before applying the current orientation.

    Change-Id: I0446f2817786321c9caa2eabf7b6679e5ecbcabe

commit a4008ff75150c1591c0dca46354e6bb8b30a675b
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Thu Oct 18 15:26:15 2012 -0700

    Display: Add copybit_c2d performance optimizations

    Following performance optimizations have been made to copybit_c2d
    - Club all the layers into a single draw call. When finish_copybit
    is invoked, the draw and finish are executed.
    - Send the layer blend mode to copybit.
    - If the blend is set to none, set the pre-multiplied alpha flag.
    SurfaceFlinger assumes all surfaces have pre-multiplied alpha unless
    explicitly specified. Copybit_c2d does the same.

    The following cases are currently exempt from this optimization:
    - Change in C2D target
    - The template surfaces limit has been reached
    - Max. blit object limit has been reached.
    - Change in target transform.
    - Use of any temporary source/destination surfaces.

    Change-Id: I5ad1dc48bbe6d38d319116ccaa800fefb4fbf9f6

commit b188d739f69272c4820e1a33c5e10aa2f2825a5f
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Mon Oct 15 11:17:11 2012 -0700

    copybit: Add finish API

    Add the finish API to copybit. This API is used to indicate the
    end of the drawing required by the copybit client.

    Change-Id: Ica4d13dbe6e7aeb7f88aabb734bf03e86c043acc

commit ecd56ace395fce78c14e2e753d3221218d062899
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Mon Oct 15 11:21:08 2012 -0700

    copybit: Clean up copybit_c2d

    - Remove unused functions
    - Do nothing for the COPYBIT_BLIT_TO_FRAMEBUFFER case when using c2d
    composition.

    Change-Id: Idc416ce3742bb41f060e52ac70add44e584032b9

commit 35d45d0cff5f6fe866fcb5df71444824a45e046e
Author: Naomi Luis <nluis@codeaurora.org>
Date:   Wed Oct 17 10:37:33 2012 -0700

    copybit: Use correct alignment in get_size()

    get_size() is used to get the size required by c2d. It's alignment
    should be 32 and not 16.

    Change-Id: I9fedca0186d0ea19883b967e127417b059621a99

commit 31311da328cbe2229fcf8d8d8e276ec64005bcb3
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Thu Sep 20 15:58:29 2012 +0530

    HWC: use uncached buffer for tmp yv12 and tmp stretch buffer.

    Change-Id: Iecc2a9c3c9a365d00d3491ce1007a36484209346
    CRs-fixed: 396574

commit 5503c90b5001aa4d863139eebcd9c0c43f265702
Author: Pawan Kumar <pavaku@codeaurora.org>
Date:   Mon Sep 3 09:14:13 2012 +0530

    copybit: Fix crash when copy_image is called with Tile format

    Add check for copy_image failure case.
    CRs-Fixed: 393122

    Change-Id: I5765120e87a135795d771c5d331275a66ade7e23

commit 48975bc53702ecba66ecaa5e5769036bb91f5cf2
Merge: feb1cd6 ab25cb4
Author: Linux Build Service Account <lnxbuild@localhost>
Date:   Sat Sep 1 13:36:47 2012 -0700

    Merge "Display ::Use proper ion heap id" into jb

commit ab25cb4818d9b87886678972f2861bacc93c580a
Author: Ramakant Singh <ramaka@codeaurora.org>
Date:   Thu Aug 9 14:23:39 2012 +0530

    Display ::Use proper ion heap id

    Change the MM heap to CAMERA heap for 7627a in use case
    1.Intermediate stretch of low resolution clips
    2.Software conversion of Y12 format

    Change-Id: Ib705d3245f601256179e2dedccbc707df85eb431
    CRs-Fixed: 383115

commit 90bcaadf41451d89fe80f96961ffc0a07a333145
Author: Prabhanjan Kandula <pkandula@codeaurora.org>
Date:   Mon Aug 6 12:50:12 2012 +0530

    libcopybit: fix YUV buffer alignments as per gralloc

    buffer alignment in copybit should be in sync with
    gralloc allignments while allocating buffer.

    CRs-fixed: 377051
    Change-Id: Ib2ae64e368ea3c92d3494c71da605197ccb4a9a5

    Conflicts:

        libcopybit/copybit_c2d.cpp

commit 95cf0038ea6eb02314024d673418464f0739ddb4
Author: Sravan Kumar D.V.N <sravank1@codeaurora.org>
Date:   Thu Aug 2 14:37:37 2012 +0530

    copybit : Add support for NV12_ENCODABLE format

    Change-Id: I7087dcad2238a3c35cc15c28d75b76a9e3ca6718

Change-Id: I748bffb4215d27f609beec209af0a5047858a314
2013-01-09 13:56:38 -08:00
Mathew Karimpanal
dec98cc96e display: Standardize log-tags for qcom display logs.
Change-Id: I75bc2d8db8d64994097d6b744f357c29c9a5717a
2012-12-12 17:49:17 -08:00
Naseer Ahmed
45a9960377 libhwcomposer: Add C2D support to copybit
Change-Id: I2f2c915bb92d5c459428078149a9709356ae83f1
Acked-by:  Neti Ravi Kumar <ravineti@codeaurora.org>
2012-08-14 14:18:18 -07:00
Naseer Ahmed
b16edac510 display: Fix warnings, make warnings as errors
Change-Id: I61f22765b04112be48e62135db930c415c9c7d37
2012-07-23 12:40:50 -07:00
Naseer Ahmed
01d3fd3318 display: Clean up gralloc
* Remove pmem and ashmem implementations
* Remove usage of RefBase
* Reduce log verbosity

Change-Id: If8ef543d236e5305bd5430f4f9c62c51b3a13787
2012-07-23 12:39:29 -07:00
Naseer Ahmed
29a26818d7 qcom/display: Update HALs
- Update the display HAL from Code Aurora Forum
- Add updated overlay library
- Enable HWC with basic video going through overlay
- Cleanup some files

Change-Id: I65c687c51be458cee71213c79e03eeda962d9086
2012-06-21 11:52:07 -07:00