Commit Graph

3903 Commits

Author SHA1 Message Date
Uday Kiran Pichika
71f5daa4ea hwc2: Fix Copyright License.
CRs-Fixed: 2123718
Change-Id: I827a4a4e0f5abb20890af18d37167516609cdf77
2017-10-10 12:03:35 +05:30
Namit Solanki
24921ab88a sdm: Add support for destination scalar in drm.
1) Add DRMOps for destination scalar.
2) Pass destination scalar data to DRM driver.
3) Add Scalar LUTs to CRTC during Init()
4) Disable PU when DS is enabled.

Change-Id: I5450b02c16e6d162fb0069c924dc2c9877834093
Crs-fixed: 2063894
2017-10-09 03:11:45 -07:00
Anjaneya Prasad Musunuri
e8c67f226d sdm: Implement idle fallback support in DRM.
Add CRTC property to set idle timeout. Enhance DRM event
handler for idle fall back custom event registration and
event handling

CRs-Fixed: 2097588

Change-Id: I543286a59a4ae95bc32b25960d1fc43551391951
2017-10-09 13:52:27 +05:30
Anjaneya Prasad Musunuri
322c97752b sdm: Disable skip validate on Panel Dead event
- Disable skip validate on Panel Dead event.
- Register to panel dead event only if supported.

CRs-Fixed: 2122298

Change-Id: I1380eaf6899f0733ed1ba8a69eb6ee797de24bd5
2017-10-09 00:32:10 -07:00
Anjaneya Prasad Musunuri
a493dd7667 sdm: Implement ESD recovery support in DRM
Enhance DRM event handler for ESD recovery custom event
registration and event handling. Implement panel reset
sequence for recovery during ESD event.

CRs-Fixed: 2121052

Change-Id: I688393065c1084f74417ba913b8d431ce7749fb5
2017-10-09 00:31:54 -07:00
Ramkumar Radhakrishnan
0dc25f3f63 sdm: Set crtc mode on every validate/commit.
Change of display mode does not take effect as atomic request pointer
is being recreated on every validate/commit which resets crtc mode.
Set CRTC mode on every validate/commit to fix it.

Change-Id: Iab1fd6b12addf05116f68b54162cdb55e8197ef1
CRs-Fixed: 2105316
2017-10-07 21:27:37 -07:00
Linux Build Service Account
7e26d5d171 Merge "hwc2: Fix NULL pointer dereference and out of bound access" 2017-10-07 03:42:13 -07:00
Linux Build Service Account
b850ac7b5c Merge "gralloc1: Check input addresses for null" 2017-10-07 03:42:10 -07:00
Linux Build Service Account
84c58e6e5a Merge "sdm: Add support for compliance test mode for DP" 2017-10-07 03:42:10 -07:00
Linux Build Service Account
530535bdf3 Merge "hwc: Fix locking on event handling and validation state" 2017-10-07 03:42:09 -07:00
Naseer Ahmed
34b341d904 hwc2: Skip validation fixes
* Disable skip validation for solid fill during calibration.
* Require validation when the client changes the composition type

CRs-Fixed: 2122072
Change-Id: I9ded200e5c15701f653c73d67c18c41de8278d52
2017-10-05 19:04:23 -04:00
Rohit Kulkarni
6a34015b1c hwc2: Validate input parcel values for few qclient methods
Validate values read from input parcel as part of handling of
few qclient methods

Change-Id: Icf928f409a5c2ac76a73e95de58cb0ebc59d24d5
CRs-Fixed: 2114346
2017-10-05 11:08:22 -07:00
Ramkumar Radhakrishnan
82af7e98d4 hwc2: Fix NULL pointer dereference and out of bound access
Change-Id: Ib7a2ce818b1e6f5203f03138a95b2754ff446127
CRs-Fixed: 2114346
2017-10-05 10:54:22 -07:00
Ramakant Singh
fae5989ff0 sdm: Add support for compliance test mode for DP
1. Add functionality in qdutils to get the DP test config from the
   sysfs node.
2. Add support to generate ColorRamp, ColorSquare and Black and White
   vertical line test pattern for 18/24/30 bpp DP display
3. Create layer stack with test layer and ignore all layers from
   the SF framework.
4. Generate the pattern with 18/24/30 bpp based on pattern type
   and bpp read from sysfs node and send it to DP interface.
5. Add support to calculate CRC to validate the color
   pattern.
CRs-Fixed: 1107663
Change-Id: I49469d94a96ada729d24d7cc03a7e79f2af6edc0
2017-10-05 01:18:36 -07:00
Rajesh Yadav
99535ac9e4 sdm: drm: Add pa memcolor features support
Add dspp pa memcolor features support to hw_color_mgr for drm.

Change-Id: I35cd71e43569c0c731774a88ae8a926be3473986
2017-10-05 12:42:26 +05:30
Rajesh Yadav
74eafc97fb sdm: drm: Add pa sixzone feature support
Add dspp pa sixzone feature support to hw_color_mgr for drm.

