Commit Graph

169 Commits

Author SHA1 Message Date
qctecmdr
685a464505 Merge "disp: msm: add check for null pointer dereferencing" 2021-03-10 02:49:06 -08:00
Satya Rama Aditya Pinapala
1b2b7a6c93 disp: msm: dsi: allocate DSI command buffer during bind
The DMA buffer allocation for DSI happens during the first
command transfer. This change moves this allocation to happen during
bind.

Change-Id: I7969a019a8b84282e8a153f5393c9a3de5a28043
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-03-08 18:03:37 -08:00
Samantha Tran
e8cbb8822b disp: msm: add check for null pointer dereferencing
Add check for null pointers before accessing.

Change-Id: I33deb1e931098c246326a01e743a2db760320471
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-03 09:12:19 -08:00
qctecmdr
7de8f1e2ac Merge "disp: msm: dsi: set source to xo while turning off PLL" 2021-02-12 11:50:19 -08:00
Shashank Babu Chinta Venkata
23734fc295 disp: msm: dsi: reorder resource validation in probe
Reorder resource validation to report probe deferral
appropriately.

Change-Id: I63aab1b3282bda24dba2b84906564de290345fdd
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-02-04 10:22:17 -08:00
Satya Rama Aditya Pinapala
3ff78e8f7d disp: msm: dsi: set source to xo while turning off PLL
HW recommendation is to park the DSI byte clock and pixel clock at XO
before turning them off. The change parses XO from the DT and sets the
clock source as XO while turning off the PLL.

Change-Id: I788951d6341149300e80e8db4a5a3fd2c4eb3e03
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-02-01 16:03:20 -08:00
Satya Rama Aditya Pinapala
c3c683472d disp: msm: dsi: remove custom upstream MSM DSI flags
Change removes the use of custom MSM DSI flags that will not be
available as part of GKI.2.0

Change-Id: I2337a54b1d6346ebdc18e9e6c3c8e7a07f421bdd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-01-15 17:55:19 -08:00
Linux Build Service Account
8bb1e0a34d Merge "disp: msm: dsi: update panel commands for panel operating mode switch" into display-kernel.lnx.5.10 2021-01-13 15:27:14 -08:00
Linux Build Service Account
6c367a8fed Merge "disp: msm: dsi: rework DSI PLL to be configured within PHY" into display-kernel.lnx.5.10 2021-01-13 14:24:33 -08:00
Amine Najahi
08358fd857 disp: msm: remove use of drm_display_mode vrefresh
Use of drm_display_mode vrefresh is being deprecated in
upstream DRM framework. Downstream driver need to use
drm_mode_vrefresh API from now on.

This change removes dependency on drm_display_mode vrefresh
and replaces it with drm_mode_vrefresh API in SDE, DSI and
DP driver. In addition, it also modifies drm_display_mode clock
to align with upstream approach where an uncompressed mode clock
is required to match drm_mode_vrefresh API.

Change-Id: Ie972a2e140adfd81c4e68df8e7bc69feaaca22e1
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-01-13 16:08:27 -05:00
Lei Chen
8cdb80455f disp: msm: dsi: update panel commands for panel operating mode switch
Update panel commands to support panel operating mode switch in
one timing node.

Change-Id: Ieb8303cebe78c699dfd5f274830418e87655ff56
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 07:43:52 -08:00
Lei Chen
ab3f86f918 disp: msm: use connector properties to expose and set panel mode
Expose panel mode from kernel to SDM with SDE connector property
CONNECTOR_PROP_MODE_INFO and set panel mode from SDM to kernel
with SDE connector property CONNECTOR_PROP_SET_PANEL_MODE for
avoiding private change in upstream code in QGKI kernel.

Change-Id: I0629dad9399967cc1118ac02ce30597076ca367d
Signed-off-by: Lei Chen <chenlei@codeaurora.org>
2021-01-13 23:40:22 +08:00
Satya Rama Aditya Pinapala
0a93edbae6 disp: msm: dsi: rework DSI PLL to be configured within PHY
Change avoids clock framework APIs to configure the DSI PHY
PLL. It follows HW recommendation to set the byte and pclk
dividers.

