提交線圖

129 次程式碼提交

作者 SHA1 備註 日期
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
Harigovindan P
25b6a3e7d1 disp: msm: dsi: Mask overflow error for Broadcast command
Currently, for Dual DSI Broadcast command, Overflow error
is masked only for master controller. This changes add
support to mask overflow error for slave controller as well.

Change-Id: Ida73c4166e996fcf2c8c936d0c76d0a89a220d89
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:14:29 -04:00
Harigovindan P
4a86b80a50 disp: msm: dsi: cphy constant fps porch calculation
This change adds porch calculation support to maintain
constant fps during clock switch for CPhy.

Change-Id: I74b2f0e064441fba7f452b06438ece7fe3b373eb
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
2020-08-25 19:13:56 -04:00
Harigovindan P
662ac3ab89 disp: msm: dsi: Add support for C-PHY dynamic clock switch
This change adds support for C-PHY dynamic clock switch feature.
Also add support for phy ver 4.0 C-PHY timing parameters calculation
to be used for clock switch.

Change-Id: I8292860fd8c93a7ba7988ec8c44ea9683f45b6e6
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-08-25 19:13:56 -04:00
Ritesh Kumar
fc571a94aa disp: msm: dsi: Update pll delay calculation as per latest DSI HPG
As per DSI HPG, pll delay should be 25usec for phy ver 4.0 and
100usec for phy ver 2.0 and 3.0. This change updates pll delay
calculation during dynamic DSI clock switch accordingly.

Change-Id: Ief5cbdc9304cf5ad025fe3bbe689b93834a1f710
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-08-25 19:10:11 -04:00
Ritesh Kumar
a81e6a55fe disp: msm: dsi: Fix pll delay calculation during clock switch
During clock switch, Pll delay is calculated considering escape
clock to be in KHz. But escape clock is in Hz. This leads to wrong
pll delay calculation.

Change-Id: I616d16cc3d775a37e77c7c35bb860c23b1f9e37a
Signed-off-by: Ritesh Kumar <riteshk@codeaurora.org>
2020-08-25 19:10:11 -04:00
qctecmdr
f1b667341c Merge "disp: msm: add connector API to disable cont_splash resource votes" 2020-08-25 09:23:14 -07:00
Vara Reddy
f206b420c0 disp: msm: dsi: do NULL check before accessing controller node
Add NULL pointer checks, before accessing the controller node.

Change-Id: If24c4fd4352ef5ab7642c817ddaa61a80b725c99
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2020-08-24 16:49:36 -07:00
qctecmdr
ead6a35953 Merge "disp: msm: dsi: add parsing logic for panel gpio pins/address" 2020-08-21 12:36:22 -07:00
Linux Build Service Account
0af93447c5 Merge "disp: msm: dsi: enable dfps trigger at mdp intf flush" into display-kernel.lnx.5.4 2020-08-20 21:52:52 -07:00
Vara Reddy
c9cb9f51f3 disp: msm: dsi: enable dfps trigger at mdp intf flush
This change allows dynamic refresh trigger to sw trigger
and mdp intf flush. With this we can make sure that DSI
timing/clock update and mdp intf timings are updated in
one vsync.

Change-Id: Ic807f498e2e47be6dd0f1e11ff1fc0896a8ec758
Signed-off-by: Vara Reddy <varar@codeaurora.org>
2020-08-20 12:48:32 -07:00
Chandan Uddaraju
35b60f6208 disp: msm: add connector API to disable cont_splash resource votes
The panel regulator votes are added by default during
dsi probe to make sure sync state driver doesn't disable
these regulators for cont_splash use case. These regulator
votes need to be removed when cont_splash feature is
disabled. Add a new connector API to handle this.

