Commit Graph

335 Commits

Author SHA1 Message Date
Linux Build Service Account
96ace4bfec Merge "hwc: Avoid crash when debug.hwc.fbsize is reset to 0" 2014-10-17 03:14:20 -07:00
Linux Build Service Account
e319ffb89b Merge "hwc: Fix swap interval zero" 2014-10-17 03:14:18 -07:00
Raj Kamal
4a4430870e hwc: Avoid crash when debug.hwc.fbsize is reset to 0
Sometimes, the property debug.hwc.fbsize is reset to 0.
Avoid SF crash in such instances.

Change-Id: Icf158fff8f71762dfdc5b42988a48e0f4e4fb441
2014-10-13 23:28:00 -07:00
Raj Kamal
4b02b74665 hwc: Fix swap interval zero
Avoid populating acquireFenceFds and calling
rotator sync ioctl when swapinterval is zero.

Change-Id: I456784627eb0685dd2c9e67c405ba471dee3321e
2014-10-14 11:19:22 +05:30
Linux Build Service Account
4850bd8a11 Merge "hwc: Add msm8x09 version checks in HAL." 2014-10-11 21:21:45 -07:00
Ramakant Singh
b4106a121c hwc: Add msm8x09 version checks in HAL.
Add version checks for msm8x09 in hwc,copybit
and overlay.

Change-Id: Ia8b00f0ccd5f0495ab120b4c3e188caa5dbfa79c
2014-10-08 12:20:54 +05:30
Linux Build Service Account
b4e1c173be Merge "hwc: Change default app buffers count for ferrum." 2014-10-07 15:02:57 -07:00
Ramakant Singh
98c533c60c hwc: Change default app buffers count for ferrum.
Set application buffer count to "2" based on
*RAM size(512 and below)
*Screen Resolution(qHd and below)

Change-Id: I40a6c5f93611e7122b038767d49b3b6344a1d715
2014-10-01 15:38:51 +05:30
Tatenda Chipeperekwa
af2c004c44 hwc: Rename libexternal to serve HDMI as primary or external
This change will make is easier to build new functionality
applicable to both HDMI scenarios.

Change-Id: I417184568cb65a49c2ccb4199aff313ae2ee9b24
2014-09-29 15:39:58 -07:00
Linux Build Service Account
1192cd2bd6 Merge "hwc: Clean up ExternalDisplay class" 2014-09-27 13:37:06 -07:00
Naseer Ahmed
9eb5e09577 display: Fix warnings
Treat warnings as errors again

Change-Id: Ibd7f484d31ad420b85e82fd5183d70bf7dce4bfa
2014-09-25 16:11:15 -04:00
Tatenda Chipeperekwa
03d5df265c hwc: Clean up ExternalDisplay class
1. Remove hwc_context_t from libexternal since this is a construct
   that should only be used in libhwcomposer.
2. Clean up redundant code by creating utility functions to
   a. open a sysfs node in a given mode
   b. improving EDID mode storage/manipulation
   c. creating/destroying composition objects
3. Add utility functions to
   a. get the connected state of the external display
   b. determine which interface the external display is connected to
      (primary or external)
   c. activate the hdmi interface by setting the resolution via an
      ioctl
   d. update/reset external display information when a device
      connected/disconnected

Change-Id: Iba34c9e43b39ccb9c9436deb726587bd1b26b779
2014-09-25 10:20:11 -07:00
Linux Build Service Account
b8173300fa Merge "display: Add support for dynamic refresh rate" 2014-09-20 13:38:37 -07:00
Arun Kumar K.R
a727a888ba display: Add support for dynamic refresh rate
- The primary panels refresh rate can be change by clients
- Required refresh rate will be set by client using metadata
- If there are multiple clients requesting, it will be used only
  when the refresh rates are equal, else it resets to default
- Set the new refresh rate only when there are only YUV layers
  updating or when the list has only one RGB layer updating
- MdpVersion gets the dyn fps capabilities from panelInfo

Change-Id: If3e7e6b2f028eb301399c4d32c748eed8a97c41f
2014-09-17 13:48:26 -07:00
Tatenda Chipeperekwa
cb2a243608 hwc: vd: Add support for Dynamic Resolution Change (DRC)
1. Add support for Dynamic Resolution Change

We add support for DRC on virtual displays. This is achieved
by reading the width and height attributes that are set as
part of the buffer handle metadata.

For the WFD use cases, the WFD  MultiMedia framework will
update the width and height during DRC by using setMetaData
API with UPDATE_BUFFER_GEOMETRY. We then proceed to configure
WB with the new resolution for subsequent frames.

2. Update WB dump with output buffer format and resolution

Update WB dump with output buffer format and resolution. This is
helpful for debugging purposes.

Change-Id: I537277499041bffc7bfc5c6e3d024b67f80fce44
2014-09-15 11:12:35 -07:00
Linux Build Service Account
663e49d89c Merge "hwc: Enable mdp downscale feature for 4k resolution" 2014-09-10 18:54:33 -07:00
Ramkumar Radhakrishnan
a5c72875f5 hwc: Enable mdp downscale feature for 4k resolution
Enable MDP Downscale feature for primary resolution greater than
2048 only for the targets that supports source split.

