Commit Graph

30 Commits

Author SHA1 Message Date
Naseer Ahmed
499ab3dfdf gralloc: Do not map framebuffer memory unless needed
The SurfaceFlinger opens the framebuffer module even when it
isn't necessary. It does this for some legacy hals.
Due to this we unnecessarily mmap the fb memory in gralloc.
Do not map this unless the property to use the framebuffer
memory is set.

Change-Id: Ib4ebfdf9a63af0dabb53170342181bac0360baeb
2013-07-04 17:09:54 -04:00
Naseer Ahmed
47aa15ed78 gralloc: Enable framebuffer memory mapping.
Enable mapping from framebuffer if debug.gralloc.map_fb_memory
is set to 1. This is useful for bringup.

Change-Id: I3c860148729c5f5c98d84bf17e6633285b4b0af1
2013-04-11 13:16:06 -04:00
Naseer Ahmed
66e9788c6c display: Fix merge issue in jb_mr1
Slightly different version went on jb_2.5 which caused a
mismatch. Escaped testing because FB HAL is not used.

Change-Id: Ia7ee2fb80bf937499d372383641f71530dc1feca
2013-03-19 20:42:11 -04:00
Jeykumar Sankaran
c1f8682f7b display: Remove framebuffer HAL usage
This patch removes the usage of the framebuffer HAL which is
deprecated in JB MR1 onwards. The code is left for compatibility
such as conformance tests but it is unused for normal display
usage.

Change-Id: If98133bdaa759cdc41d4503ff695b225ee43cb6f

Conflicts:

	libhwcomposer/hwc_utils.cpp
2013-03-18 16:38:54 -04:00
Naseer Ahmed
a163b73bea display: Remove genlock usage
genlock is no-op from Android 4.2 onwards since the sync framework
is used for explicit synchronization.

Change-Id: Idd1df589516534a683e0fa1ef0cfbb7f0e411f67
2013-03-15 11:48:59 -07:00
Linux Build Service Account
87293b70be Merge "hwc: Call MSMFB_DISPLAY_COMMIT even if FB handle is null." 2013-02-12 10:07:47 -08:00
Duy Truong
73d36df685 Update copyright to The Linux Foundation
Change-Id: I145b66896159ff9886ed73507f17b3165ba0266d
2013-02-09 20:33:23 -08:00
Saurabh Shah
4333330e11 hwc: Call MSMFB_DISPLAY_COMMIT even if FB handle is null.
Call MSMFB_DISPLAY_COMMIT for primary FB even if FB handle is null.
This is already done for external FB.

Change-Id: I5c405f933ce0fd99df6813acea45169802c54226
2013-02-06 14:01:16 -08:00
Naseer Ahmed
6f8ca315d8 gralloc: Remove update rect
SurfaceFlinger does not use this feature any more.
Removing this to avoid usage of reserved flags.
If this is needed again, it can be added with metadata
in the display commit ioctl

Change-Id: Iaf3f14a910ad64c83abb0910fad4a999b663c545
2013-01-15 16:55:06 -05:00
Ken Zhang
6e6f9a907e display: use metadata ioctl to get panel frame rate
Get rid of using reserved fields

Change-Id: Ia3ada294427812e8382f744964f475403f6fb73a
2013-01-11 19:51:47 -05:00
Linux Build Service Account
d74f5f3e4c Merge "gralloc: Mark framebuffer as ION memory" 2012-12-15 21:35:59 -08:00
Naseer Ahmed
d7f842768a gralloc: Mark framebuffer as ION memory
Change-Id: I859d4d03b62279b7e66ba52e3215fe7394a63434
2012-12-13 13:20:04 -05:00
Ken Zhang
3f2323fbbe hwc: Remove buffer_fence definition as it is not used
Change-Id: If5f4beceda0229c9f48b6b1ee74e23a95f14863a
2012-12-10 17:56:17 -05:00
Naseer Ahmed
54821fe3a2 libhwcomposer: Add support for 4 layer MDP Comp
This change extends MDP composition to support
upto 4 layers by making border fill as base pipe and
using all MDP h/w pipes in overlay mode.

Conflicts:

	libhwcomposer/hwc.cpp
	libhwcomposer/hwc_utils.cpp
	libhwcomposer/hwc_utils.h

Bug: 7626586
Change-Id: I01a0e53ddfbcf3ed46734f6f3bb0ef7d912ceac6
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-12-03 15:34:07 -05:00
Saurabh Shah
ae823e7735 hwc: more error checks
-- numHwLayers==1 means that there is only the FB_TARGET which HWC shouldn't
   draw. Also check for blank in set.  Checking for this in prepare prevents us
   from acquiring pipes.
-- add null check for private handle
-- print out vsync timestamp data on error

bug: 7274417
related-to-bug: 7288769
Change-Id: I8dae0d0748c5226fdc33ed8f5cc5259835dec2de
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-07 17:20:17 -07:00
Saurabh Shah
d80a52cbf9 gralloc: Send first 2 FB buffers to carveout and next to IOMMU
Gralloc uses the GRALLOC_USAGE_HW_FB flag to allocate memory from carveout.
This is fine for primary framebuffer, but for external framebuffer we need IOMMU
heap buffers, since the ioctls for external work with those.

