Commit Graph

55 Commits

Author SHA1 Message Date
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
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
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
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
Linux Build Service Account
d15647a352 Merge "hqd: Adjust resolution based on aspect ratio" 2014-03-11 15:35:06 -07:00
Linux Build Service Account
de8c2e476e Merge "hwc: Enable downscale feature through system property" 2014-03-08 07:10:40 -08: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
Dileep Kumar Reddi
bf333c775d hqd : Use proper type casts
* Remove compilation errors
    * Use proper type casts

Change-Id: I1d44c2a2362a1fdd4d6e412ea816d4078e8355c9
:
2014-02-28 02:09:00 -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
Arun Kumar K.R
e6c9129071 display: remove compile time warnings
- remove unused variable in libexternal.
- make use of all variables in memtrack.

Change-Id: I67b34428f4a976327e4e9dcd6fd7dfb9063b969c
2014-01-31 11:40:03 -08:00
Arun Kumar K.R
fcf2fe15d7 libexternal: limit ext downscale to FullHD Resolution
- should not be enabling external downscale when primary panel
  is of higher resolution
- while enabling downscale on external, also check if primary is
  within the Full HD resolution

Change-Id: I871a435834b6bca9b0e6899680aa8282dddad624
2013-12-03 16:07:55 -08:00
Manoj Kumar AVM
82a3ac1c4c libexternal: Restrict external mdp downscale to 1080p
Enable MDP downscale feature on External display upto 1080p.
If primary is 2560x1600 and hdmi is 1080p, do not perform
MDP downscale for hdmi.

Change-Id: Ie835a71c293ca3f56c4ab62de96e38b51ded0dd7
2013-10-24 11:12:45 -07:00
Arun Kumar K.R
8381234ce1 libexternal: remove mEDIDs string
Remove mEDIDs string from the External class as it not needed
after parsing the string

Change-Id: I0a624857894a0b5401b33408c09b32ceb4f8a0d4
CRs-fixed: 549578
2013-09-27 15:26:47 -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
Arun Kumar K.R
47d6b64faa libexternal: enable HPD if target supports HDMI
enable HPD only on targets that has valid HDMI fb device.

Change-Id: Ia43d9138167b6ab3a887f7663a05831a2fcc09ea
CRs-fixed: 506363
2013-07-01 17:31:50 -07:00
Arun Kumar K.R
ae46f3ad39 libexternal: fix mode selection
Consider 1024x768p vesa format when deciding the best mode

Change-Id: I5966689c24ad19cccfdf280d73c4cdd95c8b3662
2013-06-18 15:42:37 -07:00
Manoj Rao
564ee925e6 libexternal: Support VESA format
Add support for VESA formats with pixel clock
at 65MHz. This change helps verify support
for formats corresponding to 65MHz in the
HDMI/MHL driver by using 1024x768p604:3 resolution.

Change-Id: I28b4adcfced7e8bfe7b75c534f5b15c25138ef7f
2013-05-12 21:21:14 -07:00
Arun Kumar K.R
4d73d64744 libexternal: change action safe property to persist
It is more probable that end user always use same TV to connect.
Hence make the action safe property persist, so that it is
persistent across reboot
Also, change property to sys. from hw. so that hwc can write

Change-Id: I5a77156012d121e28d1adbadb9162fcdf7ca3edd
CRs-fixed: 472431
2013-04-23 18:12:05 -07:00
Arun Kumar K.R
92ebf9ddb7 libexternal: Add 3840x2160p25Hz to getAttrForMode
Fix the black screen shown on TV when Resolution
3840x2160p@25Hz was set

Change-Id: Ib3ff35ce53df0409c7643f349f8095c7f2ad4d1d
2013-04-09 19:41:50 -07:00
Arun Kumar K.R
26808f3465 libexternal: Add support for SPD Information
- SPD: Source product description.
- Retrieve the product vendor and name from the system
  property and pass it to the hdmi driver.
- This will display some specific names for source such
  as instead of "Input 1" it might display "QCOM 8974" for
  example