Change-Id: I21871b099f74543aa8c2416bac41e3a16d4ce72d
2014-09-08 17:37:53 -07:00
Manoj Kumar AVM
9591a5e8cd hqd: virtual display code clean up
Remove V4L2 based virtual display functions as it is
no longer used.

Change-Id: Ibd7685791de6baa1bbf12ffe343443fcd7725269
2014-09-02 19:50:23 -07:00
Linux Build Service Account
b676dc16ca Merge "hwc: Clean up scattered definitions of commonly used constants/values" 2014-08-30 22:37:38 -07:00
Linux Build Service Account
f4045c63bb Merge "hwc: Add support for secure RGB layer" 2014-08-24 13:52:07 -07:00
Linux Build Service Account
fa90e1e422 Merge "hwc\overlay: Remove support for foreground override" 2014-08-23 07:58:50 -07:00
Ramkumar Radhakrishnan
4ec775f955 hwc: Add support for secure RGB layer
1. Detect and account the number of secure RGB layers present.
2. Mark secure RGB layers for MDP comp in cache based stratergy.
3. If full MDP comp and partial MDP comp fails, Mark secure RGB
   layers for MDP composition.
4. In partial MDP comp reject load based composition, if secure
   layer is present to avoid GPU composition.
5. Disable idlefallback feature if secure RGB layer is present
   to avoid GPU composition.

Change-Id: Idb4c4f09b081ec20240a2602aa3f20332fa49ad6
2014-08-20 11:32:47 -07:00
Linux Build Service Account
1127603e93 Merge "hwc: Remove external only feature related code" 2014-08-18 16:44:51 -07:00
Saurabh Shah
2c8ad05dcf hwc\overlay: Remove support for foreground override
Remove support for overriding a layer's z to set it up for foreground.
This is unused and can be achieved using pipes staged at required
z-orders.

Change-Id: Ia4688beed770c44c20d201a2dc5687252e002981
2014-08-15 13:27:46 -07:00
Ramkumar Radhakrishnan
3d863777c5 hwc: Remove external only feature related code
External only feature is completely handled in surfaceflinger, remove
unwanted code churn related to external only feature from display HAL.

Change-Id: If4f4f3fa8e91a5b8387e426b9e190abd2b06d793
2014-08-13 15:13:50 -07:00
Tatenda Chipeperekwa
ce8d5c4930 hwc: Clean up scattered definitions of commonly used constants/values
Clean up scattered definitions of commonly used constants/values.
There is no need in re-defining these in several places.

Change-Id: I22c082b56646cb02d5ae4733d110afc81aaff50a
2014-08-13 12:09:36 -07:00
Raj Kamal
bd3bdc6d03 hwc/overlay: Implement rotator caching
* A non-updating layer requiring rotation, can make use of
the older rotator buffer written when the layer got first
updated, rather than invoking a new rotator cycle.

* A rotator play is avoided in cases where incoming layer
buffer fd, offset, whf, src-rect, dst-rect, etc are similar
to that of the previous input layer to the rotator.

* For ex: In a usecase where video layer updates happen at
30fps and all other asynchrous UI updates happen at 60fps,
instead of the traditional 60 calls of rotator play per sec,
we now do only 30 thereby saving rotator bandwidth.

* Property "debug.rotcache.disable" can be used to disable
this feature.

Change-Id: I1d1c352c63007b7e0b4fee40882086ccd2f5a4aa
2014-08-13 01:31:49 -07:00
Linux Build Service Account
ee75c10fa6 Merge "overlay: Add support for rotator downscale" 2014-08-12 09:16:00 -07:00
Saurabh Shah
c46cf9d26b overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support

The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.

Smaller downscale is used if we need to chop off any more than 1
line or pixel.

Change-Id: Id07d62fefa3213035f16cca49497800716484a95
2014-08-08 10:19:18 -07:00
Raj Kamal
389d6e33d3 Limit #ROT-SESSIONS to 4 in LayerRotMap and RotMgr
* Limit the number of rotator sessions to 4 both in
LayerRotMap and RotMgr structures

* Make use of MDPVersion getter fuctions to check
for maxMixerWidth and maxDownScale supported by MDP

Change-Id: I27dac877807fbb4ed6fcb3500a3a318a2ef5d8b2
2014-08-08 09:11:09 +05:30
Linux Build Service Account
c159e744ea Merge "hwc: In PTOR, offset depends on stride calculated by gralloc" 2014-07-24 21:52:59 -07:00
Linux Build Service Account
a48820e6c2 Merge "hwc: Fix null dereference" 2014-07-24 21:52:57 -07:00
Prabhanjan Kandula
5bae9f5d35 qdutils : Read max mixer width from drivers.
Read the maximum width mixer can output from drivers
and consider this in identifying if dual pipes are required
to support a layer. So far above 2K dimensions we are using dual
pipes, but 8x39 mixer output can be upto 2560. So there is no
need of dual pipes as long as pipe data is less than this limit.
Compare layer/panel resolutions against this limit to deduce
if there is a need for dual pipes or split.