Change-Id: Ib2f04aeb8c10724a1bcb38e836c24938a16c6cc7
2017-10-05 12:40:41 +05:30
Rajesh Yadav
d30b0ccdd6 sdm: drm: Add pa hsic feature support
Add dspp pa hsic feature support to hw_color_mgr for drm.

Change-Id: I4525ddd80f82ee73bed57dac04cccd353281df46
2017-10-05 12:39:04 +05:30
Anjaneya Prasad Musunuri
cbefdc4366 sdm: Add support for dynamic fps in DRM.
Get min and max fps from supported modes. Set refresh
rate through DRM mode.

CRs-Fixed: 2061747

Change-Id: I5785491b2ff8919b7230479d349ed858551151d3
2017-10-04 22:47:26 -07:00
Linux Build Service Account
40853a8793 Merge "gralloc1: update aligned size of buffer in native handle" 2017-10-04 18:26:25 -07:00
Linux Build Service Account
92071d65e2 Merge "sdm: Refactor GetClientTargetSupport API" 2017-10-04 18:26:23 -07:00
Rohit Kulkarni
511602d899 gralloc1: Check input parameters for null addresses
Check input parameters for null addresses for few interface
methods.

Change-Id: If5ec3cf8edde5c97730e0a64e0f38536245ff29b
CRs-Fixed: 2114346
2017-10-04 17:29:37 -07:00
Sushil Chauhan
36a10f93e3 hwc2: Fix the non-secure WriteBack output use case
If Output buffer of Virtual Display is non-secure, set SKIP flag on the
secure layers because if SDE H/W access the non-secure WriteBack output
buffer from secure context, it will result in SMMU fault.

CRs-Fixed: 2115027
Change-Id: I9577f244b62a987cab99168b756ac6f6ff379ba6
2017-10-04 11:10:32 -07:00
Ch Ganesh Kumar
b3a2b9d84b sdm:fb: update cdm csc_type during HDR playback
The CSC matrix used in CDM block should be updated to
BT2020 format from default value during HDR playback.

CRs-Fixed: 2115066
Change-Id: I358608e68cdd2553a168e4bfc2bfdc968a0945ec
2017-10-04 12:24:27 +05:30
Ch Ganesh Kumar
760cd9706a sdm: fb: Reset HDR metadata at the end of HDR playback
Reset HDR metadata to zero at the end of HDR playback.
This is needed as per the HDMI specification to allow the sink
to transition to traditional gamma from HDR mode.

Change-Id: I173e761b7f7a40be3bceb51a04618d3169fdb369
2017-10-04 12:04:43 +05:30
Saurabh Shah
6e4b37640a gralloc1: Check input addresses for null
Change-Id: Iddfcc07e50d3503a69b3604e5bd7f025f2b20534
CRs-Fixed: 2114346
2017-10-03 14:33:09 -07:00
Saurabh Shah
a307e8c648 hwc: Fix locking on event handling and validation state
Fix a small gap in locking on event handling where validation
state was reset after lock scope was over. Also validation state
was being reset for all displays even if event was for primary.
This is incorrect since lock was only held for primary. Move
validation state reset to be per display

Change-Id: I24a8930d536a906d2b8adba35833774c03b59933
CRs-fixed: 1114808
2017-10-02 17:25:55 -07:00
Linux Build Service Account
ddb2218d71 Merge "hwc2: Add support for Secure Display" 2017-10-02 12:18:04 -07:00
Linux Build Service Account
87ce4f1a99 Merge "hwc2: Use GRALLOC1_PFN_ALLOCATE to allocate buffer" 2017-10-02 12:18:02 -07:00
Linux Build Service Account
8bd05224fd Merge "sdm: Fix Doze/Doze Suspend" 2017-10-02 12:17:50 -07:00
Ramkumar Radhakrishnan
4f12b50bf0 hwc2: Use GRALLOC1_PFN_ALLOCATE to allocate buffer
1. Define gralloc1 function pointers needed to allocate buffer
2. Use the gralloc1 function pointers to allocate buffer instead of
   perform function to avoid any synchronization issues.
3. Remove functionality to allocate buffer from perform function

Change-Id: If686181409a179d3d911dfbd0f0c0eab7a7ffa99
CRs-Fixed: 2115331
2017-09-26 15:29:47 -07:00
Nirmal Abraham
6f3dcf80f0 gralloc1: update aligned size of buffer in native handle
During buffer allocation, the aligned size of the buffer should
be updated in newly allocated native handle (private_handle_t)
before returning the native handle to the caller. Secure
playback has strict requirement like 1M aligned size, so
secure playback fails if the aligned size of buffer is not
updated in handle before returning to the caller.

Change-Id: I8d8da13048b8423c07ebb3a3923fb331e06e3db1
2017-09-25 23:48:42 -07:00
Ramakant Singh
46a1bee9ab hwc2: Add support for Secure Display
- Support handling secure display in HWC
- Issue NULL commit on primary display when secure display session
  starts and ends.

Change-Id: I95a8caaf1366c1d9384843d382244e1555dd6ad2
2017-09-25 23:36:24 -07:00
Saurabh Shah
a917aa7d95 sdm: Fix Doze/Doze Suspend
Doze should have a synchronous commit. Doze suspend is missing a
CRTC activation and commit. Add support to retain previously staged
planes by client, since it may not be able to program again in some
situations like Doze and Doze-Suspend. Also retain planes on resume
since it can happen after Doze and Doze-Suspend that may have planes
staged.

