Commit Graph

306 Commits

Author SHA1 Message Date
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
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
Ramkumar Radhakrishnan
0a021a85a3 hwc: Define binder interface to set view frame of a display
Define binder interface setViewFrame to set view frame information
of a display by surfaceflinger when projection for that display
changes.

Change-Id: If737b51ae0f04303a1a29c91a9703f64354b61fb
2014-06-10 14:52:44 -07:00
Tatenda Chipeperekwa
523eac5717 hwc: vds: Add support to dump layers, FB and WB output buffer
1. Add hook to dump the layers going to VDS based virtual display.

2. Furthermore, add utility function to dump the frame buffer and
   WB output buffer. This will be enabled via a system property

   debug.hwc.enable_vds_dump

   Once dumping is enabled, the dumps can be extracted from

   /data/vds.fb.FORMAT.XRESxYRES.raw
   /data/vds.wb.FORMAT.XRESxYRES.raw

   e.g. vds.fb.MDP_RGBA_8888.1152x1920.raw

Change-Id: I2435c5507961a52929411206892c005492d5c193
2014-06-10 10:52:44 -07:00
Praveena Pachipulusu
49d6206ca3 hwc: Calculate DPI values according to changed resolution
If dynamic FB feature is enabled, calculate xdpi, ydpi
values based on new resolution.

Change-Id: Icbc8d2161082f60983532d1a57d9142653c65e9a
2014-06-10 11:50:38 +05:30
Ramkumar Radhakrishnan
3efce48401 hwc: Set GPU Hint from idlefallback state to GPU
Set the GPU hint to high from idlefallback to GPU state transition.

Change-Id: Ia8c2e44788e7131c4faf5fda32acf0c5b6000cdd
2014-06-09 16:26:29 -07:00
Jeykumar Sankaran
8b40b43e87 hwc: Consider FLIP flags for partial update.
FLIP flags need to be considered while calculating srcCrop and
displayFrame even when a layer is updated partially on dual DSI
panels.

Change-Id: I097b3335e66566d6639848bc8f8382bfeabb7f54
2014-06-03 12:54:23 -07:00
Sushil Chauhan
defd352e10 hwc: Full MDP Composition mode with overlap region removal
MDP bandwidth limitations can be avoided, if the overlapping region
covered by the smallest layer at a higher z-order, can be composed
on a render buffer using Copybit, and then it can be queued to MDP
along with other layers. It helps to improve performace by avoiding
GPU Composition in use cases like Home Screen pan. To enable this
feature, set system prop "persist.hwc.ptor.enable" to "true" or '1'
and enable Copybit HAL compilation.

Change-Id: Ib719d3dd42477837519518cc427f1b95356c28f7
2014-05-30 13:59:16 -07:00
Ramakant Singh
467759fb28 hwc : Add support for ABC in MDP3
In display list if one layer has same parameters
as framebuffer on index '0'. Use this layer
as FB and blit other layer(s) on top of it.

Change-Id: If38712781f24a2e27686d2b370643f51a9b05358
2014-05-26 13:59:22 +05:30
Ramakant Singh
0def28c653 hwc : Add support for single layer Bypass in MDP3
If the display list contains single layer and that layer
has same properties as Frame Buffer, avoid BLIT on Frame buffer
and pass it directly to display.

Change-Id: I24decaca4788432a55b550caa2a1354a670cd6fa
2014-05-26 13:56:36 +05:30
Jeykumar Sankaran
71e597c7e8 hwc: Map dirtyRect to layer destination before using.
DirtyRect for a layer is generated w.r.t to its buffer
coordinates. It needs to be mapped for layer destination
(display) coordinates before using it to calculate the frame's
ROI.

Change-Id: Id86f495b2016da2cfd5aed4d86bff6d3035abf10
2014-05-15 09:28:08 -07:00
Jeykumar Sankaran
6c7eeac178 hwc: Extend partial frame update for split displays
Extends partial frame update support for split displays by calculating
changing region(ROI) independently for each half of the screen. In case of
only one half updating, display driver shuts down the DSI/MDP mixer control
of the non updating half.

Maintains two ROI's for each display. In case of Non-split
displays, only left ROI is updated.

Change-Id: I8a67fe40aac665a48b6f8a46beffb9f8027851b2
2014-05-14 17:45:24 -07:00
Saurabh Shah
25c04d3869 hwc: Fix tearing with RGB layer rotation
Pass the acquire fence count to driver on a buffer sync ioctl call
for the rotator. The count is always 1 since the ioctl is called
once per rotator session. This also means that the rotator has to
wait for only 1 layer always.

The earlier assumption that in the presence of a session id, the
acquire count would be NOP, does not seem to hold with the driver.

