124 Commits

Author SHA1 Message Date
Naseer Ahmed
43330bed60 Revert "libgralloc-qsd8k: Align the framebuffer only for GPU or C2D composition"
This reverts commit 80df10595720594cf661b8812507ba75b2bafd1e.

Revert "libgralloc-qsd8k: Set the framebuffer offsets correctly"

This reverts commit 09a31858f42978c29e0c7014713748d413b3c587.

It is no longer a requirement for GPU to be 4k aligned, hence
reverting these 2 changes.

Change-Id: I39e6f6324353a3c19bfdf523f8862408ef9a4093
2011-06-10 12:29:15 +05:30
Saurabh Shah
53316df74a Implement ActionSafe ratios in OverlayOrigRes class
Implement ActionSafe ratios in OverlayOrigRes class
Change class internal design.

Change-Id: I42a7f9b00dfd3e760b2162a1f7f36d679440363f
CRs-fixed: 285165
2011-06-06 18:18:01 -07:00
Saurabh Shah
e1d83ee15a Fix Tearing, stuttering for Original resolution surface.
Design now uses OverlayUI class. Flow goes through gralloc
to avoid race conditions with mirroring, when video is
played via Gallery.

Change-Id: If18c1f84a99aae38a6a4a20da7dff804ae05b8be
CRs-fixed: 285186, 286930, 286596
2011-05-26 13:28:00 -07:00
Saurabh Shah
eab9c40b8b Simplify call flow for action safe parameters.
Observed overscan in case of videos and UI
This change fixes all the paths and eliminates overscan
Adds a class to save user specified action safe parameters

Change-Id: I8c65b1142b086f5ff0d568c5f5c87fcde9642d5b
CRs-fixed: 285165
2011-05-17 04:34:14 -06:00
Linux Build Service Account
0ba2a7c861 Merge "libgralloc-qsd8k: Align the framebuffer only for GPU or C2D composition" into gingerbread 2011-05-06 15:50:52 -07:00
Naomi Luis
8950548d7d libgralloc-qsd8k: Align the framebuffer only for GPU or C2D composition
Change-Id: Iba334eb14d5af3eadf88534faaa86d2ae613f037
2011-05-04 13:13:54 -07:00
Naomi Luis
3db200d1bb libgralloc-qsd8k: Modify perform to use memory region
Modify the GRALLOC_MODULE_PERFORM_CREATE_HANDLE_FROM_BUFFER function
to take into account the memory region that the buffer has been
allocated from.

Change-Id: Ifac7b117956b39e54911b1b7693c0f4b959c630b
CRs-fixed: 284900
2011-05-04 12:45:44 -07:00
Naomi Luis
a447596a60 libgralloc-qsd8k: Set the framebuffer offsets correctly
The offsets for the framebuffer needs to start at a 4K aligned address.
Calculate the additional delta for the yoffset, the virtual address for flipping
as well as the total framebuffer size required to achieve this

Change-Id: Idfd70be10a24ac464ec820494b66d506a03a983b
CRs-fixed: 273888
2011-04-28 13:03:56 -07:00
Aparna Mallavarapu
5ed080eb34 libgralloc-qsd8k: Add support for 7627A
Change-Id: I5ae4573b546d4de23648be2933f7b693da4372c1
2011-04-16 00:02:54 -06:00
Arun Kumar K.R
3175fdf201 hardware/msm7k: Remove ioctl call from getOrientation
- The ioctl call from getOrientation is removed.
- In gralloc use getOrientation instead of storing the
  orientation.

Change-Id: Idb08568ff5d46ce99e0a9a8c6f492b90bb666f0c
2011-04-08 05:17:46 -06:00
Omprakash Dhyade
784aa08948 gralloc-qsd8k: Add comp. bypass feature
Add comp. bypass post API. This api uses OverlayUI
class to post application surface to MDP.

