Commit Graph

638 Commits

Author SHA1 Message Date
Varsha Suresh
36ba8cc716 msm: disp: Add bazel build support for display-drivers
-Add support to display-drivers modules using DDK framework for pineapple.
-Add macro that makes it easy to register new modules.

Change-Id: Id9cc0f367cff5b95b526fb42193471b3f3abd012
Signed-off-by: Varsha Suresh <quic_varssure@quicinc.com>
2023-04-06 18:07:03 -07:00
qctecmdr
3049c6a494 Merge "disp: msm: dsi: Reset DMA trigger mux when initializing DSI_TRIG_CTRL" 2023-03-31 07:39:36 -07:00
Kashish Jain
5aa0cba2a3 disp: msm: dsi: Reset DMA trigger mux when initializing DSI_TRIG_CTRL
When broadcast command is sent with command DMA window scheduling enabled,
DSI_TRIG_CTRL.COMMAND_MODE_DMA_TRG_MUX does not get reset after command
transfer. Due to this next unicast command on slave fails.
This change resets DMA trigger mux during DSI_TRIG_CTRL initialization.

Change-Id: I74503d82ab1cb6ca4d61a9d14f2b3cd2c3936ea7
Signed-off-by: Kashish Jain <quic_kashjain@quicinc.com>
2023-03-23 11:48:49 -07:00
Rajeev Nandan
2b15aded33 disp: msm: dsi: Fix DMA window scheduling programming
In DMA start window scheduling, TRIG_CTRL.COMMAND_MODE_DMA_TRIGGER_SEL
is programmed to SW + DMA start window trigger. But if DMS switch
comes after command is scheduled, COMMAND_MODE_DMA_TRIGGER_SEL gets
reprogrammed to SW trigger leading to command transfer failure.

Program the COMMAND_MODE_DMA_TRIGGER_SEL only from the CMD DMA Tx path.

Change-Id: I01062497bb70aa5fdcb25be3715c7cbc4c68b681
Signed-off-by: Ritesh Kumar <quic_riteshk@quicinc.com>
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
2023-03-23 18:29:00 +00:00
Yu Wu
567ad34910 disp: msm: restore dynamic bit clock front porches
Restore dynamic bit clock front porches.

Change-Id: If0edb93bd1200c1a2cba0d972770ab219be6e2a4
Signed-off-by: Yu Wu <quic_zwy@quicinc.com>
2023-03-22 16:51:43 +08:00
Veera Sundaram Sankaran
2e3ba9430c disp: msm: expose qsync avr step as part of conn mode caps
Add capability to read avr step for each timing mode. This will
be in addition to the existing avr-step-list which is defined
when dfps is enabled. Expose the avr-step as part of each
mode in connector caps to user-mode.
Additionally, change the avr_step connector property to enum
to give usermode just the capability to enable/disable avr-step
and not alter the step value as its fixed from the device tree.

Change-Id: I6d7f8e9fcf03f98abef7640fc741e5e1be8597a1
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2023-02-09 11:10:08 -08:00
qctecmdr
76cbb717c4 Merge "disp: msm: dsi: optimize wait time in DSI timing DB update" 2023-01-29 22:32:24 -08:00
Amine Najahi
d4a444a3d1 disp: msm: dsi: add DCS get scan line command
Add DCS command to read the panel scan line value and associated
time stamp in nano-seconds.

Change-Id: I06a76d3a6c5ad7a2e7681413c741e5b97b34d73f
Signed-off-by: Amine Najahi <quic_anajahi@quicinc.com>
2023-01-25 13:35:12 -08:00
Shamika Joshi
495a6a8731 disp: msm: dsi: optimize wait time in DSI timing DB update
Timing DB needs to be disabled after panel vnsyc.
Update the wait time to reflect difference in line time
between MDP and panel vsync.

Change-Id: Ib5282d67995e8379ead928218f31a8f9fe7fa978
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2023-01-18 13:11:13 -08:00
Alex Danila
b77d92fab3 disp: msm: dsi: remove PHY isolation support
DSI PHY isolation is unused and considered deprecated. Previous uses
were for power measurements and emulated platform support. Use on
emulated platforms has been supplanted by PHY PLL bypass.