Change-Id: I8c110f3997e4ec4c2eaa28778b70091855725ab8
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2021-01-12 23:49:11 -08:00
Samantha Tran
2616e57a0a disp: msm: encoder_ids replaced in drm_connector
Commit 62afb4ad425a ("drm/connector: Allow max possible encoders
to attach to a connector") enables additional encoders per
connector through use of a mask rather than encoder ids.
This change updates the driver when looking for an encoder
for the connector to look through the list of all possible encoders.

Change-Id: I69cc7c38cd0a9842ed2f15712feeb3c6b88daadf
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
e199ecbfb8 disp: msm: remove debugfs_create_u32 return value
Commit 2b07021a940c ("debugfs: remove return value
of debugfs_create_u32()") removes the return value
from debugfs_create_u32. This change updates the msm
driver to remove cehcks on this return and corrects
for unnecessary line wraps.

Change-Id: I8d50dd7168921edfb2d5edad13941f91117d3c30
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Samantha Tran
0c08cb1fb5 disp: msm: update parameters for drm_bridge_attach
Commit a25b988ff83f ("drm/bridge: Extend bridge API to
disable connector creation") and commit ee68c743f8d0 ("drm: Stop
including drm_bridge.h from drm_crtc.h) add additional input flags.
This change adds fixes to the drm bridge attach API and includes
relevant drm_bridge header files.

Change-Id: I85e84eaff7df2995243896108a217fae81716b63
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:27:46 -08:00
Samantha Tran
16cc165833 disp: msm: obtain bridge from bridge chain
Commit 05193dc38197 ("drm/bridge: Make the bridge chain
a double-linked list") creates a bridge chain linked
list. This change updates the relevant changes to msm
driver to use the list to find the bridge associated to
the encoder.

Change-Id: I59eb2910be96f4fff7bdbeb040d6ad204c41d747
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:24:59 -08:00
Samantha Tran
6d65c2b613 disp: msm: dsi: pass drm_display_info to mode_valid
Commit 12c683e12cd8 ("drm: bridge: Pass drm_display_info to
drm_bridge_funcs .mode_valid()") passes the drm_display_info to
mode valid. This change updates relevant changes to dsi display,
that will make it available during bridge validation.

Change-Id: I2772e9e3920de940f22341be5019213d562352ff
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-16 17:20:28 -08:00
Satya Rama Aditya Pinapala
ae5b602b4f disp: msm: dsi: trigger broadcast commands using DMA start window
As per the HW requirements it is highly recommended to use DMA start
window to trigger  broadcast commands. If not used then it can
result in a hardware hang with the DSI controllers going out
of sync. This behavior is even more prominent in cases of higher
refresh rates. As part of the change we change the default DMA
scheduling behavior to default to maximum possible DMA window
in case it is not specified in the panel device tree.

Change-Id: Ied4df9063664cedbc18ce009054d4e5ecae30ab2
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-12-04 20:01:55 -08:00
qctecmdr
69e06f9fd7 Merge "disp: msm: dsi: avoid TE status check based on rechecks count" 2020-11-21 13:13:35 -08:00
Veera Sundaram Sankaran
db67b18a28 disp: msm: dsi: avoid TE status check based on rechecks count
The rechecks count in dsi_display_status_check_te defines the
number of times the TE status needs to be checked before exiting.
Avoid the execution if rechecks is set to zero as it would avoid
unnecessary irq status changes.

Change-Id: Ice31701ac06f5b0a82f29b5f415dcb0b055e7b16
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-19 12:13:18 -08:00
Veera Sundaram Sankaran
899b201a0a disp: msm: dsi: avoid TE-based panel status check in Trusted-vm
Add check to avoid the dsi panel status check with TE
method as the GPIO support is not available in Trusted-vm.

Change-Id: I5ad6e7b77b189b5150302ab34767dfc4d97aaf61
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Veera Sundaram Sankaran
c99f3fd6ae disp: msm: dsi: enable ESD trigger through debugfs in trsuted-vm
Add support to trigger ESD through debugfs by directly
modifying the reset GPIOs TLMM register in trusted-vm as GPIO
driver support is not enabled.

Change-Id: I859affe69c13dbe115a48b0a63a600a57027db58
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-12 23:34:22 -08:00
Satya Rama Aditya Pinapala
3cf46fba79 disp: msm: dsi: error handling during debugfs command transfer
Change clears the DSI TX command buffer allocated for debugfs
command transfers and destroys the command packets in case of
error during command transfer.

Change-Id: Ia1e822b9b60d44f7eba325116d416916419471fa
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-21 21:39:53 -07:00
Satya Rama Aditya Pinapala
bbe18a1689 disp: msm: dsi: batching multiple DSI commands using debugfs node
The change batches DSI commands sent using the debugfs node, in a
separate buffer from the TX command buffer to ensure that they are not
triggered before the last command bit is set. Once the last command
bit is set the buffer is then copied to the DSI TX buffer and triggered.

Change-Id: I9ba624e4e19341696a974994817603315c6c8a45
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-21 15:25:48 -07:00
qctecmdr
68f4129cc6 Merge "disp: msm: sde: add support for qsync min fps list" 2020-10-19 16:18:30 -07:00
qctecmdr
7d1acf4361 Merge "disp: msm: dsi: add support to set continuous clock through phy" 2020-10-19 16:18:30 -07:00
qctecmdr
6edad6b0ad Merge "disp: msm: dsi: Add support for secondary display using firmware approach" 2020-10-15 21:39:04 -07:00
qctecmdr
95955d984a Merge "disp: msm: dsi: Fix num of displays for firmware approach" 2020-10-15 10:08:10 -07:00
Lipsa Rout
a43ff33da8 disp: msm: dsi: Add support for secondary display using firmware approach
Currently, changing panel configuration from firmware approach is present
for single display. This change adds support for secondary display using
firmware approach.

Change-Id: I8095dceed1567d8582c7473c0ac7f59c4666a200
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-10-15 18:04:32 +05:30
Raviteja Tamatam
e5ff0b8f30 disp: msm: sde: add support for qsync min fps list
In current implementation qsync min fps is single value.
It is same for all the list of supported dfps list.
Added support for new dt entry dsi-supported-qsync-min-fps-list
corresponding to the fps supported in the dfps list
dsi-supported-dfps-list.

Change-Id: Ifd5309c2f51865a3c0d9fadb65cbcd291b6ef42b
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2020-10-15 12:32:25 +05:30
qctecmdr
4e1159d7c6 Merge "disp: msm: add support to have same panel names for dual display" 2020-10-14 03:17:39 -07:00
qctecmdr
484801e93c Merge "disp: msm: dsi: fix return value for alter_esd_check_mode" 2020-10-13 22:45:51 -07:00
Harigovindan P
e290135ccf disp: msm: add support to have same panel names for dual display
This change adds support to have same panel names for dual displays.
Without this change, the secondary panel bind will fail if it has the
same panel name as primary since the primary panel debugfs directory
would have been created during its display bind and when display bind
for secondary panel is initiated with the same name it will try to
create a debugfs directory with the same name resulting in bind failure.
This change appends a string as secondary in the panel name and creates the
debugfs directory.

Change-Id: I2bd25672ce0105a3b8225bbf17e13d4e373ad10b
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
2020-10-13 22:20:45 -07:00
Lipsa Rout
298cb1459b disp: msm: dsi: Fix num of displays for firmware approach
Currently, in firmware approach, the panel node is null
for secondary display. As a result, the number of display
remains one, in case of dual display also. This change
updates the number of displays.

Change-Id: I4b945b8b94d931e0dedf7ca7b27cb1a288b9d6ab
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
2020-10-12 23:37:21 -07:00
Ritesh Kumar
ee90425ea7 disp: msm: dsi: add support to set continuous clock through phy
For phy ver 4.0 chipsets, configure DSI controller and DSI PHY to
force clk lane to HS mode always. This change was missed while
propagating from 4.19 to 5.4.

Change-Id: I60370034f7b9ed5d036d9d22f0807250afbcbcd5
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-10-10 16:33:32 +05:30
qctecmdr
48aedc81e0 Merge "disp: msm: dsi: decrease log level of messages during modeset" 2020-10-02 14:14:01 -07:00
Satya Rama Aditya Pinapala
3617217ecf disp: msm: dsi: decrease log level of messages during modeset
Change decreases logs during a mode set in dsi_display and adds the
info to event logs.

Change-Id: I3bbe328f942008004c15b39230dd8be3e4cb64b5
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-10-02 01:33:33 -07:00
Satya Rama Aditya Pinapala
ca818526c3 disp: msm: dsi: fix return value for alter_esd_check_mode
The file operation write expects a non zero return value for a
successful exit from the file op.

Change-Id: I5e956333f39c33708ba24e2722713484c613f0ee
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-30 10:38:50 -07:00
Satya Rama Aditya Pinapala
cfa1f49125 disp: msm: dsi: fix ESD checks for sim and vid panel modes
Enure that ESD check doesn't result in a false negative while
booting up with a simulation panel or if TE based check is enabled
and panel switches it operating mode to video.

Change-Id: I62ff088f513d28d2883ce5a6d22f8bac1783fcd2
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-09-29 21:13:39 -07:00
qctecmdr
a1c819549d Merge "disp: msm: update POMS detection logic" 2020-09-20 19:01:21 -07:00
Steve Cohen
38a8d2134b disp: msm: update POMS detection logic
Currently, SDE relies on DSI to set a flag for POMS however
if a power ON modeset comes with a different mode than
previously configured, DSI is unable to detect the mode change
and does not set the flag nor perform the mode switch itself.

DSI should always align the panel mode to match the timing node
that is selected regardless of prior configurations.

SDE encoder can detect if POMS is required for the INTF block
without the flag from DSI by comparing the currently configured
INTF mode with the panel mode that is being set. The POMS flag
from DSI is still needed for any active panel mode change so
that the post-modeset cleanup operations are triggered.

Change-Id: Ib198b3098f21338ab35b2022b04be1c01c4cbd94
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-19 00:09:43 -04:00
Ray Zhang
b818229a2f disp: msm: dsi: add missing trusted vm check
Need to check trusted VM environment when loading DSI
firmware. Add this missing check due to propagation
issue.

Change-Id: I7c84b487a58133df49ba23e80e6b6ff8783cdf6c
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2020-09-18 17:21:27 -07:00
Rajeev Nandan
19a54c5650 disp: msm: dsi: enable xlog in critical paths
Enable xlog in critical paths to increase debug coverage.

Change-Id: I177acd3f2c2ab349f533bb9fbd8a8122539d524b
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-09-16 13:00:11 +05:30
Ritesh Kumar
755686a110 disp: msm: dsi: Handle GDSC PM in pre/post clk on/off
Currently, power_state variable does not reflect the GDSC
status. Due to this, there are scenarios where ctrl_power_on
is not happening leading to clock failures. This change
updates power_state based on current status of all the
regulators. GDSC enable is moved to pre_clkon and GDSC
disable is moved to post_clkoff.

Change-Id: I6d9508d5dffda0c94bd3b3bd9b5feb4724dc9dc7
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
[cohens@codeaurora.org: fixed static analysis error]
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-09-10 11:34:28 -04:00
qctecmdr
26112d7b3b Merge "disp: msm: dsi: Update pll delay calculation as per latest DSI HPG" 2020-09-09 02:29:19 -07:00
qctecmdr
eabc896956 Merge "disp: msm: dsi: initialize display before request_firmware" 2020-09-08 23:07:45 -07:00
qctecmdr
370f3ad937 Merge "disp: msm: dsi: Mask overflow error for Broadcast command" 2020-09-08 23:07:45 -07:00
Harigovindan P
a976e8c7fa disp: msm: dsi: dual dsi constant fps porch calculation
This change adds porch calculation support to maintain
constant fps during clock switch for dual DSI controller.

Change-Id: I9a7e6d1f6d028355dba30aafe0234fc30c153059
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 22:23:45 -04:00
Ray Zhang
9fc2eec97a disp: msm: dsi: initialize display before request_firmware
dsi_display_init has to be called after dsi_display has valid
device info, so initialize it before calling request_firmware
in dsi firmware case.

Change-Id: Iec59882c776eb4bd19ce68d3ded052629c344d17
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:15:37 -04:00