Change-Id: I2b3d4caeee2681a189059dcac4ead85d17722379
2011-04-07 16:30:53 -07:00
Kinjal Bhavsar
9d197b4c3b liboverlay: Add TV detection and monoscopic display for S3D
Add the state machine for overlay configuration. When connected,
check whether the TV on HDMI is 3D capable or not using the EDID
info. Show L channel on primary panel; and R channel on 2D TV if
non 3DTV is connected via HDMI, else switch TV to 3D mode.

Change-Id: I3109f8b0b81a8f5ad542db038262fd668e225e96
2011-04-05 18:29:45 -06:00
Linux Build Service Account
8fce0f895f Merge "liboverlay: Always use rotator for UI mirroring on HDMI" into gingerbread 2011-04-04 19:38:45 -07:00
Linux Build Service Account
55607ad9da Merge "libgralloc-qsd8k: Flush ashmem region cache instead of Invalidating it" into gingerbread 2011-04-04 15:31:01 -07:00
Arun Kumar K.R
b560c2e860 liboverlay: Always use rotator for UI mirroring on HDMI
- Use rotator buffer for UI mirroring on HDMI
- Avoid ioctl calls on getPosition

CRs-fixed: 278858
Change-Id: Id390e2b85fe939d8388ed17f5f9c7fcd30499755
2011-04-04 12:46:52 -07:00
Kinjal Bhavsar
6b6d116e95 msm7k: Use sanitized kernel headers
Add the exported sanitized kernel headers to include path in C2D/
copybit, gralloc and overlay HAL libraries.

Change-Id: Id60adf8cbd57d1d639d98f712bdc920adace33c3
2011-03-30 18:41:16 -07:00
Harshad Bhutada
7da3b2c955 libgralloc-qsd8k: disable framebuffer state related error reporting when swapinterval set to 0
Change-Id: I916408280dc155e4448de9303272dfbd5dc1c423
2011-03-25 13:55:37 -06:00
Shubhraprakash Das
7c67393bc8 libgralloc-qsd8k: Flush ashmem region cache instead of Invalidating it
ashmem ioctl does not allow the ashmem region to be invalidated
anymore, so we have to flush the ashmem region instead of simply
invalidating it.

Change-Id: I912d2cf293e6ad39d40fb04fd0a1d21700a3907b
2011-03-21 14:48:19 -06:00
Linux Build Service Account
2328b3c79b Merge "gralloc: Avoid multiple signals from videoOverlayStarted" into gingerbread 2011-03-17 16:14:34 -07:00
Arun Kumar K.R
3400eb4a89 gralloc: Avoid multiple signals from videoOverlayStarted
Signal hdmi_ui_loop from fb_videoOverlayStarted only if there is a
state change

CRs-fixed: 279095
Change-Id: I43bc87b4d78fae139bcfc0318ad8b271a6a325c7
2011-03-16 15:01:34 -07:00
Satya Durga Srinivasu Prabhala
a8d5925278 Cleanup QCOM usage of LOCAL_MODULE_TAGS
Starting from GB, modules which doesn't have LOCAL_MODULE_TAGS
defined (default to user tag) or which has user tag and not part
of GRANDFATHERED_USER_MODULES does throgh ERROR/WARNING
message. To supress these WARNING messages, we need to add
optional tag.

Targets tested on:
msm8660_surf

Tests:
Did a build from scratch

Change-Id: I13484250258582dc7c05e1893712719660a8ff06
2011-03-15 20:08:37 +05:30
Arun Kumar K.R
fb772f887b gralloc: Avoid unnecessary overlay set calls for HDMI
Call setPosition and setParameter for HDMI only when there is a
change in the rotation or position.