Change-Id: I547681912ff82f0df09a1b98c671eac32c19412a
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2023-01-04 11:41:28 -05:00
Vara Reddy
8eff68bdf0 disp: msm: dsi: Use devm_pwm_get instead of devm_of_pwm_get
devm_of_pwm_get is deprecated and need to change
to devm_pwm_get.

Change-Id: Ibeee90261ff40dc50b6a5e40e583bee11a5b177c
Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-12-20 09:33:00 -08:00
Rajkumar Subbiah
6d5a850504 disp: msm: dsi: add support for phy/pll bypass
This change adds support for bypassing hw access in DSI PHY/PLL
drivers which enables the DSI driver to run on emulation
platforms that might be missing those modules.

Change-Id: I3e83155a79d60f2357606746214d776cefabd651
Signed-off-by: Rajkumar Subbiah <quic_rsubbia@quicinc.com>
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
Signed-off-by: Alex Danila <quic_eadanila@quicinc.com>
2022-12-06 07:25:12 -08:00
Srihitha Tangudu
6fb25a2f3d disp: msm: dsi: Correct minimum bit clk calculation for cphy cmd mode
For calculating bit rate in cphy, we multiply bit rate by a factor of
7/16 where 7 is the number of symbols and 16 is the bits per symbol.
But we are currently not considering the 7/16 factor while calculating
minimum bit clk value for command mode which is resulting in a smaller
bit rate value than the minimum bit clk.

Bit rate should always be greater than the minimum bit clk which otherwise
can lead to discrepancies. Correct minimum bit clk calculation for command
mode, by multiplying a factor of 7/16 if cphy.

Change-Id: I39b202dcafe60e2047549f84ff9388b46ae490a5
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-11-23 09:19:03 -08:00
Nilaan Gunabalachandran
275c881ae4 disp: msm: fix printk argument errors
This change fixes printk arguments in display driver which is
found with additional compilation flags and adds the compile
flags too.

Change-Id: Ic653591db49b49b9ce1ce04e7df89216772d0e71
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-11-09 11:13:04 -08:00
Srihitha Tangudu
219652f3a8 disp: msm: dsi: clear the panel esd_recovery_pending in power on commit
Currently the panel esd_recovery_pending flag is cleared for every mode
set. The ESD recovery completes only after the suspend and resume. Clear
the flag only during power on commit.

Change-Id: I97e370feba0aad34558e4675168b4bcb7f5901ca
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-10-30 23:37:36 -07:00
Kirill Shpin
60965fdeae disp: msm: dsi: add ctrl version support for pineapple
Added dsi ctrl version 2.8 support for pineapple hardware

Change-Id: If9beb77c53d70d94b498b5b837c26892a4df9089
Signed-off-by: Kirill Shpin <quic_kshpin@quicinc.com>
2022-10-25 09:31:49 -07:00
qctecmdr
2d49ae68e6 Merge "disp: msm: sde: cache cwb enc mask to use during seamless transitions" 2022-10-20 12:29:12 -07:00
Raviteja Tamatam
22a3c5a842 disp: msm: fix display compilation for 6.0 kernel upgrade
Fix display compilation issues for 6.0 kernel upgrade.

Change-Id: Ied1940e653ceaa1de18a8aedeab01197c235603c
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2022-10-19 11:04:22 -07:00
Narendra Muppalla
7fcbec0c8d disp: msm: dsi: add dsi ramdump support without DEBUG_FS
This change adds dsi display ramdump support when DEBUG_FS
is not enabled.

Change-Id: Ic6659a9380acd5eb55a3270d3e3b7016a9cd2bd7
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
2022-10-05 03:53:37 -07:00
Vara Reddy
001fa8da90 Revert "disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds"
This reverts commit 14e7e9b409346aa77fd08cca6eab85252d9ccabe.
Reverting this for now until we properly understand the reason
for command transfer timeouts that we are hitting for 5k panel.