Change-Id: I5440841b9e47110386c793045f3b30774522dcb6
2013-04-02 19:02:40 -07:00
Ujwal Patel
b9430d25d9 hwc: Add support for new resolutions
This change adds support for following resolutions.
* 2560x1260 @ 60Hz (DVI)
* 3840x2160 @ 30Hz (HDMI)
* 3840x2160 @ 25Hz (HDMI)
* 3840x2160 @ 24Hz (HDMI)
* 4096x2160 @ 24Hz (HDMI)

Change-Id: Ibd6fbaf20ac9c9557e738057f2a990eea1de928d
2013-04-02 19:02:40 -07:00
Arun Kumar K.R
6ce73ff350 libexternal: Add support for vesa format
This change adds support for 1280x1024@60Hz
with pixel clock of 108MHz

Change-Id: Idb2c752554bfb130bba8db2b29444afcacc40fee
CRs-fixed: 438028
2013-04-02 19:02:40 -07:00
Arun Kumar K.R
2518757d20 libexternal: clean up HDMI modes
- Userspace was maintaining its own display mode timing table
- Change that to include the header from kernel

Change-Id: I19823e60d188b5a30445866c7df1860e269975bc
CRs-fixed: 470335
2013-04-02 19:02:34 -07:00
Linux Build Service Account
9c8a9ff568 Merge "hwc: Processing of HDMI connection request when WFD is active" 2013-03-28 08:34:55 -07:00
Amara Venkata Mastan Manoj Kumar
b156a2f7f2 hwc: Processing of HDMI connection request when WFD is active
when HDMI is connected during active WFD session, teardown
  WFD and process HDMI connection request.

CRs-Fixed: 442226
Change-Id: I4b22ff9f1ab3175bab47babdaf040cb2289ebe4d
2013-03-26 13:41:46 -07:00
Arun Kumar K.R
e746ac5d1c libexternal: disable HPD during initialization.
- Disable HPD at start, it will be enabled later
  when the display is powered on
- This fixes the issue where the HDMI mirroring
  was not working when there was a framework reboot
  or adb shell stop/start

Change-Id: I56d706ebae281297a8ec6517a4fb8e5cdda27617
CRs-fixed: 461820
2013-03-22 14:28:10 -07: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
Arun Kumar K.R
c31bdcb1d0 libexternal: prefix the property name with hw
System property to be shared with the applications, they need
to have same UID.
Prefix the system property with "hw." so that it can be of system
UID and be accessed by any app.

Change-Id: Ie5db1b7e614728c53e1085089194cd8a58f9ae63
CRs-fixed: 456480
2013-03-07 08:23:53 -08:00
Amara Venkata Mastan Manoj Kumar
11a380df08 hwc: Allow HWC to support Virtual Display
This change allows virtual display to be composed
  by HWC for supporting Google WFD App + QCOM WFD stack.

Change-Id: If8892230256e72fa34e3fb5ae715c3ad8cbd5b64
2013-02-22 17:55:39 -08:00
Naseer Ahmed
f53b377bde display: Close 0 fds
0 can be a valid file descriptor, make sure 0 fds are closed

Change-Id: I2bf2280d70eda74fa0b0a886ea54ecefc6854b24
2013-02-15 19:13:50 -05:00
Linux Build Service Account
961407fe41 Merge "display: Reconcile display HALs" 2013-02-13 10:16:51 -08:00
Linux Build Service Account
90f8b98731 Merge "libexternal: change the order of ioctl call for HDMI" 2013-02-12 10:07:03 -08:00
Naseer Ahmed
7421472e5c display: Reconcile display HALs
Make the display HALs compile with/without the Qualcomm BSP
specific features so they can work with pure AOSP.
Change-Id: I1ad7282c4fe1fe7e3309afb530a07735f165ffbe
2013-02-09 08:29:49 -05:00
Arun Kumar K.R
e1cea3e68f libexternal: change the order of ioctl call for HDMI
In driver PUTVSCREEN_INFO ioctl uses the META_DATA to configure, so
change the order in which the iocts are called during setResolution