Change-Id: Ibb65da16e893a9ae33fd30d19308779ee8687258
CRs-fixed: 2106183
2017-09-25 16:59:10 -07:00
Prabhanjan Kandula
63a613f704 hqd: add qservice binder for blocking dpps
Dpps should wait opening driver before composer comes up.
Add a wservice binder call to query composer init status.
Add util function to block dpps until composer is up.

Change-Id: I82c025011e23a0b159ef2449b00b868a365d681a
CRs-fixed: 2102579
2017-09-25 16:02:16 -07:00
Prabhanjan Kandula
6e9d70aba9 sdm: Validate connector modes again
Mode index validation required each time when we get
connecotor info as hotplug disconnect can clear the
modes listed on crtc.

Change-Id: Ibe3f64e8ceb5e3cb11c56f06256c7e71eb5ec220
CRs-fixed: 2110309
2017-09-25 12:49:17 -07:00
Linux Build Service Account
82f1bc5e98 Merge "hwc: Push a dummy -1 release fence in case of flush" 2017-09-25 06:07:40 -07:00
Linux Build Service Account
5a83cd9c6c Merge "sdm: Handle commit failure from comp manager correctly" 2017-09-25 06:07:38 -07:00
Rajavenu Kyatham
c79fceb8e1 sdm: Refactor GetClientTargetSupport API
- Validate GetClientTargetSupport against
  hardware capabilities.

Change-Id: Iae46254f9bcc45ca42879710e1ec4a41e593af57
CRs-Fixed: 2096611
2017-09-20 22:34:50 -07:00
Linux Build Service Account
35ae54fe58 Merge "sdm: Handle idle fall back and idle power collapse with same event" 2017-09-20 10:30:55 -07:00
Linux Build Service Account
6930abfcf7 Merge "sdm: Add size for 13x13x13 gamut mode support" 2017-09-20 10:30:53 -07:00
Linux Build Service Account
ea5a3b9125 Merge "sdm: drm: Fix h_blanking accounting in SDM" 2017-09-20 10:30:43 -07:00
Saurabh Shah
42c8d9184c hwc: Push a dummy -1 release fence in case of flush
In case of flush no release fence is pushed to hwc_layer queue and
no error is returned to f/w, so it could end up requesting release
fences. In such a case the queue can be emptied and from the next
valid cycle we end up giving the same cycle's release fence back.
Push a dummy -1 fence to avoid this.

Change-Id: I1330d0b47a23df3203c06cc23aa4b6b4a6fe669e
CRs-fixed: 1114808
2017-09-18 13:49:40 -07:00
Linux Build Service Account
6d0d10522b Merge "sdm:drm: Fix vector initialization." 2017-09-15 04:19:07 -07:00
Anjaneya Prasad Musunuri
79ccd855c8 sdm: Handle idle fall back and idle power collapse with same event
Driver uses same event to trigger idle fall back on video mode panels
and idle power collapse on command mode panels. Handle both with same
event at HAL event handler.

Skip validate should be reset during idle power collapse event.

CRs-Fixed: 2110497

Change-Id: Ie3a0195c4375aebd79e8c7daef7131579bceda9f
2017-09-15 14:57:35 +05:30
Saurabh Shah
864304d851 hwc: Add sequence lock to driver event handling
Driver events could happen between or during Validate/Present cycles
causing synchronization issues. Add sequence lock to driver event
handling to make sure they are serialized.

Change-Id: I98d6613012251e3de428e8d3ef8b89e7f5a7e40c
CRs-fixed: 1114808
2017-09-14 15:22:17 -07:00
Sushil Chauhan
36568365ff sdm: drm: Fix h_blanking accounting in SDM
DRM driver provides the total h_blanking for the display. So, on a
display with dual DSI panels, DRM driver has already accounted for
both panels, hence SDM should not account for h_blanking per panel.

CRs-Fixed: 2092799
Change-Id: I621cf6de225a3caeb5f5c93d1e7c6b47e86a2fa2
2017-09-14 11:05:27 -07:00
Saurabh Shah
c5c687ab7c HWC: Granular locking
Revert "hwc2: Allow non-atomic execution of validate and present apis"
This reverts commit 6c26ba9560.

Add per display granular locking in HWC to align with the Validate,
Present call sequence from SF, that happens independently for each
display and possibly on different threads.

Change-Id: Ia092d7f6e6dc26ad22286a93de7b663e8bdf23d0
CRs-fixed: 2095334
2017-09-13 23:32:44 -07:00
Linux Build Service Account
d2c806d8c9 Merge "sdm: Rework hdr mode setting based on blend color space" 2017-09-13 08:46:23 -07:00
Linux Build Service Account
49b5d75abf Merge "sdm: Fix CPU hint toggling issue" 2017-09-12 18:26:56 -07:00
Linux Build Service Account
f9c0e1df7e Merge "sdm: Check for valid fd and event before calling handlers" 2017-09-12 18:26:55 -07:00