Change-Id: I0390af66f9ca06abc1ebb81996bb683dea35beac
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-08-26 19:06:16 -07:00
qctecmdr
c1d1e0a6ff Merge "disp: msm: dsi: avoid DSI PHY shutdown during idle" 2022-08-18 15:04:08 -07:00
Shashank Babu Chinta Venkata
d3d31ac418 disp: msm: dsi: avoid DSI PHY shutdown during idle
Avoid shutting down DSI PHY and lanes before entering into
idle collapse.

Change-Id: I62fb40c2398e544b08b8cb8788ac2dc1143a82ce
Signed-off-by: Shashank Babu Chinta Venkata <quic_schintav@quicinc.com>
2022-08-16 17:53:16 -07:00
Shashank Babu Chinta Venkata
cf264d1a93 disp: msm: dsi: reorder various resets of DSI PHY
DSI PHY has various resets defined to reset analog, PLL and digital
portions. In current sequence, these resets happen after PLL is locked
which can result in introduction of jitter on PHY lanes.Reordering these
resets to happen before PLL is programmed to have intended clean start
of DSI PHY.

Change-Id: I4eb5c05ea0e6015a5447728b2845b49817411c50
Signed-off-by: Shashank Babu Chinta Venkata <quic_schintav@quicinc.com>
2022-08-16 17:52:56 -07:00
Vara Reddy
3d82106dee disp: msm: dsi: increase cmd dma timeout to 1200 milliseconds
Change increases cmd dma timeout to 1200 milliseconds from 200 milliseconds.
There are video mode panels which can support one frame per second, if pixel
data transfer is active, then our command transfer timeout should be atleast
1000 msec.

Change-Id: I3e8269febe3ed6e55ac9381a8de35e7d19fa3160
Signed-off-by: Vara Reddy <quic_varar@quicinc.com>
2022-08-12 09:51:55 -07:00
qctecmdr
adde40d0a0 Merge "disp: msm: dsi: Enable TPG functionality" 2022-08-06 03:04:57 -07:00
Nisarg Bhavsar
5e0d93196b disp: msm: dsi: Enable TPG functionality
Allow TPG patterns to be displayed on command mode and
video mode panels.

Change-Id: Ie9ba9b404ceb965f8a06d1f19e932dd2e051983b
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-08-03 15:04:54 -07:00
Srihitha Tangudu
9857e36ddb disp: msm: dsi: Avoid re-initializing PLL registers during dyn clk switch
Currently we are always initializing PLL registers whenever PLL is
configured. Re-initializing PLL registers during dynamic clock switch in
case of cphy video mode is moving the PLL to some bad state resulting in
display freeze. Avoid this by restricting initialization of PLL registers
to only while turning on the PLL.

Change-Id: I09eacbb37fff4e0e91d226ac08e7d5a2bfbbfe26
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-08-03 00:46:15 -07:00
Yahui Wang
a7378dcdf5 disp: msm: dsi: change hs timer control to fix timeout issue
The hs timer control settings can't match with dsi data transfer
requirement, so it may lead to timeout issue when running into low
frame rate, update this change to fix such issue for 30hz display
mode.

Change-Id: I01942a494f46e0023061a9d307a9d2ca1fd8159a
Signed-off-by: Yahui Wang <quic_yahuiw@quicinc.com>
2022-06-21 18:05:04 -07:00
qctecmdr
90276a462e Merge "disp: msm: dsi: add missing dsi ctrl mutex lock in host timing update" 2022-06-19 05:49:38 -07:00
Linux Build Service Account
f9dd358ebe Merge "disp: msm: dsi: avoid DSI pll codes parsing in TVM" into display-kernel.lnx.5.15 2022-06-14 22:36:55 -07:00
Raviteja Tamatam
639f00c277 disp: msm: dsi: avoid DSI pll codes parsing in TVM
pll_codes_region is not defined on TVM and not programmed.
So, adding TVM check to avoid parsing pll code data.