Change-Id: I79e1bcf191756b3567b3e73a8eccd50ecb8857a7
CRs-fixed: 449567
2013-02-06 19:27:55 -08:00
Arun Kumar K.R
feb2d8afc9 display: Add support for overscan compensation for ext display
- Read scan_info sys file node to check if TV underscans
- Apply action safe parameters to avoid overscan on ext display
- Store action safe width and height ratio using system  property
- Use these to calculate the destination position on the ext display
- Remove unsed ActionSafe Class

Change-Id: Id27e6fa20966fb13fc16aa7e237cacce8caeb642
CRs-fixed: 447367
2013-02-05 12:10:16 -08:00
Linux Build Service Account
c8a0fc7441 Merge "external: use metadata ioctl to set vic" 2013-01-28 11:57:11 -08:00
Ken Zhang
7b03a95d0a external: use metadata ioctl to set vic
Get rid of reserved field usage

Change-Id: Icad81d4065f559066a2722fa3227bddab75d665b
2013-01-16 13:26:25 -05:00
Arun Kumar K.R
bfc79c2058 libexternal: set hw.hdmiON system property
- hw.hdmiON property is set to 1 when cable is connected
  and 0 otherwise
- This property can be queried by other modules to know
  if HDMI is connected

Change-Id: Id513711a676e6cb4eb9a99b3b208b05f6e021047
2013-01-15 13:34:05 -08:00
Arun Kumar K.R
37552c5ad9 libexternal: Add support for changing resolution on HDMI
- set the property hdmi.resolution with the required mode
  (16,4,3,32,34,1)
- If that resolution is not supported by the TV, it will fall
  back to the best mode supported by the TV

Change-Id: I90ceda02319e79e388035ba7b5926bdcf6625595
CRs-fixed: 430055
2013-01-03 11:42:17 -08:00
Naseer Ahmed
9da8466f29 external: memset commit struct
Change-Id: I5e6d046f2fdff54fdd58aaca583c0ae8038a9a63
2012-12-10 17:56:17 -05:00
Amara Venkata Mastan Manoj Kumar
5182a78d88 hwc: support WFD external display
Change-Id: I3d24ff1757e79c4b41ff6c6db17d0274cd665671
(cherry picked from commit f8942672226a7af26218aa8d325c1677ae2b83dd)
2012-12-05 16:56:46 -08:00
Arun Kumar K.R
f6f49a11d5 hwc: changes for hdmi hotplug and hpd
This commit has the following changes:
1. Use hdmi switch node for hdmi hotplug
   - uses /devices/virtual/switch/hdmi switch_state to determine
     the hdmi connect/disconnect
   - this switch will be set to 1 on connect and 0 on disconnect
   - on connect, open framebuffer device, will trigger the hdcp
     authentication.
   - the driver will set the hdmi_audio switch to indicate that
     the HDMI sink supports audio
2. Enable HDP on unblank
   - this will resolve the device freeze during the bootup with hdmi
     connected

Change-Id: Id7a656d548a31178e31dcb9aea8acf38a56c9e0c
(cherry picked from commit 953b04b3cbba2f91d25795e5b0560c13d47844b0)
2012-12-05 16:55:09 -08: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
1a8cda0b2c hwc: clean up overlay for external from the draw thread only
Cleanup overlay for external from the draw thread. If done from the uevent
thread, its possible that the object being used by draw thread is deleted by
uevent thread.

This also removes unnecessary side-effects where libexternal sets states in
hwc, whereas, it could be set from hwc itself. There should be no need for
libexternal to modify states in hwc.

Bug: 7335863 (partial fix)
Change-Id: If07483e640abae2ced2418e0d5c8f278f8c6ec33
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-15 12:02:33 -07:00
Saurabh Shah
e4f3f721b5 hwc: external: Cleanup overlay objects on external disconnect.
Cleanup overlay objects and close fds when external is disconnected.  Without
this, the external does not come on when cable connected-disconnected multiple
times when device is in suspended state.

Bug: 7150885 (part of the fix)
Bug: 7295979
Bug: 7150885 (partial)
Change-Id: I1ae2ce7220b9928dde332ce3644dbe671d25c7e6
Signed-off-by: Iliyan Malchev <malchev@google.com>
2012-10-08 14:08:58 -07:00