提交图

209 次代码提交

作者 SHA1 备注 提交日期
Jayaprakash Madisetty
2df01bf3aa Revert "disp: msm: sde: remove all preclose logic"
This change reverts commit ae2dceb0b6 ("disp: msm:
 sde: remove all preclose logic"). This change also
modifies the force disable plane logic since
__drm_atomic_helper_disable_plane is not exposed to
drivers.

Change-Id: I89e19dead9ade724798952b1934b45b5663e1a42
Signed-off-by: Jayaprakash Madisetty <jmadiset@codeaurora.org>
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-07-08 10:24:32 -07:00
qctecmdr
6a01182c1e Merge "disp: msm: sde: update max_dp_dsc_count in dsc switch case" 2021-07-07 01:25:31 -07:00
Raviteja Tamatam
9a96017f9a disp: msm: sde: update max_dp_dsc_count in dsc switch case
max_dp_dsc_count needs to be updated to total dsc count
only if dsc_switch_support is present. Updated
allowed_dsc_reservation_switch just after connector_init
before max_dp_dsc_count value is modified.

Change-Id: I878cde62b4940c629293eba0a3794f4dc2996b4f
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-06-08 20:07:26 +05:30
Jeykumar Sankaran
7a112bb744 disp: msm: sde: add explicit sub-driver mappings for TVM
TUI clients are the display sub-drivers that participate
during the TUI transition. They register with the display
TUI notification framework with a list of callbacks functions
that will be invoked during pre/post transitions and for quering
I/O memory that need to be access controlled. This change
adds RSC to the TUI client list.

In Trusted VM, all the sub-drivers are not enabled to avoid
any re-configuration of respective module registers. But the
TUI framework need to know the sub-driver I/O memory ranges
in order to accept the I/O memory list lent by the HLOS VM.
So, SDE provides them ranges by reading from a custom
devicetree property.

Change-Id: I2c4b254d539d04771339ae4a7bf4d296b7a7f91a
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-06-07 23:48:09 -07:00
qctecmdr
8bbc6f2698 Merge "disp: msm: sde: flush commit thread queue during pm suspend" 2021-06-01 20:21:34 -07:00
Cong Zhang
3133112917 disp: msm: sde: Rename the hypervisor interface
The hypervisor is renamed to gunyah now. All 'haven' words need change
to 'gunyah' and 'hh' words in hypervisor interface need change to 'gh'.

Change-Id: Ia7ff6d855eb5548540a2f11a781c2555beb23187
Signed-off-by: Cong Zhang <congzhan@codeaurora.org>
2021-05-31 16:55:38 -07:00
Linux Build Service Account
b9eedf97f8 Merge "disp: msm: sde: set IB value after cont splash to DT value" into display-kernel.lnx.5.10 2021-05-21 10:04:10 -07:00
Raviteja Tamatam
3789258773 disp: msm: sde: add allowed_dsc_reservation_switch capability
This change adds allowed_dsc_reservation_switch to determine if
dsc seamless switch is supported for DP. Also, based on the
flag, it determines and populates the required number of
available resources for DP.

Change-Id: I9cd7219a50d352369c5bc8386ce7dc25c30b80b6
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:36:05 -07:00
Raviteja Tamatam
b89a3f739a disp: msm: populate submode blob information
Mode information apart from the fields in
drm_mode_modeinfo that can trigger a modeset like
dsc-nondsc, video-cmd are defined in sub mode.
For each mode in connector->modes there can be
multiple submodes.

Change-Id: Ib8697d3fa4ea5261d9ac4943b1a4149e22c4da2f
Signed-off-by: Raviteja Tamatam <travitej@codeaurora.org>
2021-05-20 21:35:38 -07:00
Samantha Tran
f465e29a7c disp: msm: sde: set IB value after cont splash to DT value
While releasing continuous splash resource, place IB vote
with value populated from device tree. If device tree has
not specified a value, use default IB enable value.

Change-Id: I08f7ddc56ab580887cd4f31c93d7b8c358fb3d13
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-05-20 15:53:31 -07:00
Yashwanth
ffc7cdbe08 disp: msm: add connector state along with crtc state to detect modeset
During modeset, private mode changed is detected from
msm_display_mode which is present in sde_connector_state.
In the current code, sde_connector_state is found from the
drm_connector variable which will not be valid
during atomic check phase and new connector state is
required here. To handle this, drm_connector_state is passed
along with the drm_crtc_state while detecting
msm_atomic_needs_modeset condition.

Change-Id: I62c162eff6e1c091cb05b3f049a40a0f25b710ba
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-21 03:48:21 +05:30
Yashwanth
8515d80ece disp: msm: sde: flush commit thread queue during pm suspend
Following is the sequence during which issue is observed:

1) After suspend, resume commit is with doze suspend mode
(LP2) but kickoff didn't begin.
2) At the same time, runtime pm suspend is triggered which
makes idle request on pm suspend/resume thread.
3) Since the kickoff has not yet started on commit thread,
pending kickoff count is not updated and idle power
collapse sequence is started from pm suspend.
4) As part of idle, irqs are turned off from pm suspend
thread which are turned on commit thread after kickoff
before pp tx irq arrives.