Change-Id: I986a436194c66e8ce2a2afb363627f72dc6e20cd
2014-05-06 11:19:25 -07:00
Linux Build Service Account
fc7340b821 Merge "HWC: Update DisplayFrame of all layers properly in Dynamic FB" 2014-04-30 22:03:41 -07:00
Linux Build Service Account
64e1ce83b7 Merge "hwc: Add target specific checks in hwcomposer" 2014-04-28 22:26:59 -07:00
Dileep Kumar Reddi
e351d84ca0 HWC: Update DisplayFrame of all layers properly in Dynamic FB
Use change in HWC_GEOMETRY_CHANGED flag appropriately to avoid
redundant and unintentional overwrites of DisplayFrame values,
which may result fall back to GPU.

Change-Id: Ifb0f8dc5d356c965b6e80644f32392c460fb1ae7
2014-04-25 17:48:51 +05:30
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
Jeykumar Sankaran
7c85238f0c hwc: Use layer dirty rect to calculate frame's updating ROI
Use layer dirty rect instead of display frame to calculate frame's ROI.

Change-Id: If5fe93da7815efdf9b44ed683a4d80b397921cf1
2014-04-24 10:43:02 -07:00
Linux Build Service Account
597c23c216 Merge "HWC/Copybit :: Add swap rect feature in HAL for MDP3" 2014-04-22 06:37:15 -07:00
Linux Build Service Account
202d15e854 Merge "hwc: Set DMA state at the start of composition" 2014-04-21 18:32:33 -07:00
Raj Kamal
794c36f370 hwc: Set DMA state at the start of composition
* Set DMA state at the start of the composition cycle
based on the following.

Set it to LINE_MODE if the number of active rotator
sessions are 0.

Set it to BLOCK_MODE if
** A yuv-layer for any display-device requires rotation
** (or) mExtOrientation is set
** (or) mBufferMirrorMode is set

* Separate out the reset helper function into more
modular ones

Change-Id: I6a22ac4379565cd1fd2d875a7a417f4ed3ee0f1e
2014-04-21 13:37:55 +05:30
Ramakant Singh
21cec725af HWC/Copybit :: Add swap rect feature in HAL for MDP3
We brings all swap rect level checks in HAL from surfaceflinger
for MDP3.
swap rect kicks in case of
1 Only one layer is updating.
2 No overlaypping layers.
3.Both src and dst has same value.(no scaling)
4.No video layer

Change-Id: I881958994e80b53d4969beaaf51518b727a8de78
2014-04-19 19:04:41 +05:30
Linux Build Service Account
38ef977bad Merge "Display and wfd synchronization during teardown" 2014-04-17 03:52:54 -07:00
Raj kamal
59fea567e1 Display and wfd synchronization during teardown
* Provide a binder interface call for wfd module
to inform display about the start/stop/pause/resume
of wfd session.

* This is needed for wfd-hdmi synchronization in
case of v4l2 wfd solution. If hdmi is plugged
in during v4l2 wfd session, display-hal waits in
uevent thread for wfd teardown notification from
wfd module, before going ahead with configuring
external display.

* For VDS WFD solution, display-hal waits in uevent
thread for wfd-teardown to be signalled from
the composition thread.

Change-Id: I9514cb5bc7ff81de0b5dd4cdf66d8286a64ba094
2014-04-15 14:15:59 +05:30
Linux Build Service Account
8118d4b5b9 Merge "hwc: Display view frame needs to be set before using it." 2014-04-10 19:52:32 -07:00
Sushil Chauhan
f68d0dfdbf hwc: Display view frame needs to be set before using it.
The display view frame needs to be set before calling trimLayer api
because it uses view frame to find the scissor for display, which is
used to clip crop for out-of-bounds display frame sent by framework.
If mViewFrame is not set, scissor will be empty rect, which leads to
wrong source crop calculation.

Change-Id: I52ad4eb9037d34aff24c30fe65e3793684445264
2014-04-09 10:17:18 -07:00
Saurabh Shah
74eff4debf hwc: featurize using QCOM_BSP
- Use QCOM_BSP for HWC_BLIT and GPUHint features
- These are not avaliable on all platforms

Change-Id: Ied0c60246093c868ac708f2f8897f08cec1e8878
2014-04-09 10:08:09 -07:00
Saurabh Shah
39240c9124 hwc: Add rotator obj to layer-rot-map if acquired
Add rotator obj to the layer-rot-map soon after its successfully
acquired. This makes sure that any object allocated is accounted
for, irrespective of whether rotator configuration succeeds or not.

Change-Id: I94102d9c607cf61b2eccdf7f2445bb07d309d35c
2014-03-31 10:31:42 -07:00
Linux Build Service Account
d36d04a2dc Merge "hwc: Use proper typecasts" 2014-03-28 23:49:57 -07:00
Linux Build Service Account
a6582e76af Merge "h/q/d: Invoke padding when DMA is not availble for ext rotator" 2014-03-28 14:09:15 -07:00
Praveena Pachipulusu
d9443c7e81 hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts

Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
2014-03-28 09:17:43 +05:30