Change-Id: Id11b58408607c2f9799bb332c30d52f52957ec4e
2011-03-10 16:39:29 -08:00
Naomi Luis
c2516125da libgralloc-qsd8k: Flush the cache after buffer allocation
Change-Id: Idb720b8c64b323216f77de834c83c328caccd6ef
2011-02-18 14:49:30 -08:00
Harshad Bhutada
a0d56b4f1c libgralloc-qsd8k: Add support for triple buffering
Change-Id: I15c0a2c76f4ee1a87a8b2be369c24ab8d4c38101
2011-02-07 17:53:26 -07:00
Linux Build Service Account
7bf92de13a Merge "gralloc: Fix compilation issue with ashmem on 7x27" into gingerbread 2011-02-07 03:15:47 -08:00
Linux Build Service Account
cffd3354a7 Merge "gralloc: Add support for YCrCb_420_SP allocs" into gingerbread 2011-02-03 04:51:45 -08:00
Naseer Ahmed
aa2384f58d gralloc: Fix compilation issue with ashmem on 7x27
Change-Id: I02fcbd7bdefd83be4a55a79ccd82c0df4b74f7ae
2011-02-03 10:00:42 +05:30
Naseer Ahmed
9b2fea998b gralloc: Add support for YCrCb_420_SP allocs
CRs-fixed:272635
Change-Id: I61503b9591c7db2f0aa6c912dba2a829c30263dc
2011-01-28 16:20:45 +05:30
Naomi Luis
90a29ea10e overlay: Add support for additional S3D formats
Add support for Side-by-Side full, Side-By-Side-half formats in the overlay.
The Side by Side half formats could either be in Left-Right or Right-Left mode.

Change-Id: I1274529f75e69e10443705c863599936c45a7148
2011-01-27 12:23:06 -08:00
Linux Build Service Account
dffa4539bb Merge "hardware/msm7k: Fix aspect ratio in HDMI UI" into gingerbread 2011-01-20 17:28:48 -08:00
Saurabh Shah
e490840b19 hardware/msm7k: Fix aspect ratio in HDMI UI
For portrait mode: Actionsafe width depends on actionsafe
height, thus maintaining the  aspect ratio.
User entered value for actionsafe width doesn't matter.

For landscape mode: Both, user entered actionsafe width
and height matter. Aspect ratio may change, in an attempt to fill
up the TV screen till the edges to avoid overscan/underscan.

Picks actionsafe rectangle as the final rectangle.

Change-Id: I4e16a2d57978d3443283e9311c2efdc6494f8a94
CRs-fixed: 271567
2011-01-19 13:57:40 -08:00
Shubhraprakash Das
af02373f13 libgralloc-qsd8k: Port part of change Ice6a7c28
Port over part of change Ice6a7c28 that frees ashmem
memory.

Change-Id: I467617f3bc35a0e448fbf41207853e669aed657a
2011-01-18 18:12:13 -07:00
Naomi Luis
70d71b013d Add support for S3D content over HDMI
Add support in the overlay to display 3D content on the HDMI.
The 3D input and out formats are passed along with the regular color format.

Change-Id: I85d96928f1fc43de8b8eafab8526af4e716099a5
2011-01-10 16:23:22 -08:00
Saurabh Shah
394e5dfa37 hardware/msm7k: Fix position, aspect ratio on HDMI UI
Fix position, aspect ratio of HDMI UI when the
primary panel type is MIPI, 8660 Panel or 7x30 Panel

Change-Id: I8e9824520317e3facb4ef25bc25dd9b1de60b4ce
CRs-fixed: 263690, 269433
2011-01-04 09:18:06 -08:00
Naomi Luis
4f846c8d5b libgralloc-qsd8k: Close the gralloc module
Close the gralloc module in the fb_device_open api.

CRs-fixed: 269234

Change-Id: Ifcb1909e0cf8bf40f2b505716cb624531309556b
2011-01-03 12:54:05 -08:00
Naomi Luis
5f9ce3ab69 libgralloc-qsd8k: Update the gralloc HAL for Gingerbread
Update the gralloc HAL to match commit:
    commit 4d3c9ca6fabf2b0111ef6b567df7d244e124b9c2
    Author: Arun Kumar K.R <akkr@codeaurora.org>
    Date:   Fri Dec 17 13:14:58 2010 -0800

        libgralloc-qsd8k: Add support for non-aligned width on HDMI

        While creating overlay channel for HDMI consider the aligned
        width and set the crop rectangle to the actual width and height.

