Commit Graph

62 Commits

Author SHA1 Message Date
Ramkumar Radhakrishnan
87a1cd1c88 hwc: Reset pipebook format to avoid pipe allocation failures.
Reset format type to FORMAT_NONE to select the pipe irrespective of
the format specifed by the client. This is required for the device
where SMP starvation is unlikely, we need not keep track of formats
programmed in the pipes to avoid potential pipe crunching.

Change-Id: Ifc00549802ca66936e171d00020124d3bcb60e0a
2015-02-26 21:38:24 -08:00
Linux Build Service Account
3f46890d0f Merge "hwc: Use max pipe width instead of max mixer width for splitting" 2014-12-20 14:13:08 -08:00
Jeykumar Sankaran
3930580bb3 hwc: Use max pipe width instead of max mixer width for splitting
Not necessarily the max width supported by the MDP pipe and mixer
need to be same. HWC has to make the decision for using one OR
two pipes per layer only based on the max width supported by the
pipe not the mixer.

Change-Id: I5a2495d07de1b6f54ef64d9140c909f0f4cef914
2014-12-18 12:03:11 -08:00
Saurabh Shah
2fd8a250f1 hwc: mdpcomp: Use actual usable mixer stages from driver
The driver now sends the actual usable mixer stages, so no need to
deduct the STAGE_UNUSED and STAGE_BASE.

Change-Id: I3690d10b5ccf83cab499871479768fcd5cdb2a4e
2014-12-05 13:49:53 -08:00
Jeykumar Sankaran
be93e27e44 hwc: Query MDP capability for blending stages supported.
- Read MDP sys_fs node for blending stages supported per mixer
  instead of hard cording the value. This makes the implementation
  scalable across chipsets.
- Add binder support to change the max pipes per layer value
  dynamically for MDP comp.

Change-Id: I3b83f4bdc2e2e81ca55c54fc6bcfd61c55fef501
2014-11-05 10:34:50 -08:00
Saurabh Shah
ed508b7c50 qdutils: Add 8994 v2 version id
Add support for 8994 v2 hardware version id, use it as part of
the existing is8994() API

Change-Id: I634ad3893ede523b97dcc3dfcd1fb4b28f24c55a
2014-10-27 13:42:01 -07:00
Saurabh Shah
189f23d621 hwc: Fix src split bugs
--In "always_split" mode, split FB only if the updated portion of
FB's width is less than mixer width

--While deciding whether or not to allocate the 2nd pipe, account
for 90 transform in crop width

--Crop minimum width limitation of at least 5 pixels does not apply
to targets after 8974 v2.

Change-Id: I83b4690216a75c0d57e7e4e7b18b4531bb22df05
2014-09-29 14:50:33 -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
Linux Build Service Account
783649515e Merge "display: libqdutils: add the MDP h/w version for msmferrum" 2014-09-15 05:58:43 -07:00
Shivaraj Shetty
9a3288feb4 display: libqdutils: add the MDP h/w version for msmferrum
Add the support to enable MDP core version 3.0.5 for ferrum

Change-Id: I295a0a8eb800ae4f3a9fb8d380a829fc48e80405
2014-09-08 22:30:14 -07:00
Sravan Kumar D.V.N
b1bf9d9919 hwc: Add a property to forcefully disable Partial Update
Set this property persist.hwc.pubypass to forcefully disable Partial Update
and enable testing of post processing features.

Change-Id: I1e0c2f9f091b8186d5939ecbafdd4ea60de92361
2014-09-08 13:10:26 +05:30
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