CRs-Fixed: 2734419
Change-Id: Ie54c8f246877a042afacddaeae8b90440652116f
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-08-17 16:18:01 -07:00
Veera Sundaram Sankaran
30757e8c8a disp: msm: dsi: add parsing logic for panel gpio pins/address
Add parsing code for getting the TLMM base address and size
of each GPIO pin register space along with the GPIO pins
used for the specific panel. This list is used to lend
these IO ranges to trusted vm during the trusted UI usecase.

Change-Id: I10429cfa14265d52e898815c6cf94be27daa5677
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-08-17 09:47:49 -07:00
Yuan Zhao
c810238fb4 disp: msm: dsi: support LP mode for DCS brightness setting
DCS brightness settng can only use HS mode. Add a new
DT property for LP mode choose for DCS brightness setting.

Change-Id: Ibe5867fe344776871eb3a410a8d79d347775f3d4
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-08-12 23:08:06 -07:00
Satya Rama Aditya Pinapala
50af1eb43b disp: msm: dsi: add support for DMA CMD scheduling for CMD mode panels
The change allows for configuring a command DMA window during which
the command is triggered. The DMA window must not intersect with the
MDP tear check window. Once the command transfer is successful, the
trigger control needs to reset to the default DMA trigger specified
by the panel.

Change-Id: I5485ca1f8e141ed92dc8c77c2daf579634271022
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-08-05 20:31:24 -07:00
qctecmdr
ecf7bd7696 Merge "disp: msm: dsi: reorder operations during DSI display pre kickoff" 2020-07-24 14:10:40 -07:00
Satya Rama Aditya Pinapala
b03e4eceb8 disp: msm: dsi: reorder operations during DSI display pre kickoff
During a dynamic mode switch if the DSI clocks need to be changed,
it would result in a sequence of clock off and on operations. If
this happens after a partial update even though the commands are
sent with an asynchronous wait flag, the clock off forces the commit
thread to wait  till the DSI command wait_for_done thread is
scheduled and completed. The change ensures that the clock change is
the first operation that occurs during pre kickoff.

Change-Id: I1b4e765cd0281f1539fc4af309247f3bc0867c1b
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-07-23 18:56:12 -07:00
Orion Brody
ee9c09b8b3 disp: msm: dsi: fixes in GKI cleanup path
Creates a deep copy of a struct which previously was shallow.
Also adds null checks which prevent segmentation faults.

Change-Id: I9155f632736fdb30e31f28f55ebe92954956a82d
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2020-07-15 17:32:17 -07:00
Jeykumar Sankaran
962fd4faca disp: msm: dsi: register io resource collection VM event hook
Add support to read register ranges and IRQ lines that needs
isolation during VM switch in dsi ctrl and dsi phy.
Register for VM resource collection event providing the
callback function.

Change-Id: I5eae4699b0a97ffed438627ccea855c401b3fbeb
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2020-07-12 15:16:32 -07:00
Jeykumar Sankaran
4b27380f07 disp: msm: dsi: reuse continuous splash path for trusted vm
Display in trusted VM works in a handover mode i.e, all
display components need to be initialized by the primary VM
before switching to trusted VM on the usecase boundary.
That makes it a hard requirement for the trusted VM not to
re-program any of the display configuration registers before
it could hand the HW back to the primary VM.

Also, most of the linux framework drivers including pintrl, clocks
are not enabled in the trusted VM.

In order to address the above two limitations and to control the
probe/commit sequences, this change adapts the same path as that
of continuous splash to bypass some of the critical functions
which are identified to be HW intrusive. Based on the DT property
read from SDE handle, dsi drivers will choose to bypass
enable/disable HW state updates when executing in the vm environment.

Change-Id: Ica71c924d189ab65fe3be5b0ac870633e3b749e1
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-07-12 15:00:09 -07:00
qctecmdr
5c92c5ac78 Merge "disp: msm: debugfs interface for sde connector to do DSI read" 2020-07-08 13:03:55 -07:00
qctecmdr
9ec78e3339 Merge "disp: msm: sde: dump clock state before entering suspend" 2020-07-06 23:49:03 -07:00
Yuan Zhao
5bba78331d disp: msm: debugfs interface for sde connector to do DSI read
This change implements a new feature to read the cmds response
of the panel from sde connector interface. Sde connector opens
debugfs interface for all the connectors those have support for
cmd receive operation.

