Commit Graph

51 Commits

Author SHA1 Message Date
Linux Build Service Account
b676dc16ca Merge "hwc: Clean up scattered definitions of commonly used constants/values" 2014-08-30 22:37:38 -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
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
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
Saurabh Shah
65b710cb49 qdutils: Parse rotator downscale feature
Parse rotator downscale feature from the capabilities sysfs node

Change-Id: I346a20d4879682e115eb2f8f74afd41dca31e930
2014-07-09 10:23:11 -07:00
Saurabh Shah
5a0a9ce1bb qdutils: Add getter for 8994
Add version and getter for 8994

Change-Id: I95a8e4518a763651d7ce3865075fac80d4b3c60b
2014-07-02 10:45:42 -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
ea7a01d1cd hwc: Source Split layers always if indicated by driver
Source Split layers always if the driver indicates so by setting
the src_split_always in the capabilities sysfs node.
This is applicable to layers whose width > mixer's width, since
MDP clk rate is dependent on max(mixer_width, layer_width).

This feature can be enabled if the panel height is more than a
certain empirically derived value. Splitting always in those
cases can help with a lower voltage.

Change-Id: If9b33f11ca4132eb77416c26819f7473c65d3b08
2014-06-10 13:41:01 -07:00
Linux Build Service Account
c90c87656a Merge "hwc: Support single ROI for split panels." 2014-05-19 01:02:06 -07:00
Jeykumar Sankaran
a40a934551 hwc: Support single ROI for split panels.
For panels that cannot accept commands in both the interfaces, we cannot
send two ROI's (for each half). We merge them into single ROI and split
them across lSplit for MDP mixer use. The ROI's will be merged again
finally before updating the panel in the driver.

 - Reads panel property of dual control path.
 - If dual control path not supported, merge ROI's before
   analysing for composition strategies.

Change-Id: I67e361a299dc5d1adb28b180900e24633eefc4a8
2014-05-14 17:45:56 -07:00
Prabhanjan Kandula
15a8737e45 qdutils : Add mdp revision for 8x39.
Add mdp revision check for 8x39 to facilitate
any target specific checks with in HAL.

Change-Id: I115f4c8e54a11d240d02662eddce86c7528d3b19
2014-05-13 16:46:09 +05:30
Jeykumar Sankaran
beb0bc050c h/q/d: Read minimum width and height values of the panel ROI
Read minimum width and height restrictions on ROI of a panel
through sysfs node.

Change-Id: I0e4c35cdcaee06e77955725565cfbed2f0fd91e9
2014-04-16 17:44:36 -07:00
Naseer Ahmed
9de8332c69 mdp_version: Check define for each version
Some of the definitions may not be present on AOSP builds while
other may. Check each definition to be sure.

Change-Id: Ia3cf8f024a3a6b6633a3be4646579f6cde0d5580
2014-04-14 10:51:47 -04:00
Jeykumar Sankaran
3e30832ca5 libqdutils: Update panel capabilities from sys node
This change adds support to read more panel related informations
from sys node.

Change-Id: I64f37a35945ac700388335059cbb1cfbc9d4b4d7
2014-03-22 05:10:07 -07:00
radhakrishna
2e792f9884 h/q/d: Add utility function for 8x16 and read RGB scalar capability
- Add utility function for 8x16
 - Add internal function to identify if RGB doesn't
   support scaling that is read from capabilities node.
 - If UI layer needs scaling and RGB pipe doesn't
   support scalar, request a VG pipe
 - On 8x16, request DMA pipe for WFD

Change-Id: I94e8e0371bb10fcad53fddd2b7c45bc9b2594a4d
2014-03-17 12:56:16 +05:30
Linux Build Service Account
636f4cce66 Merge "hwc: Add support for SourceSplit" 2014-03-04 09:01:43 -08:00
Saurabh Shah
ab47c69049 hwc: Add support for SourceSplit
Add support for SourceSplit. The mixers are abstracted from hwc.
There would be no translations to mixer understood destinations.

1) If a layer's crop and position are < 2048, only 1 pipe can be used
irrespective of position.
2) Else 2 pipes can be used with the layer equally split, without
regard to position.

Change-Id: I501a53838d147887c1e2299366663e05320d5096
2014-03-03 09:57:12 -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
Linux Build Service Account
9620560b02 Merge "display: Remove klockwork warnings and errors." 2014-02-19 19:55:51 -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
Sushil Chauhan
ac18460d21 qdutils: Pre-allocate initial buffer for getline().
Some frameworks override malloc() and free() but not getline().
Pre-allocating the buffer avoids heap mismatch on free().

