Commit Graph

732 Commits

Author SHA1 Message Date
Vara Reddy
7e86c13d25 drm/msm/dsi: allocate current mode memory early for DMS
There can be a scenario where dynamic mode set can come
for first commit also, allocate memory for current mode
before checking for DMS.

Change-Id: Ief856a372629112380f199bc336160b3fa278eef
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-10-18 13:49:45 -07:00
Vara Reddy
45ad6294fe drm/msm/dsi: fix panel physical dimensions updated to connector
Change overrides the panel physical dimensions with correct
value upto a precision of millimeter, which was getting
truncated to centimeter as drm structures maintain it in
centimeters.

Change-Id: I035357596ed42154b657b791846aee6f940f2e53
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-10-18 13:49:41 -07:00
Jayaprakash
aad3dd4525 disp: msm: sde: update avr mode config during commit prepare
Add changes to support avr mode config update during
prepare commit which happens before gpu fence wait
for the input buffers.

Change-Id: Ib2cb5b7e1f10501914c003f6cf066b85048f79d4
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-18 12:53:56 +05:30
Jayaprakash
985ffddc71 disp: msm: sde: add one-shot qsync mode support
Add support to enable one-shot mode during qsync
update. This feature ensures the frame drops can be
reduced due to delayed software flush for the
current commit. Also, add changes to disable the qsync
feature post commit.

Change-Id: Icb158853f52284bcf8fa641e5f62200c5460b660
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-18 12:53:17 +05:30
Jayaprakash
97f10bf143 disp: msm: sde: update wr_ptr_success state post wait
Update the wr_ptr_success state to avoid waiting for
two frames pp_done_tx_irq. It ensures frame done callback
is triggered, if IRQ's are disabled for long time by
some external entity.

Change-Id: I9ee72bd65dd7251bf8db0b6843fad02b675935bc
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-17 18:40:26 +05:30
Jayaprakash
ad40a300a1 disp: msm: sde: allow qsync support along with VRR
Allow Qsync and VRR features to be supported independently
by display driver. Restrict the feature availability in
same composition cycle.

Change-Id: I696eb72a2b4f9451e142ffdc5acccc8987c36b6d
Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-10-17 17:07:33 +05:30
qctecmdr
4fbdc64598 Merge "drm/msm/dsi: add flag for mode switch with fps" 2019-10-16 07:19:40 -07:00
Linux Build Service Account
583633fe3d Merge "disp: msm: dp: reset combo phy if peer_usb_comm is disabled" into display-kernel.lnx.4.19 2019-10-15 21:04:42 -07:00
qctecmdr
0a9855fc8f Merge "drm/msm/dsi-staging: use usleep_range instead of msleep in dsi enable" 2019-10-15 11:35:53 -07:00
Veera Sundaram Sankaran
e167ae786c disp: msm: sde: fix handling the missing pp-done interrupt cases
With posted-start, ctl scheduler status and pending-kickoff
count are checked to address the missing pp-done interrupt
cases, which can occur if the IRQs are disabled for a long
time by some entity. Currently this check is done after
the wr-ptr-irq. At this point the scheduler status may
or may not be idle, based on the frame-transfer. Move this
handling after the timeout, so the scheduler is guaranteed
to be in idle state for working use-case.

Change-Id: I3fa9ecce8139ff667c1882e286571169c543c797
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-10-15 11:31:19 -07:00
qctecmdr
6454dcf906 Merge "Revert "disp: msm: sde: Add LTM sw fuse check support"" 2019-10-14 21:42:50 -07:00
Vara Reddy
6a574a6e3c drm/msm/dsi: add flag for mode switch with fps
Change adds flag to identify dynamic mode switch with same
resolution and different fps. Block sending PPS command
if we hit this scenario, this optimizes mode switch time.

