Commit Graph

2250 Commits

Author SHA1 Message Date
Jeykumar Sankaran
c3959896c3 disp: msm: sde: enable tui flag for waipio hw catalog
Enable trusted vm flag for waipio HW catalog.

Change-Id: I7cd5ba0354e2ed66a21f5f3b923c1855af1a0f14
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 15:24:53 -07:00
Jeykumar Sankaran
5960a1b8b5 disp: config: enable CONFIG_DRM_SDE_VM for waipio
Enable CONFIG_DRM_SDE_VM to enable trusted VM support
for waipio target.

Change-Id: I4d70b3a84f7b612390f5a9925330cf77929b6e7b
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 15:24:49 -07:00
qctecmdr
b2c440bffe Merge "disp: msm: dsi: use single mode for RFI feature" 2021-03-24 14:16:57 -07:00
qctecmdr
ee2a505703 Merge "disp: msm: dsi: defer clk setting when doing const_fps RFI" 2021-03-24 14:16:57 -07:00
qctecmdr
7d1ca7c295 Merge "disp: msm: sde: add multi-mode RFI support" 2021-03-24 14:16:57 -07:00
qctecmdr
b884dbf3e7 Merge "disp: msm: dsi: Fix DFPS sequence when constant fps is enabled" 2021-03-24 14:16:57 -07:00
Jeykumar Sankaran
c9ac265816 disp: msm: dsi: parse panel gpio's with dsi parser util
Panel GPIO's pins can be provided through DT or firmware data.
Use dsi parser util in consistent with other node parsings to
read their values.

Change-Id: I6dc687516aa0ce51fc56e54f4b5cbadc17f0dc1d
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 13:00:05 -07:00
Jeykumar Sankaran
4339422849 disp: msm: dsi: expand dsi_parser hooks
Implement and add additional dsi parser hooks
for parsing firmware panel data.

Change-Id: If06eb63b754ffce447b56ac6b22955f64e031779
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 12:59:58 -07:00
Jeykumar Sankaran
8b7ed7dc0c disp: msm: dsi: validate display probe dependencies early
DSI display configuration can be either DT or firmware file driven.
When probed with firmware path, asynchronous firmware file read
callback function will be too late to check for dependencies and
defer the probe when the dependencies are not met.

Move all the dependency checks before the firmware file read request.
Since the panel data will not be available before the DT/firmware read,
this change limits the check to the dsi display layer.

Change-Id: Ib26ed7839389027c2fe2dc15f70a572df3990ed9
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-24 12:59:51 -07:00
Christina Oliveira
70d6f23b26 drm: msm: Add mmrm api to display
This change adds mmrm api to display driver.

Change-Id: I51f310f8c762edc823930c05c001735056a2cbcd
Signed-off-by: Christina Oliveira <coliveir@codeaurora.org>
2021-03-24 11:37:42 -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
qctecmdr
3ffb2db08c Merge "disp: msm: sde: fix tracking of pending rsvps" 2021-03-24 09:41:12 -07:00
Amine Najahi
2c98ff7194 disp: msm: dp: fix mode filtering for 4K120
Currently, 4K120 mode is being filtered by DP driver
due to invalid topology assignation. When 4 LMs are
needed, the number of DSCs must match the number of
LMs since only DSCMERGE based topologies are supported
for driving DSC capable panels.

This change fixes the topology validation logic and
aggregates LM and DSC validation functions in the topology
one since the number of LMs and DSCs must now be considered
in calculating the topology requirement.

Change-Id: I95577eabb34068cd490d23e70ffbb899d1c2d03a
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 09:48:03 -04:00
Amine Najahi
c5f2bd7401 disp: msm: sde: add multi-mode RFI support
Currently, RFI feature only supports panel that contains
a single timing node. This limits the feature availability
for panel with multiple modes or with DFPS support.

This change adds support for RFI on panels that contains
multiple timing nodes.

Change-Id: I3a7aadf7b6da3518350b2eb815602b13b5c259f5
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-24 06:32:45 -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
Nilaan Gunabalachandran
0623a02a84 disp: msm: sde: update smmu fault handler to print debug info
This change updates the smmu fault handlers in the display driver
to return -ENOSYS. This will print out useful debug information
from smmu driver.

Change-Id: I427982286abe4d592f270477c8ad2e2be74700c9
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-03-23 08:17:18 -07:00
Yuan Zhao
484387e860 disp: msm: dsi: defer clk setting when doing const_fps RFI
When doing const fps RFI, dynamic refresh clock was done
in the next frame kick off, so as the orginal RFI work flow,
the clock setting also should be done here.

Change-Id: Ic3e6a35dc7264df028f5d848ac6f1eea04a95126
Signed-off-by: Yuan Zhao <yzhao@codeaurora.org>
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-22 19:15:28 -07:00
qctecmdr
4c41c05d7c Merge "disp: msm: fix compilation errors for dlkm compilation" 2021-03-22 19:10:52 -07:00
qctecmdr
e4f4455a5f Merge "disp: msm: sde: add helper function to setup encoder and sspp" 2021-03-22 16:34:40 -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
Jeykumar Sankaran
9956819d55 Revert "disp: msm: dsi: reorder resource validation in probe"
This reverts commit 23734fc295.