Ideally, the primary buffers also need to come from IOMMU heap, which is ongoing
work. This patch allocates the first 2 FB buffer requests (assuming they are for
primary) from carveout and allocates all subsequent buffers from IOMMU heap.

Bug: 7124159
Change-Id: Ie53b2e1e7fcac136acd2d251f39cefe367fc7125
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-02 23:43:31 -07:00
Naseer Ahmed
32aa90fc54 hwc: Use asynchronous commit ioctl for display post
bug: 7274951

Change-Id: I70b2a00d6a2558f533bd87c92038774126434f03
2012-10-02 22:42:22 -07:00
Saurabh Shah
3e858ebde3 hwc: hwc 1.1 implementation
Bug: 7124159

--External disabled
--MDP comp coded but disabled.
--Videos via overlay, so that secure videos can work.

Change-Id: Ie48b264143d5e4237ab9724e28930e3f68ba49ee
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-09-25 22:51:14 -07:00
Saurabh Shah
e557e6e8e8 fb: Remove extra PUT_VSCREENINFO call.
Remove the extra PUT call during system startup.

Change-Id: I29287af2ee5610e749ac481c2832f41d7381ca59
2012-09-12 21:41:25 -07:00
Saurabh Shah
fc2acbe754 hwc/fb/overlay: wait for fbpost and pan display
Draw sequence in hwc_set
--eglSwapBuffers
--wait for fb_post. Its ok to draw to External only at this point.
--draw to external   | Parallel with PAN
--commit to external | Parallel with PAN
--wait for pan (happening in fb_post) to finish.

Call MSMFB_OVERLAY_SET ioctl only when params change.

These thing together ensure a correct sequence and should fix tearing and
stuttering, the latter assuming there are no other display pipeline delays.

Acked-by: Arun Kumar K.R <akumarkr@codeaurora.org>

Change-Id: Ibb0ad8485fa6b30dc6ac07ae8b25a760941c08ce
2012-08-27 13:53:40 -07:00
Naseer Ahmed
9edd17cc64 hwc: Fix reserved field usage
Use the top 16 bits of reserved[3] for HDMI
and the bottom 16 for FPS. A follow up patch
in the MDP driver will get rid of reserved field
usage entirely.

Change-Id: Ic9f7a2f91b46b0dec830ea54784b7775009fbe48
2012-08-15 20:19:38 -07:00
Naseer Ahmed
0c8b7b5c84 hwcomposer: Add support for UI mirroring
- Uevent observer as part of Hwcomposer
- HPD, enabling/disabling external display from HWC

Change-Id: I52b4f30c78e98c5b52c86722046389f458c2dbee
2012-07-23 12:38:12 -07:00
Naseer Ahmed
f48aef64b2 liboverlay: Refactor, bug-fixes, upgrade.
* Fix memory leak during copying pipe objects.
* Remove unused / unnecessary code.
* setMemoryId API is merged with queueBuffer.
* setParameter API is setTransform now.
* Rotator upgraded to:
  --Allow different rotator hardware types.
  --Remove dependency on MDP code.
  --Allocate memory only during first playback,
  close when the associated pipe is closed.
* Have single commit implementation.
* Include new format types.
* Remove WAIT and CHANNEL enums and usage. Replace BypassPipe with
  GenericPipe. Client expected to set alignments and parameters.
  Add transform combination enums.
* Allow APIs to be called in any order. Do transform calcs in commit.
  Move ext type setter and getter functions.
* Add calculations for 180 transform.
* Add secure session support in rotator
* Implement all rotations in terms of H flip, V flip and 90 rotation.

Change-Id: I34a9a2a0f1255b3467a0abbaa254d0b584e901ce
2012-07-23 12:36:44 -07:00
Naseer Ahmed
8831816879 framebuffer: Fix locking
The gralloc locking did not lock
the framebuffer. Use genlock to
lock the framebuffers.

Change-Id: Ie8be6f7950f6df06a2293c3df863e19cd5386479
2012-07-23 12:35:29 -07:00
Naseer Ahmed
a87da60090 display: Add QC Display utils
* Rename qcomui directory to qdutils
* Avoid inclusion of qcom_ui header
* Add class to get MDP version
* Add namespace for qdutils to prevent collison

Change-Id: I9a3f440e6b0fea1cfcc478ddca90af5df3bbb897
2012-07-13 17:50:32 -07:00
Naseer Ahmed
30621ab602 display: Use single thread for FB post.
To support swapinterval zero a separate thread
was added to do the framebuffer post. Since we
are going to support the WAITFORVSYNC ioctl in HWC,
we can handle the zero swapinterval case there.

Change-Id: I39f960825ca4173f99a9895e0c132b70a7adccab
2012-07-09 22:02:29 -07:00
Naseer Ahmed
00fd6a573e display: Enable triple framebuffers
Change-Id: I323c10b939277477f724c2d0a20f9c6da4899481
2012-07-09 22:01:02 -07:00
choongryeol.lee
26145b8999 gralloc : apply kernel 3.4 fb screeninfo type
Since fb screeninfo type is changed in kernel 3.4,
fb ioctl is not work correctly without this patch.

Change-Id: I5d673b78bd9a1680daf77256a7d31bc78d75cda7
2012-06-28 22:20:48 -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
Iliyan Malchev
202a77d28a initial GL libraries for msm8960
Change-Id: I16451c70a079894ac326d3564d96f1fbafcd4f1b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-06-11 23:50:46 -07:00