Change-Id: If5c86084cde641952fe294b512e937cfd1bb5479
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-10-14 11:13:41 -07:00
Sankeerth Billakanti
fb9ea90d58 disp: msm: dp: reset combo phy if peer_usb_comm is disabled
Some Type-C multi-port adapters which do not support usb connection
are advertising the multi-functionality in DP alt mode. If
multi-functionality is preferred, the DP driver assumes the adapter
supports usb connection and USB phy driver will program the PHY mode
to DP+USB.

In source mode, usb PD driver checks for the peer_usb_connection
of the adapter. If it does not support usb then it will stop usb stack
and update the PHY MODE to USB only mode from phy_suspend path.
The result is, usb may program the combo PHY to usb only mode when DP
is already connected. This is causing AUX read/write timeouts when DP
is trying to access the phy registers.

To fix this issue, a flag in SVID connect handler in usbpd driver to
notify peer_usb_comm support to the DP driver. DP driver will read this
flag and program the phy mode.

Change-Id: I0164b239bf2832d480795d90f5e9fc221bcc12ba
Signed-off-by: Sankeerth Billakanti <sbillaka@codeaurora.org>
2019-10-14 10:42:57 -07:00
qctecmdr
1643b63bd7 Merge "disp: msm: sde: add support to handle mdp limits property" 2019-10-11 16:21:26 -07:00
qctecmdr
c86ac57d9e Merge "drm/msm/dsi-staging: update mdp transfer time preference" 2019-10-11 14:21:11 -07:00
qctecmdr
60210da084 Merge "disp: msm: dp: Check if DP version supports FEC and DSC" 2019-10-11 12:10:08 -07:00
qctecmdr
762d8f7aea Merge "disp: msm: sde: add spinlocks to handle_frame_done call" 2019-10-11 07:56:27 -07:00
Ramkumar Radhakrishnan
664d297f98 Revert "disp: msm: sde: Add LTM sw fuse check support"
Reverting the change to check for LTM SW fuse to install LTM properties
during probe since LTM SW fuse is enabled later.

This reverts commit 652b195ba4.

Change-Id: I19b3e04ff7caaad5de896fbcf433c3b1863ac4f9
Signed-off-by: Ramkumar Radhakrishnan <ramkumar@codeaurora.org>
2019-10-10 14:14:43 -07:00
Fuad Hossain
126ce89ad6 disp: msm: dp: Check if DP version supports FEC and DSC
FEC and DSC are only supported in DP 1.4 onwards.
Read FEC and DSC capabilities only if this
requirement is met. This will ensure backwards
compatibility with older DP devices.

CRs-Fixed: 2541795
Change-Id: I65a6cb903f332e896946dc3b9da4d95a14fac939
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-10-09 16:31:53 -04:00
Krishna Manikandan
a4c2827a47 disp: msm: sde: add support to handle mdp limits property
Add support to handle mdp limits property which
can be used to represent maximum possible limit
for different usecases like sspp linewidth,
bandwidth limit etc. Each child node can be
used to describe each property.

Change-Id: I4b0645201fa29bba1a083e2df4733bec07f0dd96
Signed-off-by: Krishna Manikandan <mkrishn@codeaurora.org>
2019-10-09 11:06:52 +05:30
Fuad Hossain
f3aa71a5e6 disp: msm: dp: Ensure sink supports DSC decoding of selected BPC
The sink may have limited DSC decoding support
for some BPC values. Ensure that the BPC that is
selected is within the sink's DSC capabilities.

CRs-Fixed: 2527660
Change-Id: I0692e7b606e258c3cab3de25d3b03178f4aa0294
Signed-off-by: Fuad Hossain <fhossain@codeaurora.org>
2019-10-08 14:37:38 -07:00
Nilaan Gunabalachandran
47b493a29a disp: msm: sde: add spinlocks to handle_frame_done call
By adding spin locks around the handle frame done, a race
condition, between the wait for idle of one frame, and the pp
done of the next frame, is mitigated.