Change-Id: I9bd934f701ad7dbc10ec2aa21967e2a626c496f4
2014-02-14 15:38:17 -08:00
Arun Kumar K.R
f15adc04ce qdutils/qservice: fix compilation warnings
- fix incorrect type casting.
- remove unused variables.

Change-Id: I4d21fe895b048a9dcb7c43297d44b041ba42d735
2014-01-31 11:40:02 -08:00
Linux Build Service Account
91cac33750 Merge "qdutils: Use HW revision from linux header if available" 2014-01-18 05:08:23 -08:00
Linux Build Service Account
66fde3d59c Merge "h/q/d: Check for MDP upscale limitations" 2014-01-17 08:05:25 -08:00
Saurabh Shah
d38776327d qdutils: Use HW revision from linux header if available
Currently HW revisions are maintained separately between kernel and
user-space. To optimize this there will be single place, exported
msm_mdp.h, where HW revisions will be maintained.

Change-Id: I815eb9bd32f17928356e58a38260cee69b019a8b
2014-01-16 17:06:32 -08:00
Manoj Kumar AVM
8a22081e49 hwc: Add support for Macro Tile feature
Macro tile is enabled only if all the conditions are met:
  1. GPU hardware should support Macro Tiling.
  2. MDSS hardware should support Macro Tiling.
  3. USAGE flags shouldnt contain GRALLOC_USAGE_SW_READ_OFTEN and
     GRALLOC_USAGE_SW_WRITE_OFTEN.
  4. RGB 16bit and 32bit formats.
  5. persist.hwc.macro_tile_enable flag should be enabled.

PRIV_FLAGS_TILE_RENDERED flag is added to indicate whether the layer
is rendered/composited in Macro Tiling or Linear format.

Change-Id: Ie3139839c84d76c5d1a2300f33910a09eb7336f4
2014-01-14 13:32:31 -08:00
Jeykumar Sankaran
6cd8e7e68a h/q/d: Check for MDP upscale limitations
- Expose API to get maximum upscale value supported by MDP
- Check for MDP limitation before programming pipes

Change-Id: Id9faac54a7b3e393b6c4b60574e5e985b495bf59
2014-01-13 19:08:39 -08:00
Saurabh Shah
173ec33dbf qdutils: mdpversion: Add device version checks
Add device version inline checks for hardware devices.
Also fixes the issue of 8084 being treated as 8974v2
owing to the expanded range.

Change-Id: Iaeefb505e14e022b6e542daa8b84a87a22e7f69a
2013-12-05 09:31:47 -08:00
Saurabh Shah
8ee5e89553 qdutils: Parse low and high bandwidth from mdp capabilities node
Parse low and high bandwidth from mdp capabilities sysfs node
/sys/class/graphics/fb0/mdp/caps
This will be specified in kbps.

Conflicts:
	libqdutils/mdp_version.cpp

Change-Id: I2956e340106d47bb49f5744e4f9a4a0bb796f6e3
2013-12-01 18:43:28 -08:00
Manoj Kumar AVM
c65ec6186a qdutils: Remove fb open dependency to read MDSS capabiliites
1. MDPVersion class can query the capabilities using sysfs node.
   Since sysfs node can be read with out opening framebuffer, it is no
   longer required.
2. New internal functions updatePanelInfo, updateSplitInfo are added.

Change-Id: If506e600fb14401d8bf2361aac969c7e29a5d50a
2013-11-22 11:58:45 -08:00
Zohaib Alam
4eff790bbc libqdutils: added a new revision for mpq8092
Added a new entry for HW_REV for mpq8092

Change-Id: I34c0c2c1bb0055303f271e20a86d594a54cbaf0d
2013-11-20 15:19:24 -08:00
manoj kumar amara venkata mastan
bc05ef0581 hwc: Replace metadata ioctl reading with sysfs node
Metadata ioctl approach has limitations with respect
  to adding new capabilities in MDSS driver.
  Use sysfs node mechanism to obtain MDSS capabilities.
  (sysfs node: /sys/class/graphics/fb0/mdp/caps)

Change-Id: Id7fe683c85b3acf182920d28abf62e9826ff1161
2013-11-04 19:13:26 -08:00
Sravan Kumar D.V.N
294725962b libqdutils: initialize split char array to 0
String should have null character at the end, otherwise
functions like atio may not work on the string properly.

Change-Id: Ib3eb579a5a96dbd121bf6f65b09fa19ec7e274f3
CRs-Fixed: 546662
2013-10-07 11:40:35 +05:30
Saurabh Shah
75b81b9701 qdutils: Add version check API for 8974 v2
Add a version check API for 8974 v2 revision of MDP.