Change-Id: Ia6280ca3fc1b19866673a6767de465d17681add7
Signed-off-by: Raviteja Tamatam <quic_travitej@quicinc.com>
2022-06-10 11:18:48 -07:00
Narendra Muppalla
8edcc604f3 disp: msm: dsi: move warn to info if secondary panel is not assigned
This change moves warning log to info log if secondary default panel
is not available.


Change-Id: Iad420a05c6440afdf0fcc5f7d33197eaf5c158c4
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-06-01 10:42:26 -07:00
Srihitha Tangudu
ad4b936b50 disp: msm: dsi: turn on the PLL before switching RCG parent during clk on
When display is left on from the bootloader, disp_cc driver will put a
proxy vote on clocks to maintain the hardware configuration of bootloader.
Once all the consumers have been probed, the dispcc driver will synchronize
the hardware state of the device to match the aggregated software state
requested by all the consumers using sync_state call.

If there is an idle power collapse or a suspend before sync state call,
branch clocks and in turn RCG will not get turned off during clocks
disable sequence because of the proxy vote of disp_cc driver. This can be
the case even if there is a vote from any other disp_cc consumers.

During a subsequent call to enable the clocks from DSI driver, we are
currently switching RCG parent to PLL and then turning on the PLL.
If the sync state call doesn't happen before we enable the clocks back,
we'll be setting PLL which is off as a parent to RCG that is on.
But ideally when RCG is on, both the old and new sources should be on
while switching the RCG parent.

Avoid this by turning on the PLL before switching RCG parent during clock
enable sequence.

Change-Id: I1597cf2c8095957cd2b2a20a72bf7199e0d61809
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-05-29 20:49:45 -07:00
Rajeev Nandan
d26a3a480e disp: msm: dsi: add missing dsi ctrl mutex lock in host timing update
Acquire dsi_ctrl->ctrl_lock lock before programming dsi ctrl
registers. Failing this may lead to race conditions in register
programming.
Add missing mutex lock inside dsi_ctrl_host_timing_update().

Change-Id: Ic86cbe282333c0b4d63ae3d5b3356a5d24752203
Signed-off-by: Rajeev Nandan <quic_rajeevny@quicinc.com>
2022-05-26 21:50:47 -07:00
Rahul Sharma
aea055ebc6 disp: msm: dsi: pass DRM_BRIDGE_ATTACH_NO_CONNECTOR during bride attach
Pass the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag when attaching the
bridge so that the bridge driver would not create another
drm connector.

Change-Id: I838bd87c40d0eea3df36187befeb7195fb87d5b3
Signed-off-by: Rahul Sharma <quic_rahsha@quicinc.com>
2022-05-17 22:09:43 +05:30
qctecmdr
be3eb851cf Merge "disp: msm: dsi: Don't clear status interrupts while error interrupts toggle" 2022-04-30 22:49:59 -07:00
Nisarg Bhavsar
75aedb1c53 disp: msm: Address static analysis issues
Avoid various possible nullptr dereferences.
Addresses various issues highlighted by static analysis.

Change-Id: I36d34d610b37bf2799a7e34cd1de8b909b5c0ae4
Signed-off-by: Nisarg Bhavsar <quic_bhavsar@quicinc.com>
2022-04-28 11:53:38 -04:00
Srihitha Tangudu
4799920fc7 disp: msm: dsi: Don't clear status interrupts while error interrupts toggle
To toggle error interrupts, we currently read the DSI_INT_CTRL register,
toggle the DSI_ERROR_MASK bit and write back to the register. While doing
so we are also writing back 1 to any status bits set by HW, thus clearing
the status interrupts. Clearing the status bits should always be done as
part of interrupt handling, which otherwise can lead to command transfer
failures.

Avoid clearing status interrupts while error interrupts are toggled.