Change-Id: I78650fc9688b22db6d314b9bed023e0ddad20dbf
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-10-08 11:44:03 -04:00
qctecmdr
cc1226edbc Merge "drm: msm: add support for ltm off event" 2019-10-08 07:26:38 -07:00
qctecmdr
d8e9978b94 Merge "disp: msm: sde: wait for lp2 and pm_suspend frame trigger" 2019-10-05 13:54:05 -07:00
qctecmdr
7482a80390 Merge "disp: msm: sde: update max display resolution with scale config" 2019-10-04 19:20:22 -07:00
qctecmdr
ca2e8c399a Merge "disp: msm: sde: switch to WD vsync on unexpected panel jitter" 2019-10-04 13:05:55 -07:00
Dhaval Patel
96d5b9646d disp: msm: sde: wait for lp2 and pm_suspend frame trigger
PM_SUSPEND API adds extra pm_runtime refcount and calls
the device driver for pm_suspend. At this point display
device may not be in power collapse state. This patch
makes sure that crtc_commit thread is idle and triggers
power collapse also.

Change-Id: Ia21d6a6b6fd32caeb9d16fa5cf998b91ef990e01
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-10-04 09:31:09 -07:00
Dhaval Patel
13a274c947 disp: msm: sde: update max display resolution with scale config
Update max display resolution based on scale ratio support
when decimation support is not present.

Change-Id: If9a87a12c830a700f839fdf47f929e575b66d318
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2019-10-03 11:30:28 -07:00
qctecmdr
63fc5353ad Merge "disp: msm: sde: Init ltm_buf_busy list head before adding new node" 2019-10-02 22:49:09 -07:00
Gopikrishnaiah Anandan
097da1a65c drm: msm: add support for ltm off event
Clients of local tone mapping engine need to know when hardware block
was turned off, to enable mutually exclusively display features.
Change adds support for ltm off event notification via custom event
interface of drm.

Change-Id: Ibfe2f85eadb0b939deee56194387b51b1e5ca8b9
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2019-10-01 14:03:49 -07:00
Veera Sundaram Sankaran
fb54f6e6e7 disp: msm: sde: switch to WD vsync on unexpected panel jitter
Switch to watchdog vsync whenever panel jitter is
identified during frame-transfer on command mode display.
This would allow the HW to finish processing the frame
with watchdog vsync source. Switch back to default vsync
source after the frame-transfer is complete. This would
help in the MDP hang issues in panels that generate TEs
with thresholds greater than the projected jitter.

Change-Id: Ic3fa78d90e7f44cb0186857716ac27e72505fd32
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2019-10-01 13:32:42 -07:00
Vara Reddy
b712eb76c9 drm/msm/dsi-staging: update mdp transfer time preference
With this change, mdp transfer time updated to userspace
will be the preferred dtsi entry, when both dsi clock
and mdp transfer time nodes are set.

Change-Id: I37cd55e3d6f3f0f78f4ca4bddf921f6cf743c1b9
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-10-01 11:31:30 -07:00
qctecmdr
9e60a4854b Merge "disp: msm: sde: add null check for pingpong hw block" 2019-09-30 13:12:15 -07:00
qctecmdr
35048b5165 Merge "drm/msm/sde: Fix UBSan warnings in sde" 2019-09-27 02:06:17 -07:00
Jayaprakash
7ba937c3ea disp: msm: sde: add null check for pingpong hw block
Add null check before accessing pingpong hw block
allocated during mode set to physical encoder.