Sde connector init module creates rx_cmd debugfs file at
/<debugfs-root>/dri/0/DSI-1/ for DSI-1 connector.
Format for DSI command transfer:
echo "command bytes" > /<debugfs-root/dri/0/DSI-1/rx_cmd
byte-0: the length of received buffer
byte-1: data-type
byte-2: last command. always 0x01
byte-3: channel number
byte-4: flags. MIPI_DSI_MSG_*, must be set to 0xa
byte-5: 0x00
byte-6 and byte-7: command payload length
byte-8 to byte-[8+payload length]: command payload
Example:
echo "0x01 0x06 0x01 0x00 0x0a 0x00 0x00 0x01 0x0a" > rx_cmd
The command receive operations are allowed only if controller
(ex. DSI controller) is in active state.
Read the value of panel response:
cat /<debugfs-root>/dri/0/DSI-1/rx_cmd
returns the value of this command.
nothing - failure, xx xx - success.

Change-Id: I912b65d606e248c7a886d219f4363bf7766ee7b6
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-07-01 00:55:51 -07:00
Satya Rama Aditya Pinapala
182d88e3b9 disp: msm: handle panel detection after a pp done timeout
The change allows for multiple TE checks during a pp done timeout.
With this change, when a timeout occurs the panel status is checked
using the default ESD check status method followed by multiple TE checks.

Change-Id: If813964bab55c5e8113721060aa5b279f30fa5e0
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-06-29 15:52:01 -07:00
Veera Sundaram Sankaran
88037da799 disp: msm: fix vram allocation when IOMMU is not present
Allocate DSI/LUTDMA buffers from VRAM when IOMMU is not
available. Add checks in msm_gem to avoid few operations
when aspace is not available due to no IOMMU. Parse the
VRAM size from device tree, when available.

Change-Id: Iedf5749b71c2e772ac5434048520a34705c54b45
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-06-24 16:20:38 -07:00
Amine Najahi
8479ed7278 disp: msm: sde: dump clock state before entering suspend
Add debug capability to dump clocks before entering pm suspend.
This will help debug invalid register access when clocks are off
during adversarial test cases.

Change-Id: I80d19b751a3b9a1de0cc64699a21a1852d614ced
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2020-06-22 13:40:03 -07:00
Dhaval Patel
83860f0642 disp: msm: pass free dsc and lm availability info to dp
Primary and secondary dsi displays are built-in displays
and they are supported during all concurrency usecases
without resource allocation failure. DP mode filter
logic should provide supported mode information based
on free mdp resources after dsi resource assignment.

Change-Id: I3a9637a91ea1ffcc31997e25caff7f13605283ac
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2020-06-07 22:57:26 -07:00
Yuan Zhao
922e8addd8 disp: msm: dsi: remove dsi FIFO error logs from dsi ISR
Lots of dsi FIFO error logs were printed into serial in
dsi ISR. It will make device stuck or deadlock. Remove
these logs from dsi ISR, and enable the log in FIFO error
workqueue handler.

Change-Id: I0e9b2312cb76d345ec5a9b9628c52b47d5163fde
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-05-29 19:06:31 -07:00
qctecmdr
be79c7242f Merge "disp: msm: dsi: select timing mode shared from kernel command line" 2020-05-26 18:21:56 -07:00
qctecmdr
f2b1cba0d5 Merge "disp: msm: dsi: add api to control dsi active status" 2020-05-25 13:47:05 -07:00
Rajeev Nandan
b990bd6a04 disp: msm: dsi: select timing mode shared from kernel command line
If the command line timing is given, select corresponding
drm display mode as preferred mode. Select first sub mode of
that timing as preferred mode if dynamic clock or dynamic fps
is enabled.