Reverting this change as it does not address all the below uses cases for Waipio
- Supporting PROBE deferral based on dsi ctrl availability
- Dual DSI path with optional single DSI node
- Firmware DT blob parsing for single / dual dsi panels

Change-Id: Ifc747befadd85eb76995b6cb1f72407fa5dccdbb
Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
2021-03-22 10:47:25 -07:00
qctecmdr
1b3ad8486d Merge "disp: msm: sde: update uidle fal1 maximum threshold for waipio" 2021-03-22 10:33:12 -07:00
qctecmdr
ae6a089b20 Merge "disp: msm: sde: refactor sde_connector_atomic_set_property function" 2021-03-19 20:51:27 -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
Prabhanjan Kandula
68b83b3ffc disp: msm: sde: update uidle fal1 maximum threshold for waipio
This change provides support to have per target configuration
of the maximum value for fal1 threshold & updates value for waipio
as per qos recommendation.

Change-Id: I48df0d1c58a8de80f40200b35e406d07621a3f68
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 17:25:51 -07:00
Prabhanjan Kandula
0c31168eff disp: msm: sde: update qos lut configurations for waipio
This change refactors qos lut configuration by redefining & adding
few new lut usage cases for supporting waipio qos recommendations.

Change-Id: I62607208c289c6ffee32fc8008066eb603acb504
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 17:25:13 -07:00
Prabhanjan Kandula
38102ac372 disp: msm: sde: update inline rotation version for waipio
This change updates inline rotation version and handles listing
of color formats supported by inline rotation in waipio target.

Change-Id: Ibefc4fdfcf65c7a42642c15af5cf5e873a5b67de
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 15:03:39 -07:00
Dhaval Patel
b5cde14bca disp: msm: sde: calculate line_time once during modeset
Calculate line_time once during modeset and allow
each plane to use it instead of calculating for each frame.
It also simplifies the line_time calculation for
command mode display.

Change-Id: I94ce29eec94bfdbee9016fbf93378661ebf79c03
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
2021-03-18 15:03:30 -07:00
Samantha Tran
6de4718ee9 disp: msm: sde: enable FAL1 only option for microidle
Add support for the option to enable microidle FAL1 only setting.
Previously microidle enabled would automatically have both
FAL1 and FAL10. Now in cases of higher FPS or DFPS we can
choose to enable FAL1. This change also adds qos recommended
waipio target specific fps limits for fal1 and fal10.

Change-Id: I7aa7d003afc3ac77c671b2467b0e6dedaae772aa
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2021-03-18 14:37:32 -07:00
Steve Cohen
c5463f6586 disp: msm: sde: trace: copy evtlog array into individual elements
The Android Perfetto tool parses sde_evtlog traces as generic
ftrace events which does not support arrays. Add a copy of
the data array as individual u32 elements so the desired trace
data gets captured correctly.

Change-Id: I42a668b8b896cdc3cd9e97e1fc357f22d29e4831
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2021-03-18 14:55:38 -04:00
Nilaan Gunabalachandran
b9cfa5b37f disp: msm: sde: remove rotator llcc
Rotator llcc is no longer supported. This change removes the
unused code.

Change-Id: Ia1d95e3f4386d25e0d2e06a87802b3f5b694998d
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-03-18 12:33:24 -04:00
Nilaan Gunabalachandran
97152213d7 disp: msm: sde: update sys cache enable
Cache controller version has been renamed on waipio target.
This change removes the version check as it is not necessary to
enable system cache.

Change-Id: I1d2541d3285f054caa31ae7976759048ee91db18
Signed-off-by: Nilaan Gunabalachandran <ngunabal@codeaurora.org>
2021-03-18 12:33:24 -04:00
Samantha Tran
253d2115d4 disp: msm: sde: add helper function to setup encoder and sspp
This change creates a helper function for sde_encoder_virt_enable
which is responsible for setting up physical encoders. Similarly, it
creates a helper function for sde_hw_sspp_setup_format which is
responsible for writing to the static control register based on ubwc
version.

Change-Id: I106f1f2524398daf7285a931971099735ee8dd4f
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
2021-03-17 16:08:05 -07:00
Amine Najahi
6a1cea8457 disp: msm: sde: refactor sde_connector_atomic_set_property function
Reduce cyclomatic code complexity of sde_connector_atomic_set_property function from 34 to 22
by moving OUT_FP and RELEASE_FENCE property setting code to separate
helper functions.

Change-Id: I8ac171fa5b8631c7133d276dd872a6c79c5e3114
Signed-off-by: Amine Najahi <anajahi@codeaurora.org>
2021-03-17 17:26:33 -04:00
Gopikrishnaiah Anandan
1d39b8a5a9 disp: msm: sde: add checks for hfc feature enablement of demura
HFC feature of demura needs a skip blend plane to be set. If skip blend
plane is not set and HFC feature is requested to be enabled, driver
should skip turning on HFC demura feature. Change adds checks to ensure
that HFC is always enabled with skip blend plane staged.

