Commit Graph

16 Commits

Author SHA1 Message Date
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
Arun Kumar K.R
db7d83a514 display: initialize viewFrame info for external displays
- At the initialization, set the viewFrame info for the external
  and virtual displays to its resolution.
- It will be modified later based on the display projection

Change-Id: I25b74dcd375cb15386d5dad6f6d3730b15969f8f
2014-06-25 00:53:34 -07:00
Raj Kamal
068f4575f6 hwc: Add target specific checks in hwcomposer
* Mdss driver supports DMA-Multiplexing on wb interface
for certain targets. Add overlay get function to query
this info during pipe allocation for wb.

* UI Scaling on external is not supported on certain
targets due to the lack of availability of pipes with
scalars. Add overlay get function to query this info
to disable action-safe calcs, DRC and others which
require downscaling.

Change-Id: I1726caa4634f72d781561e797078648524ea2eef
2014-04-25 14:18:32 +05:30
Tatenda Chipeperekwa
94a09b68f7 libvirtual: Fix logic to detect DRC use case.
We detect DRC based on the resolution of the external display stored
in the HAL, and the dimensions of the framebuffer(fb2) after receiving
a RESUME event. If the stored resolution is greater than that of fb2
it means fb2 was reconfigured due to DRC. This is the only case in
which we trigger the DRC path (and the MDP downscale path thereafter).

For all other cases, the RESUME event is just treated as normal and
should not result in triggering the DRC path.

Change-Id: I2c8a854434f09a840938f00b88faa59c6cb57e7f
2014-04-08 11:41:37 -07:00
Tatenda Chipeperekwa
c3f3357fbd Revert "libvirtual: Fix logic to detect DRC use case"
This reverts commit 0f59a5a6a4.

Change-Id: I800a4a50db4cc39ca7cf9fed5ec7d146a7b9b95b
2014-04-08 11:31:38 -07:00
Tatenda Chipeperekwa
0f59a5a6a4 libvirtual: Fix logic to detect DRC use case
We detect DRC based on the resolution of the external display. If the
external display has non-zero width/height then we know it was
previously configured during the same session and is going for DRC.

Change-Id: Iaa0b112370a95f2719738c991411776dcfe17f88
2014-03-26 10:33:29 -07:00
Linux Build Service Account
d15647a352 Merge "hqd: Adjust resolution based on aspect ratio" 2014-03-11 15:35:06 -07:00
Tatenda Chipeperekwa
f080b79508 hqd: Adjust resolution based on aspect ratio
When the MDP downscale path is enabled we assign the primary
resolution as the external display's dimensions. However, the
aspect ratios of the external and primary displays can be different.
As a result, directly assigning primary resolution could lead
to an incorrect final image.

We get around this by calculating a new resolution by
keeping aspect ratio intact.

Change-Id: I217718a5474862154fe60837fc6518408d2c32c7
2014-03-06 11:51:55 -08:00
Tatenda Chipeperekwa
5d14c718ee hwc: Enable downscale feature through system property
Add support to turn the MDP downscale feature ON through the
use of a system property. 'sys.hwc.mdp_downscale_enabled' shall be
set to 'true' in build.prop file to enable this functionality.

This is required for OEMs that might have privacy concerns over panel
size information being exposed.

Change-Id: I354b25b1fdabe5786aed7552f2afccda35412467
2014-02-27 14:52:50 -08:00
Ramkumar Radhakrishnan
36bd527bc8 display: Remove klockwork warnings and errors.
Remove all klockwork warnings and errors for libgralloc,
libhwcomposer, liboverlay, libqdutils, libqservice, libvirtual,
libexternal libraries to avoid buffer overflow and memory leaks.

Change-Id: I078143bcbcf5e4b342156bd8305a644566f7cc4b
2014-02-18 12:39:21 -08:00
Tatenda Chipeperekwa
7f0c422ee1 libvirtual: Cleanup patch for DRC feature
Separated the logic for setting virtual display attributes into 3
functions that:
1. Initialize the virtual res. on an ONLINE event
2. Set virtual res. to match primary res (MDP downscale path)
3. Set MDP downscale mode for either DRC or MDP downscale path

Change-Id: Icbf2a6b6301809fee48272ac8a87c732dd2d6634
2013-09-30 20:49:55 -07:00
Tatenda Chipeperekwa
3368d08ed5 hal: adding support for DRC on WiFi display
When Dynamic Resolution Change (DRC) is triggered in the WiFi display
    stack, it results in a PAUSE and a RESUME event. During DRC, the
    dimensions of the framebuffer are changed. To support DRC we need to:
    1. Check if a RESUME event is the result of a valid DRC event
    2. Reconfigure the display's attributes to reflect resolution change
    3. Enable MDP downscaling when necessary (Valid DRC cases)

Change-Id: Idc3cbc94de99a4a7299e2f6b26c3e35937c1d6c8
2013-09-11 11:46:00 -07:00
Amara Venkata Mastan Manoj Kumar
376d8a8c01 hwc: Perform MDP downscaling for WFD/HDMI Scenario
On WFD/HDMI connection, if the configured resolution is less than
  Primary Resolution, Display HAL does the following:

  1. sends hpd notification to SF with primary resolution.
  2. configures MDP pipes with configured Resolution.

  This is done to improve UI quality as MDP has better downscale
  filter options compared to GPU.

Change-Id: I33570c13016a35ed6c5d22d4c34dfe75b2c605a1
2013-08-22 15:34:29 -07:00
Ramkumar Radhakrishnan
31f4c4e7b9 Revert "hwc: Perform MDP downscaling for WFD/HDMI Scenario"
This reverts commit 1291675ee4.
2013-08-22 13:32:18 -07:00
Amara Venkata Mastan Manoj Kumar
1291675ee4 hwc: Perform MDP downscaling for WFD/HDMI Scenario
On WFD/HDMI connection, if the configured resolution is less than
  Primary Resolution, Display HAL does the following:

  1. sends hpd notification to SF with primary resolution.
  2. configures MDP pipes with configured Resolution.

  This is done to improve UI quality as MDP has better downscale
  filter options compared to GPU.
  This works only for QCOM WFD proprietary solution.

Change-Id: Ic20e837bf02c0f7b6718946e70b936f3a469fa7c
2013-08-16 20:56:05 -07:00
Jeykumar Sankaran
27dee264f7 display: External display refactor
- cleans up external library
- add separate library for virtual display
- process virtual updates in its separate path
  in hwc.
- Acquire blank mutex lock for one complete drawing
  cycle

Change-Id: Ib984c578464a131ecdb27ee48960f58d68b7a5a7
2013-08-14 13:19:37 -07:00