Change-Id: I688b3bc07f79f4d014b8a7797204d3d6a873222d
Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org>
2020-05-14 21:03:44 -07:00
Yuan Zhao
5139cad2d4 disp: msm: dsi: update PHY configuration to support cphy
Add support to read cphy boolean flag from panel dtsi
and configure DSI PHY registers accordingly. Update the
bit/byte clock calculation according to cphy specifications.
Update clock parents so that the relevant divider blocks
are configured to support cphy.

Change-Id: Iaca61eec01a488657b086f59910c52f8c79e26a4
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2020-05-14 21:00:07 -07:00
Satya Rama Aditya Pinapala
43069ad44a disp: msm: dsi: use panel's force_clk_lane_hs instead of phy's
In order to make dsi panel and dsi2hdmi panel compatible,
delete "qcom,panel-force-clock-lane-hs" property in phy and
use display panel's force_clk_lane_hs property.

Change-Id: I490e08b2ee859797c2b3aeddf109a3a4286fb922
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-05-14 21:00:02 -07:00
Veera Sundaram Sankaran
988b1c6fc5 disp: msm: dsi: add api to control dsi active status
Add DSI api to control the connection status of the
DSI interface. This would be used in the VM usecase,
where the connection would be enabled/disabled during
device assign/unassign while switching to the VM.

Change-Id: Ifff41244824ade7a6b8dca77651d82fd5207f8e0
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-05-11 12:11:58 -07:00
qctecmdr
6a5956b36e Merge "disp: msm: make msm_drm as module for GKI" 2020-04-28 23:51:44 -07:00
Shashank Babu Chinta Venkata
8b8bfe0165 disp: msm: make msm_drm into single module
Make msm_drm into single module and all child driver
registers and unregisters are handled from parent's
register and unregister respectively.

Change-Id: I017513d1de3b6b25dd5543d7fa7741c0bac1740d
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Signed-off-by: Narendra Muppalla <NarendraM@codeaurora.org>
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-04-28 15:52:39 -07:00
Chandan Uddaraju
fa8f623802 disp: msm: dsi: move panel regulator votes from bind to probe
Add vote for panel regulators in dsi probe to make sure
panel regulators are ON until dsi bind is completed
for cont-splash enabled usecase. Remove this panel regulator
vote when dsi component bind is done.

Change-Id: I0b1d43fa1b16385712abc1d8aaa0e778f31ba634
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
2020-04-28 12:08:21 -07:00
qctecmdr
9794834cc5 Merge "disp: msm: dsi: avoid seamless request for cwb transitions" 2020-04-23 09:09:01 -07:00
Lipsa Rout
e009f7f81f disp: msm: dsi: Update mode population logic for POMS feature
This change adds support to populate one command mode for
video mode panels supporting panel operating mode switch
feature.

Change-Id: I850b889ebfa8c2ee1406ad946061b96143537b09
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:22 -07:00
Lipsa Rout
d59451d9e9 disp: msm: dsi: Add support to skip constant fps for command mode
VFP or HFP is adjusted to achieve constant fps during dynamic
DSI clock switch. This feature is not supported for command
mode. So, add check to skip porch calculation for command mode.

Change-Id: I5fa76d6536a55b2a19f24c0e14b6861e1f4c8f25
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:18 -07:00
Lipsa Rout
9cf9c8e99b disp: msm: dsi: Fix the total number of modes calculation
This change updates the parsing of timing nodes to check
the mode of operation as video or command. In command mode,
for each timing node, num of supported dfps rate is always
one. Accordingly, update the num_dfps_rate to 1 for
command mode.

Change-Id: I5098c7e0d4d2320609d6e10031eaef78c1d8b3c1
Signed-off-by: Lipsa Rout <lrout@codeaurora.org>
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2020-04-20 09:59:14 -07:00