Change-Id: Ic464e7c7087f280b1198f6b7485bc0763322c532
Signed-off-by: Jayaprakash <jmadiset@codeaurora.org>
2019-09-27 14:17:20 +05:30
qctecmdr
f96023f963 Merge "disp: msm: dsi: Set OLED reugalor mode when exit LP1" 2019-09-26 06:35:28 -07:00
qctecmdr
8dab90d54d Merge "disp: msm: config AB/IBB power when AOD mode enter/exit" 2019-09-26 04:35:18 -07:00
qctecmdr
ccffe7be5f Merge "disp: msm: Set the dsi panel type" 2019-09-26 02:22:44 -07:00
qctecmdr
19e23cd72e Merge "disp: msm: only set nolp command when panel in LP1/LP2 mode" 2019-09-26 00:23:18 -07:00
qctecmdr
09a3f6c0b3 Merge "disp: msm: dsi: add null check for panel and proper ctrl iteration" 2019-09-25 09:06:27 -07:00
Samantha Tran
70a1445d18 disp: msm: dsi: add null check for panel and proper ctrl iteration
This change moves the panel null check to the beginning of the function
so panel can be used throughout the function. This change also replaces
looping through display ctrls with proper display_for_each_ctrl.

Change-Id: I0014ee7ad6d8514734f9233a1abb314e60d29b5f
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2019-09-24 12:56:50 -07:00
Vara Reddy
4534e1912d drm/msm/dsi-staging: use usleep_range instead of msleep in dsi enable
Use usleep_range api instead of msleep in dsi enable path to
improve accuracy, which improves bootup time.

Change-Id: I5d00d666bfacddea58b824267eb0eb39b5b2641c
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2019-09-24 11:51:57 -07:00
Nilaan Gunabalachandran
d5e0182a1e disp: msm: sde: add pending flush for merge3d
While disabling merge3d block, pending flush mask
needs to be set for merge3d.

Change-Id: Ic7baea278ac62ac1203aad8a33c40874704c85a1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2019-09-24 09:57:19 -04:00
Yuan Zhao
3b554d4fba disp: msm: dsi: Set OLED reugalor mode when exit LP1
When panel exits LP1, need to set OLED power mode.

Change-Id: I045777a0dce941e45b71bc74c7b2908b24df3396
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-09-24 01:26:36 -07:00
Yuan Zhao
2da9889075 disp: msm: config AB/IBB power when AOD mode enter/exit
ELVDD/ELVSS has a dip during AMODE panel AOD exit hand-off.
According to PMIC team's suggestion, need to config the AB/IBB power
to REGULATOR_MODE_IDLE/REGULATOR_MODE_NORMAL to fix dips.

Change-Id: Ia5cbd4d698de262e02a660f670865c03dda1e04a
Signed-off-by: Wenjun Zhang <wjzhan@codeaurora.org>
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-09-24 01:26:31 -07:00
Yuan Zhao
bb2f60b35c disp: msm: Set the dsi panel type
Parse the DTS panel type settings. Consider the default
panel physical type as LCD. We need to set OLED in DTS if
the panel is an OLED type.

Change-Id: Ib53651ab3861e75bf061f38d60a2f6135c1f537d
Signed-off-by: Wenjun Zhang <wjzhan@codeaurora.org>
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-09-24 01:26:23 -07:00
Yuan Zhao
f2873cd69f disp: msm: only set nolp command when panel in LP1/LP2 mode
DSI driver sends nolp commands when DSI connector power
modes is set SDE_MODE_DPMS_ON or SDE_MODE_DPMS_OFF. This
is invalid panel configuration. It should only send nolp
commmand to panel when it is in LP1/LP2 mode.

Change-Id: Ie94eaef6899d292fd20f42c1b7ef2c7a99178d13
Signed-off-by: Wenjun Zhang <wjzhan@codeaurora.org>
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2019-09-24 01:23:41 -07:00
qctecmdr
daf414d4cf Merge "makefile: add Bengal config support for display techpack" 2019-09-21 09:49:57 -07:00
qctecmdr
1f35fd007a Merge "disp: msm: update topology based on clock requirement" 2019-09-21 03:22:17 -07:00
Ping Li
606df33423 disp: msm: sde: Init ltm_buf_busy list head before adding new node
Init ltm_buf_busy list head before adding new node to avoid
list_add corruption.

Change-Id: Ic90f82c929150640bc12d4f31cf7115879f92037
Signed-off-by: Ping Li <pingli@codeaurora.org>
2019-09-20 16:49:03 -07:00