Change-Id: I923359c7cb143867660b4c1e667f56ed42fa51c9
2021-03-17 11:22:08 -07:00
Christopher Braga
15cc307f2a disp: msm: sde: add on/off and payload size logging for LUTDMA
Debugging of LUTDMA has proven to be difficult due to lacking
information. Add logging for payload sizing, feature on / off,
and dumping of 64-bit buffer addresses.

Change-Id: I6d421f65172a782b79e915501ec9ea00d05dbcdd
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
0c2aa527bf disp: msm: sde: fix partial update offset calculation
Panel height and width should be passed for partial update offset
calculation. Change passes the offsets to demura partial update
function.

Change-Id: Ic4113d46e8c1643a855f672e7a2bdd848ef99adc
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
d9187ba0d9 disp: msm: sde: stop crtc features during encoder disable
Encoder is disabling planes and unstaging layers from layer mixer. Some
of the crtc features are dependent on the plane being staged. Change
adds api that encoder can call on crtc to stop the features that are
dependent on source pipes.

Change-Id: I4d875155ceb8f66acfe6ce0096141ca7253bb140
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
16c3eae807 disp: msm: sde: fix cp state handling
When states are duplicated ensure that payload addresses are not copied
for range overloaded properties. Allocate the memory and copy the
payload so that each state has its own heap pointer.

Change-Id: I0fb8941f69216a48f73aba9b59338ace9916e179
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
9161487a45 msm: sde: Add partial update support for demura
Demura HW block needs to be programmed with different sequence for
partial update use-cases. Change adds support for partial update
programming sequence.

Change-Id: I3ea38354b1120d7c545f6680562c47304cd1126b
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
39ed53d660 disp: msm: dsi: notify panel id during callback registration
Clients of dsi driver can register to be notified of panel id
information. Dsi is probed early during the device boot-up. If the panel
id is available with dsi driver none of the clients have registered
that early. Once clients probe and they register with the dsi driver
panel id is not passed onto clients until power on of the dsi. Change
adds support to notify the dsi clients during registration if panel id
is valid.

Change-Id: Ic475060cbec5f5b645aed865939fffe66aef071b
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
d5df6af063 disp: msm: sde: fix dual demura configuration
When dual layer mixer topology is used for demura, left and right demura
blocks need different programming sequence. Change adds support
to program the required offsets for dual layer mixer demura topology.

Change-Id: I6c15e27148f12459098fa0d01650cd05b16817c6
2021-03-17 11:22:08 -07:00
Christopher Braga
d2511cbe2f disp: msm: dsi: handle invalid and dummy panel IDs from DTSI
For Demura continuous splash hand-off, the DTB must already have
a definition for a demura panel ID. This is necessary
as ABL currently only updates this node and will not add it in
if missing.

Introduce special handling to identify a panel ID of 0 as a dummy
node, and set all invalid cases to the panel id ~0x0.

Change-Id: I70315c1b32cce9bcd2f6142515f2355a489d470b
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:08 -07:00
Gopikrishnaiah Anandan
320ae88cf1 disp: msm: sde: avoid caching color processing properties in validate
Recent investigation shows that color processing properties are
incorrectly being cached in validate. This can result in unwanted
color processing properties being applied if a previous commit
failed or was validate only.

Add color processing properties to sde crtc state instead of marking
them dirty in color processing driver. When atomic commit is called
properties from state will be marked as dirty and applied.

Change-Id: If231a1f028e4cbd0b50eb0a947f4d58f94390a0c
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
dc1af2c9d5 disp: msm: sde: read demura plane status registers on cont-splash boot
Extrapolate the Demura plane configuration from the Demura DSPP block
on cont-splash boot, and pass this information to DRM clients via a
CRTC property. This will allow user-space to be aware of all plane
reservations, and avoid plane mangling in multi display use-cases.

Change-Id: I6d216f555fcddbd19c18b6209dc830c21f6be5a4
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
c8f9e73f0e disp: msm: dsi: move demura panel ID fetching to DTSI
Previous design had the demura panel ID passed in on the Linux kernel
command line. Update the DSI driver to read this information from the
DTSI instead.

Change-Id: I7697bb34a313f1837b80ba5ff78e720e8131a819
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -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
Gopikrishnaiah Anandan
580638dba2 disp: msm: sde: update demura property name
Add prefix of sde to demura properties to keep it consistent with other
sde property names.

Change-Id: I7b666b8a3c1ef79a112911999a736bba368b0cf0
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
2021-03-17 11:22:07 -07:00
Christopher Braga
4815caf222 disp: msm: sde: add DSPP and DEMURA count to CRTC capability blob
Expose overall DSPP and DEMURA counts on CRTC object to allow
DRM clients to make better policy decisions.

Change-Id: I59d795cafc829e8b2fe6a3f2fe597c7d5925105d
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
2021-03-17 11:22:07 -07:00