Change-Id: Iaae10c279f2341269ed49074448167e68ab7e13c
Signed-off-by: Srihitha Tangudu <quic_tangudu@quicinc.com>
2022-04-27 11:28:05 +05:30
qctecmdr
9607366aa9 Merge "disp: msm: dsi: parse panel ack disabled property for sim panels" 2022-04-09 06:33:20 -07:00
qctecmdr
04ddb3a852 Merge "disp: msm: sde: add line insertion support for sspp" 2022-04-08 04:26:38 -07:00
Yahui Wang
6f22c2c636 disp: msm: dsi: parse panel ack disabled property for sim panels
Sim panels are not working well with video mode, parse panel ack
disabled property to fix sim video mode identification issue.

Change-Id: Ife3b533d5a6db97618459dacf1f7ce8d3fc896bf
Signed-off-by: Yahui Wang <quic_yahuiw@quicinc.com>
2022-04-01 12:55:29 +08:00
Rajesh kv
03aad2fdf9 disp: msm: sde: add line insertion support for sspp
Add line insertion support for sspp, this is used to support
display with external splitter. Line insertion logic checks
the difference between screen logical height and physical
height. If any difference is observed adds dummy and active
lines on screen.

Change-Id: Ieec322273df000a53fb39e05174c2d67c3c2da81
Signed-off-by: Rajesh kv <quic_kvrajesh@quicinc.com>
2022-04-01 09:35:03 +05:30
Narendra Muppalla
0828ce68f2 disp: msm: sde: consider max of actual and default prefill lines
In transfer-time calculation remove fixed prefill lines assumption
and consider max of default prefill lines, prefill lines
specified from the panel timing info and Vtotal. For panels with
higher porches exceeding default prefill lines, alternate framedrops
can occur if transfer-time exceeds RSC static waketup time
as actual prefill lines are considered in RSC static wakeup timer
calculation. This change ensures transfer-time is within
RSC static wakeup time.

Change-Id: Ic489d69cf99cfb6750e871c7fc8197243f61acf3
Signed-off-by: Narendra Muppalla <quic_nmuppall@quicinc.com>
2022-03-29 11:36:27 -07:00
qctecmdr
67c4ea24a4 Merge "disp: msm: add capability to dynamically update the transfer time" 2022-03-24 07:56:56 -07:00
qctecmdr
264e0b32ce Merge "disp: msm: dsi: add MISR support for ctl 2.2 version" 2022-03-23 00:39:24 -07:00
Nilaan Gunabalachandran
e5fcf7f263 disp: msm: add capability to dynamically update the transfer time
This change adds a connector OP, that will be used to update frame
transfer time dynamically at the request from user space.

It also adds parsing for new device tree entries that set the minimum
and maximum trasnfer times on a mode basis. These min and max transfer
times are also published to userspace through the connector mode info
capabilities blob.

Change-Id: I12aedf96a51ff7feb2c5b3b1353d3c4ec8dcb068
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <quic_ngunabal@quicinc.com>
2022-03-21 14:13:32 -04:00
qctecmdr
de4b82ec48 Merge "disp: msm: sde: refactor dsi_display_get_modes function" 2022-03-19 21:33:44 -07:00
Veera Sundaram Sankaran
451f79771f disp: msm: dsi: add MISR support for ctl 2.2 version
Add DSI CTL MISR support for ctl 2.2 version. Reuse the same
debugfs nodes to setup/collect misr.

Change-Id: I3d8dfab093659ce53817d9511999c0c03cc33f62
Signed-off-by: Veera Sundaram Sankaran <quic_veeras@quicinc.com>
2022-03-18 09:25:40 -07:00
qctecmdr
6ddda369b3 Merge "disp: msm: dsi: mitigate errors on non-parsed regulator nodes" 2022-03-15 22:42:35 -07:00
Shamika Joshi
896e10ee2d disp: msm: sde: refactor dsi_display_get_modes function
Refactor the function 'dsi_display_get_modes' to
reduce its complexity.

Change-Id: I1a8ecaa780e5070bac7fa40404677c0a8a5d7cd8
Signed-off-by: Shamika Joshi <quic_shamjosh@quicinc.com>
2022-03-07 17:55:35 -08:00