In such cases, during pm suspend, commit thread workqueue
is flushed before encoder idle request to prevent irq's
from getting turned off before the transfer is complete to
avoid inconsistent state.

Change-Id: I417ece0ae7021b0fc5005e262a0d87e43ac729be
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-20 10:19:08 -04:00
Mahadevan
a55a3dfe2a disp: msm: avoid deadlock by prepending connection_mutex
Commit caused by dpms on may use extra  modeset lock on
connection_mutex before msm_atomic_commit, so to avoid
deadlock, make the modeset lock within msm_atomic_commit
to be used before the waiting for pending_crtcs_event.

Change-Id: Ic43af0f775d87ccc1d145ead9cb2e1b65018c86f
Signed-off-by: Mahadevan <mahap@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
8e53d758dd disp: msm: sde: add ctl reset during wait for commit done timeout
During one of the DP timeout usecases, flush doesn't take
effect due to vid vblank wait failure. As a result, smmu
faults are observed because of fetching the previously
staged planes. This change adds ctl reset in the same
DP atomic commit context to recover and avoid
smmu faults.

Change-Id: I2f9aceca56e27f140607317f7596d6fe0d908af8
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
Yashwanth
e96e5bd074 disp: msm: sde: add pending ctl recovery mask in sde_kms
This change adds pending ctl recovery mask in sde kms
structure to check if there are any ctl paths pending
for recovery and stages only border fill during such
conditions to avoid device crash. Below is the issue
sequence observed during the crash:

1) On one of the ctl path, flush didn't take effect and
flush bits are still pending.

2) It was a NULL flush and last good flush on that
interface has DMA2 pipe staged along with other pipes.