Change-Id: I36183bf1fa68e5c8ed80f1efbb5c535a060e0db0
2010-12-20 16:36:01 +05:30
Ajay Dudani
a97c43fe5f hardware/msm7k: Initial changes to libgralloc-qsd8k
Change-Id: I59b23aac04b32c5a5ab09b920bdf93fdbbfcd7ce
2010-12-19 01:15:17 -08:00
Mathias Agopian
1d5f2d69ae reject odd widths or heights for YV12 format
Change-Id: I66cbb5fbc20630218947cd41552a95503b58e15e
2010-09-10 14:40:10 -07:00
Mathias Agopian
054e5084a4 don't revert to ashmem if HW usage bits are set
this wouldn't make sense, since the h/w wouldn't be able
to use the buffer. in this case it it better to fail to
let the caller a change to try again with different usage bits.

Change-Id: Ibecaf069b6b58ee9c026affc95a45512660d5881
2010-08-20 16:02:29 -07:00
Mathias Agopian
0b39509dc7 only set the PRIV_FLAGS_NEEDS_FLUSH flag on PMEM buffers
PRIV_FLAGS_NEEDS_FLUSH will trigger an ioctl call into the PMEM
driver in unlock(), so it makes not sense to set this flag for
non pmem buffers.

Change-Id: Ie1e077c10df86d3689b82fa6ce5d6c856fc95688
2010-08-20 11:47:44 -07:00
Mathias Agopian
790f4ca78b add qcom specific pixelformats
Change-Id: I70395b93afc4dee13e805649ee2307ffe895aaf1
2010-08-19 13:15:39 -07:00
Jamie Gennis
0e9965714e Change the constant name identifying the NV21 Adreno format.
This updates the qsd8k gralloc to support the new name for the NV21 Adreno
pixel format.

Change-Id: I358bf12db058d3740a5e49ee30d95c2afb708295
2010-08-06 12:09:15 -07:00
Mathias Agopian
e6bb9a7263 fix [2855380] GRG19 monkey native crash in GraphicBufferAllocator
we were dereferencing the null pointer when freeing ashmem buffers.

Change-Id: I7be6e1ae064148bea1076193c21a73b5a3f90297
2010-07-28 18:12:39 -07:00
Mathias Agopian
69711634ec Remove the YV16 format.
Change-Id: I3f7995ba0cf41bcde995df293bea78bce7d82fc9
2010-07-14 16:29:43 -07:00
Mathias Agopian
118c366fe8 make the gralloc test linux only
Change-Id: Ib245f7936bbe71b34903172629e09763dd725d80
2010-07-02 16:37:27 -07:00
Jamie Gennis
1553bff4b0 Refactor the qsd8k gralloc implementation.
The purpose of this change is to add support for allocating gralloc buffers
from either /dev/pmem or /dev/pmem_adsp depending on the usage flags.  It does
this by factoring out and abstracting the interactions with the pmem device.
For /dev/pmem allocations, the kernel allocator is not used, so a single master
fd is opened, and all the allocations are sub-allocated from that by gralloc.
For /dev/pmem_adsp the kernel allocator is used, so it simply opens a new fd
for each allocation.

A very basic unit test that can be run on the host is included.  It requires
gtest, so to run it on a host system gtest must (currently) be compiled with
BUILD_WITH_ASTL=true.

Change-Id: If2ae0151698fad8107e18e808a3fa012a846263f
2010-07-02 12:57:36 -07:00
Mathias Agopian
718ff01742 remove unused YUV formats
Change-Id: Ia590a9cb9a02bf62f35da344f29775d1256e3da7
2010-07-01 21:19:31 -07:00
Mathias Agopian
ce863969f8 NV12 tiled needs 8K plane alignment
Change-Id: I8f2ca6f058ff9d7dd666871a696428c55dbe6cf1
2010-06-22 22:06:12 -07:00
Mathias Agopian
b25cdac1a7 remove unused YUV formats
Change-Id: I41c18551a61bec9f928399544a12024c81947ed0
2010-06-22 16:15:31 -07:00
Mathias Agopian
4899fb412a fix typo in ALIGN macro
Change-Id: Idaddf65f0b726a158f47639223f4281fd07447a7
2010-06-22 16:15:10 -07:00