Change-Id: I52e1d28e381327d4f0b00f5ea8547c1e6157313c
2014-07-23 23:16:28 -07:00
Sushil Chauhan
fb8845cc3e hwc: In PTOR, offset depends on stride calculated by gralloc
1. In PTOR feature, offset for the second overlap layer on render
buffer, depends on stride calculated by gralloc for RGBA (4 bpp).

2. If mCopyBit object exists for external, we need setReleaseFd()

Change-Id: I74e365def2a6e540b2f2ba2b294b6b1e00e0ea96
2014-07-23 10:23:41 -07:00
Raj Kamal
5ef25b84f0 Revert "Set priority among various display devices"
* This reverts commit 52b4fdbdbd.

* Since DisplayDevices are not created for non-wfd virtual
displays(CTS/SR/SSD) anymore, we can remove these checks.

Change-Id: I9249a70c6d6f6b42f268e6ec8a28c0a86b954c4e
2014-07-16 23:27:01 -07:00
Saurabh Shah
8ec9b5eda4 hwc/overlay: Get rot dest dimensions instead of manipulating source
Currently for Mdss rotator we manipulate the layer buffer dimensions
to be equal to what rotator's destination dimensions would be, so that
these could be fed to MDP. Instead, this patch introduces APIs in
rotator so that hwc can directly query destination crop, width, height,
format from rotator.

This also simplifies the updateSource() and configRotator() helpers.

Change-Id: I501d998f2e0574683c764af9422742b2426ba0c7
2014-07-02 09:58:42 -07:00
Charles Bin
dab393806c hwc: Fix null dereference
Fix possible null dereference in hwc.

Change-Id: Ib403d4b742cc52175b93268c023ba273377e7b91
2014-06-30 10:37:33 -07:00
Linux Build Service Account
a9f6f8df17 Merge "hwc: Close release fence fd on buf sync ioctl failure" 2014-06-30 09:39:03 -07:00
Arun Kumar K.R
81f3f2e092 hwc: initialize viewFrame for primary display
viewFrame for primary display will always be full screen, hence
initialize it to primary resolution

Change-Id: I0f6ce79a9af6eac9b7b8a684c5b690c8b4a9e760
2014-06-24 10:57:30 -07:00
Linux Build Service Account
d11e467892 Merge "hwc: Extend PTOR feature for two layers" 2014-06-20 23:00:53 -07:00
Linux Build Service Account
995d0a8ac9 Merge "display: remove compiler warnings" 2014-06-20 18:39:25 -07:00
Arun Kumar K.R
b2a03b1db3 hwc: Extend PTOR feature for two layers
- Consider two smallest layers for PTOR feature which uses MDP comp.
- These two layers are rendered on a buffer and are queued to MDP
  to acheive full MDP Composition
- This helps to acheive performance enhancement

Change-Id: I43d9306ff19cd2d7a410c885316523965a44cbd4
2014-06-20 12:19:25 -07:00
Linux Build Service Account
cde184b8cb Merge "hwc/overlay: Fix decimation / bwc bugs" 2014-06-20 00:08:46 -07:00
Tatenda Chipeperekwa
a4550ce77e hwc: Close release fence fd on buf sync ioctl failure
This change closes the release fence fd in the event that
a failure occurs during the buf sync ioctl. This is additional
sanity to ensure that we are not leaking any fd's in userspace.

Change-Id: Ic303aa2a2ed20244605b0f0bd91145e8f3fc8f1b
2014-06-19 17:52:09 -07:00
Shalaj Jain
a70b435d10 display: remove compiler warnings
Use correct typecasts and format specifiers and resolve
compiler warnings

Change-Id: I51b12ecb78a9a496cf1f76c3d32892a203f70c43
2014-06-19 15:44:51 -07:00
Saurabh Shah
b6810df4ea hwc/overlay: Fix decimation / bwc bugs
1) While setting BWC check for 90 transform and swap crop
2) Calculate decimation in the getDecimationFactor API itself.
   Currently, a residual downscale is calculated and the clients have
   to take logs and apply forcible decimation like in MdpCtrl
3) Fix bug where transform gets typecasted to bool

b/14225977

Change-Id: I3c99c571e02e2cf7822342516b6a87d97be553d1
2014-06-17 16:32:52 -07:00
Ramkumar Radhakrishnan
9d20b39e4a hwc: Rotate RGB layer using MDP Rotator
1. Use MDP rotator to rotate RGB layers which are rendered by software
2. Restrict total number of rotator sessions to 4 for all displays
3. Disable RGB layer rotation for all MDP versions < MDP5

Change-Id: Ie93111082dff9a16b614e9768df5d8ce83ff9e25
2014-06-16 12:10:40 -07:00
Linux Build Service Account
3063fca48e Merge "hwc: Set GPU Hint from idlefallback state to GPU" 2014-06-15 21:46:01 -07:00
Linux Build Service Account
e5d6750d6d Merge "hwc: Define binder interface to set view frame of a display" 2014-06-15 21:45:58 -07:00
Linux Build Service Account
8ab399b9a5 Merge "hwc: Calculate DPI values according to changed resolution" 2014-06-13 04:34:13 -07:00