3) Different ctl path re-uses the DMA2 pipe (attached to
ctl path in #1) causing wr_ptr timeout followed by
ppdone timeout.

Change-Id: I07eb9f2fe41f59963dc27655c551c05abe240392
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
2021-05-19 16:35:40 -04:00
Abhijit Kulkarni
944a0629f5 disp: msm: sde: fix cont splash pipe identification
This change fixes the continuos splash logic that identifies the
pipes staged by bootloader. The same code flow is used in trusted ui
handover as well. Existing logic was counting the pipes twice if the pipe
is staged on both the layer mixers. This change simplifies the pipes
already staged before handover by using the pipe index to convey if
it is staged or not.

Change-Id: Idb255f2077161dc3553114ac5d04e0ef743bb5ea
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2021-05-14 12:23:57 -07:00
Yu Wu
55340a43c3 disp: msm: add physical address info when dumping display registers
In dumping display registers, physical address will be appended after
each block name. This is to support register compare between kernel
and UEFI.

Change-Id: Ic20d3e2bd4c95aa7c71c4b646a149f7e83ad731a
Signed-off-by: Yu Wu <zwy@codeaurora.org>
2021-05-06 02:59:16 -07:00
Shashank Babu Chinta Venkata
036bba0053 disp: msm: sde: trigger panel event notifications
Trigger various panel event notifications when
operational fps and power mode changes.

Change-Id: I8c5e066c8f20de4c31bb21a6fd6226dd93678fb6
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
2021-04-21 13:04:02 -07:00
Steve Cohen
e5fa459062 disp: msm: restrict AVR_STEP based on panel requirement
Some panels require a fixed step rate for a particular mode.
This change allows DSI panels to specify a single supported
step rate for each nominal fps rate which SDE will enforce
during atomic check of AVR parameters.

Change-Id: I049415449bc88ccd396fced16d4534251eac3a06
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-04-04 18:45:40 -04:00
Veera Sundaram Sankaran
b261fe33db disp: msm: avoid sde_dbg HW access based on HW ownership
Add VM ownership checks before accessing the HW through the debugfs
path in sde dbg module to avoid illegal access. Set the ownership
status on bootup based on the VM.

Change-Id: I30f2a1eb7e049740f1f7fe3ed03aa411264ba7b3
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-31 14:57:04 -07:00
qctecmdr
289fefb14a Merge "disp: msm: fix compilation issues for out of tree compilation" 2021-03-30 01:22:38 -07:00
qctecmdr
10766ebd0f Merge "disp: msm: sde: provide rm status through debugfs node" 2021-03-29 23:04:55 -07:00
qctecmdr
19e9831a45 Merge "disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name" 2021-03-25 14:22:21 -07:00
Tatenda Chipeperekwa
2e946c4cd8 disp: msm: fix compilation issues for out of tree compilation
Update the Kbuild files and fix some compilation issues for out
of tree compilation on waipio target.

Change-Id: I426d7611c56a1c6c848b9dfd925799864cbf4a67
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-24 09:54:28 -07:00
Amine Najahi
d4def5bd8c disp: msm: sde: add new interface for RFI feature
Add a new connector range property and a new entry to the panel
capability blob to publish the list of supported RFI frequencies.
In addition, add the required functions to set, validate and update
DSI bit clock rate value to trigger an internal seamless mode switch
and reconfigure DSI clock and PLL.

Change-Id: I7d19cc369f8c5528709f2f20a51ef02180ebdea4
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 06:32:17 -07:00
Tatenda Chipeperekwa
c6257272d4 disp: msm: fix compilation errors for dlkm compilation
Fix dlkm compilation errors that are due to the use of -Werror
flags used by the build system.

Change-Id: I5e1e9bc63c1361d73e4930aab123212717872ecb
Signed-off-by: Tatenda Chipeperekwa <tatendac@codeaurora.org>
2021-03-22 15:25:36 -07:00
qctecmdr
7dcef410b1 Merge "disp: msm: sde: prepare encoders during enable commit" 2021-03-19 19:52:30 -07:00
Veera Sundaram Sankaran
5bbf449148 disp: msm: sde: modify SDE_DBG_DUMP to use blk_mask instead of blk_name
Currently, SDE_DBG_DUMP takes any number of hw block names along with
few defined strings as arguments. This set of arguments is used to
determine which HW block registers needs to be dumped. Move to a
blk bitmask to avoid passing a large set of arguments. The bitmask is
split based on the clks required to access the HW block for ease of use.
The lower 0-23 bits are used for HW blocks which can be accessed by just
enabling the MDP clks. DP is kept separate as it needs DP specific
clks to be enabled. Add a debugfs node through which the mask can be
modified, which can be useful while using the debugfs dump option to
force a panic.

As part of the change, remove in-log/in-mem enable mask debugfs node
for every debugbus and use a single node to control the logging
mechanism for all the HW blocks debugbus.

Change-Id: Ibb6354b3e3265c9911104bb0f964616eb8a898c9
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-03-19 16:50:45 -07:00
Christopher Braga
c654f1b014 disp: msm: sde: add management of demura shared memory region
In cont-splash use cases the bootloader's Demura configuration
must stay operational until user space takes over display control.
Introduce Demura shared memory region handling to ensure
Demura configuration data stays consistent and accessible to the
hardware.

Change-Id: I5ef20ad9286574904b3d33a4179629d5a16746cf
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
db39b61a5f disp: msm: sde: populate DRM pipeline setup during cont-splash
Declare the continuous splash pipeline setup to userspace by filling
in the DRM states for all plane, crtc, encoder, and connector objects
in use. This information will be treated as an 'informative' state,
and will be cleared at the start of the first commit to maintain
the DRM methodology of DRM clients being the only controller of
the pipeline. This ensures any configuration provided by userspace
is accepted and applied, even if it may already align with the setup
done by continuous splash.

This DRM state configuration is done via manual modification of the
DRM object states. Modification via the exposed DRM UAPI functions
is not possible due to no drm_atomic_state object linking the DRM
pipeline objects together.

Change-Id: I67650e05aafbb4e799cf60939f0595bc3786fc6e
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
484abb02a1 disp: msm: sde: cleanup data scope of _sde_kms_get_splash_data
In order to assign a 'type' to the accumulated sde_splash_data,
the function _sde_kms_get_splash_data was extended to
receive the entire sde_kms object. This change is unnecessary
as the sde_splash_data structure to modify is already provided.

Update _sde_kms_get_splash_data to no longer receive
the sde_kms structure, and instead set the type on the provided
splash_data struct.

Change-Id: I6faf2c54c84a0157597d339c0123a2033e1dc632
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Dhaval Patel
c9a5def3b2 disp: msm: sde: provide rm status through debugfs node
Provide rm status through debugfs node.
cat /d/dri/0/debug/rm_status.

Change-Id: Ic1950b1881f0b57582701a342793aa06adb9da39
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-03-09 17:14:53 -08:00
Veera Sundaram Sankaran
3cef1faa29 disp: msm: sde: implement drm hooks to get precise vblank timestamp
Add precise vblank timestamp support through the DRM framework.
Implement the vblank related hooks to get the vblank count and
timestamp. Use MDSS 8.x, hardware feature that supports logging
of the vsync timestamp counter which can be used to derive the
accurate kernel timestamp. The current ktime would be returned
for older targets to support backward compatibility.

Change-Id: I2d35ed4a643a519e602278b6d16e67ccee16a60b
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2021-02-26 13:48:57 -08:00
Steve Cohen
bd79e929f8 disp: msm: sde: prepare encoders during enable commit
Prepare commit hook is getting skipped for encoders during
power-on. This is required for clearing the pending flush
mask but the encoder->crtc link is not established at
this point for an enable commit.

Instead of looking at the old CRTC state and matching an
attached encoder, use the encoder_mask in the new CRTC state
to determine which encoders to prepare.

Change-Id: I0754020abd328504899d9591180dedc1723aae49
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-01-28 15:30:42 -05:00
Linux Build Service Account
a8ca469548 Merge "disp: msm: remove use of drm_display_mode vrefresh" into display-kernel.lnx.5.10 2021-01-13 14:23: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
Yuan Zhao
73cb7a36c5 disp: msm: sde: remove drm panel callback
For GKI2.0, the old drm_panel_notifier function could not
be used anymore, so removed it.

Change-Id: I858f90d7c39816dc95ab59f88c8988237319eadc
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
2021-01-13 12:09:40 +08:00
orion brody
d00d481360 disp: msm: move from drm_mode to msm_mode
Move away from the private and private_flags fields from drm_mode,
as it is being deprecated in latest kernel version. Instead, Add
msm_display_mode as a wrapper to be used in downstream to store these
parameters. Also, store msm_mode in connector_state to be accessed
in commit path.

Change-Id: Ia5bdebe75f00aa15fb7db4dc3a0d50c30894a95c
Signed-off-by: Orion Brody <obrody@codeaurora.org>
2021-01-04 13:18:36 -08:00
Samantha Tran
ee58486c84 disp: msm: move vblank enable and disable to crtc hooks
Upstream now prefers to utilize vblank enable and disable
through crtc hooks rather than drm driver. Remove
calls from kms vblank enable/disbale.

Change-Id: Ic6911838f14f93a0d277b7bdc2c1968270ec25a2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 10:25:06 -05: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
da5f5ff1ae disp: msm: fix always true/false conditionals
Remove unnecessary error conditionals that are
always true or false.

Change-Id: Ied1041b3165647364b741d3d95edca85039491c2
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2020-12-17 09:58:38 -05:00
Steve Cohen
4eff2d1bce disp: msm: sde: use prepare_commit connector callback for DSI
Some DSI panels require qsync on/off DCS commands to be sent in
prepare commit phase. Add the hook for sending these commands
to the panel. If these commands are not present in the panel's
device tree node, it will be treated as a NO-OP.

Change-Id: Ida65512fe0214779dfa848f6c7b33644d3934afd
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2020-11-30 14:02:50 -05:00
qctecmdr
69e06f9fd7 Merge "disp: msm: dsi: avoid TE status check based on rechecks count" 2020-11-21 13:13:35 -08:00
Linux Build Service Account
b76d65a7a6 Merge "disp: msm: sde: use drm mode set by user-mode in trusted-vm" into display-kernel.lnx.5.4 2020-11-20 17:17:33 -08:00
Linux Build Service Account
3f6007cead Merge "disp: msm: sde: reset sw state on vm transition" into display-kernel.lnx.5.4 2020-11-20 17:17:32 -08:00
Veera Sundaram Sankaran
643e9c2d80 disp: msm: sde: move vm-ownership check to crtc custom events
Currently all the custom event register/unregister calls are
blocked based on the vm-ownership checks. Avoid this check
for connector events as it has only software updates unlike
the crtc events which directly touch the HW registers. This
allows the connector events to be registered before the first
commit where the VM ownership is obtained.

Change-Id: Id78e365929cb958ead10221b9267f1c1c0406a27
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-19 12:13:17 -08:00
Veera Sundaram Sankaran
e07097c244 disp: msm: sde: use drm mode set by user-mode in trusted-vm
Trusted-vm uses the cont-splash path to initialize the software
states by reading the hardware registers and populating the
SDE & DRM software states. But drm mode cannot be determined by
register reads, so rely on user-mode to get the mode which comes
as part of the first atomic_commit check phase which handles the
transition. The primary-vm user-mode passes the current mode to
trusted-vm through qrtr which is in-turn passed to driver to
set that particular mode.

Change-Id: I4fb86b40b8a0583c8edb539b0a51dcd33de731ff
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 17:32:58 -08:00
Veera Sundaram Sankaran
b403c57119 Revert "disp: msm: sde: use mdp scratch register to pass drm mode info"
This reverts commit e8309fcbf5. Removing
the scratch register logic to pass information between the VMs as the
design changed from kernel to user-mode for passing the mode information
through qrtr from primary-vm to trusted-vm.

Change-Id: Ibfa4b0004496f68b272da808e866f5226b02c013
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
2020-11-18 16:56:50 -08:00
Abhijit Kulkarni
fef65e7b8c disp: msm: sde: reset sw state on vm transition
This change resets the plane and crtc dirty properties on
transition to other VM. This ensures when the VM acquires the
hw again all these properties on the new state are reapplied.

Change-Id: Id95676453eb9ae937b1b22f0e244b47449101cb0
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2020-11-18 14:37:04 -08:00
qctecmdr
7a98aa2134 Merge "disp: msm: sde: fix missing error handling in VM ops" 2020-11-17 02:59:24 -08:00