Change-Id: I7469ffc2f2df14c2ac02ee9dc025f5b1d8737206
2013-09-03 14:59:10 -07:00
Xiaoming Zhou
3da712a97d libqdutils: delay the close of fd handle
During surfaceflinger initialization, the first fb open
call comes from the MDP version check.   The MDPVersion
class implements a singleton object, which open and close
the fb device.  This initial fb open and close will trigger
the kernel driver to turn on and off the display, which
results two side effects: 1) extra delay in the display on,
2) one flicker when the display is turned on and off.
The change is to close the fd handle in the destructor.

Change-Id: I2ee5cfc78cbb613ed1326d9f7c26cbca97406163
2013-07-05 15:00:11 -04:00
Linux Build Service Account
5713417ae8 Merge "hwc: support 8x26 variants" 2013-07-03 08:22:56 -07:00
Saurabh Shah
67a38c3565 hwc: Add support for uneven split primary displays
Add support for unevenly split primary displays.
The driver provides info about the split via msm_fb_split sysfs node

For external we assume even split. If driver doesn't specify any split
for primary, we default to even split.

Change-Id: I4d541f41de2d7a5d2b62653fa33cab079a6d5d30
2013-07-01 14:55:06 -07:00
Amara Venkata Mastan Manoj Kumar
5fa4d60a7c hwc: support 8x26 variants
Add support for 8x26 variants (8x26v1, v2 etc..)

Change-Id: Ie316c1f77fdafb8021100f371c2ebc327e1c9da9
2013-07-01 14:11:10 -07:00
Saurabh Shah
e247408f06 hwc: Don't permit rotator use under certain conditions
These include constrained targets, with external connected which could
lead to a scarcity of pipes. Furthermore owing to a scarcity of writeback
interfaces, even if pipes are available, we may not be able to still
use rotator.

Change-Id: Ie2fb4c1726f32addcace89c268a126abe0cddbe0
2013-05-16 17:56:37 -07:00
Linux Build Service Account
edef94a033 Merge "qdutils: Parse panel type dynamically from panel info" 2013-05-14 21:43:34 -07:00
Carl Vanderlip
045d9c8a17 qdutils: Parse panel type dynamically from panel info
Parse the panel type from the panel info string using string operations
rather than relying on constant offset (which would have to be update for
any changes in length to the preceding MDP/MDSS version string). Assumes
that panel type is the first character after the first '_' in the panel
info string.

Change-Id: I33178e7219c26e0e0361e53941f15a3d38f99b71
2013-05-09 16:41:30 -07:00
Linux Build Service Account
f144c0b2ca Merge "display: libqdutils: add the MDP h/w version for 8x10 MDP core" 2013-05-06 14:51:06 -07:00
Xiaoming Zhou
530f861625 display: libqdutils: add the MDP h/w version for 8x10 MDP core
Add the support to enable 8x10 MDP core version

Change-Id: I385f9bcc5e1c6011f3e2704ee71ce5aacec8b92d
2013-05-02 13:39:04 -04:00
Sushil Chauhan
bab187a53e liboverlay: Add support for MDSS Bandwidth Compression
- This adds support for Bandwidth Compression.
- If MDSS supports BWC, then we set BWC flags
  to both Rotator(encode) and overlay(decode)

Change-Id: I6f7800716a2ce2ab855f4c0b1a53cd96f7d06d74
2013-04-29 13:51:44 -07:00
Saurabh Shah
bd2d083c79 overlay: Add support for decimation.
Add support for decimation on top of what MDP can downscale,
because decimation can have quality issues.
B-family MDP downscale of 1/4, plus decimation of 1/16 can let
us have a total downscale of 1/64.

Also decimate by 2 (min) if width is greater than what layer mixer
supports and is not handled by the client.

Change-Id: I3b7c4bf321c7561bd98206ad118f4ac1ee2879ae
2013-04-18 10:08:27 -07:00
Sushil Chauhan
07a2c7660c qdutils: Retrieve MDP revision and pipes information from driver.
Userspace can retrieve MDP revision number and number of different
types of MDP pipes (RGB,VG,DMA) information from driver. Add target
specific flag as previous MDP versions do not provide this support.

- Make use of this information while maintaining PipeBook.
- Move PipeBook related functions from overlay utils to PipeBook.

Change-Id: I46578bb27e515c4b9525d90b6619c11d7749914f
2013-03-14 11:43:42 -07:00
Duy Truong
73d36df685 Update copyright to The Linux Foundation
Change-Id: I145b66896159ff9886ed73507f17b3165ba0266d
2013-02-09 20:33:23 -08:00
Naseer Ahmed
96c4c95d48 display: Get panel type from framebuffer
Change-Id: I3b7cb78d7c6019482ae698b30d553ca782f5022b
2012-08-14 14:18:11 -07:00